Standardize parameter naming
convention of inline packed classes
Renamed value parameter in various inline
classes that pack 2 floats into a single long
from value to packedValue for consistency
Change-Id: I197f1256938c963c0ec41da88a10f606301b9b05
Fixes: 158198355
Test: re-ran compose tests
diff --git a/ui/ui-unit/api/0.1.0-dev14.txt b/ui/ui-unit/api/0.1.0-dev14.txt
index c91e1d5f..08c7a60 100644
--- a/ui/ui-unit/api/0.1.0-dev14.txt
+++ b/ui/ui-unit/api/0.1.0-dev14.txt
@@ -287,7 +287,7 @@
}
@androidx.compose.Immutable public final class IntSize {
- ctor public IntSize(internal long value);
+ ctor public IntSize(internal long packedValue);
method @androidx.compose.Stable public inline operator int component1();
method @androidx.compose.Stable public inline operator int component2();
method @androidx.compose.Stable public operator androidx.ui.unit.IntSize div(int other);
@@ -313,7 +313,7 @@
@androidx.compose.Immutable public final inline class Position {
ctor public Position();
- method public static long constructor-impl(internal long value);
+ method public static long constructor-impl(internal long packedValue);
method @androidx.compose.Immutable public static inline boolean equals-impl(long p, Object? p1);
method public static boolean equals-impl0(long p1, long p2);
method public static float getX-impl(long $this);
diff --git a/ui/ui-unit/api/current.txt b/ui/ui-unit/api/current.txt
index c91e1d5f..08c7a60 100644
--- a/ui/ui-unit/api/current.txt
+++ b/ui/ui-unit/api/current.txt
@@ -287,7 +287,7 @@
}
@androidx.compose.Immutable public final class IntSize {
- ctor public IntSize(internal long value);
+ ctor public IntSize(internal long packedValue);
method @androidx.compose.Stable public inline operator int component1();
method @androidx.compose.Stable public inline operator int component2();
method @androidx.compose.Stable public operator androidx.ui.unit.IntSize div(int other);
@@ -313,7 +313,7 @@
@androidx.compose.Immutable public final inline class Position {
ctor public Position();
- method public static long constructor-impl(internal long value);
+ method public static long constructor-impl(internal long packedValue);
method @androidx.compose.Immutable public static inline boolean equals-impl(long p, Object? p1);
method public static boolean equals-impl0(long p1, long p2);
method public static float getX-impl(long $this);
diff --git a/ui/ui-unit/api/public_plus_experimental_0.1.0-dev14.txt b/ui/ui-unit/api/public_plus_experimental_0.1.0-dev14.txt
index c91e1d5f..08c7a60 100644
--- a/ui/ui-unit/api/public_plus_experimental_0.1.0-dev14.txt
+++ b/ui/ui-unit/api/public_plus_experimental_0.1.0-dev14.txt
@@ -287,7 +287,7 @@
}
@androidx.compose.Immutable public final class IntSize {
- ctor public IntSize(internal long value);
+ ctor public IntSize(internal long packedValue);
method @androidx.compose.Stable public inline operator int component1();
method @androidx.compose.Stable public inline operator int component2();
method @androidx.compose.Stable public operator androidx.ui.unit.IntSize div(int other);
@@ -313,7 +313,7 @@
@androidx.compose.Immutable public final inline class Position {
ctor public Position();
- method public static long constructor-impl(internal long value);
+ method public static long constructor-impl(internal long packedValue);
method @androidx.compose.Immutable public static inline boolean equals-impl(long p, Object? p1);
method public static boolean equals-impl0(long p1, long p2);
method public static float getX-impl(long $this);
diff --git a/ui/ui-unit/api/public_plus_experimental_current.txt b/ui/ui-unit/api/public_plus_experimental_current.txt
index c91e1d5f..08c7a60 100644
--- a/ui/ui-unit/api/public_plus_experimental_current.txt
+++ b/ui/ui-unit/api/public_plus_experimental_current.txt
@@ -287,7 +287,7 @@
}
@androidx.compose.Immutable public final class IntSize {
- ctor public IntSize(internal long value);
+ ctor public IntSize(internal long packedValue);
method @androidx.compose.Stable public inline operator int component1();
method @androidx.compose.Stable public inline operator int component2();
method @androidx.compose.Stable public operator androidx.ui.unit.IntSize div(int other);
@@ -313,7 +313,7 @@
@androidx.compose.Immutable public final inline class Position {
ctor public Position();
- method public static long constructor-impl(internal long value);
+ method public static long constructor-impl(internal long packedValue);
method @androidx.compose.Immutable public static inline boolean equals-impl(long p, Object? p1);
method public static boolean equals-impl0(long p1, long p2);
method public static float getX-impl(long $this);
diff --git a/ui/ui-unit/api/restricted_0.1.0-dev14.txt b/ui/ui-unit/api/restricted_0.1.0-dev14.txt
index fafd9ab..82aef00 100644
--- a/ui/ui-unit/api/restricted_0.1.0-dev14.txt
+++ b/ui/ui-unit/api/restricted_0.1.0-dev14.txt
@@ -287,7 +287,7 @@
}
@androidx.compose.Immutable public final class IntSize {
- ctor public IntSize(internal long value);
+ ctor public IntSize(internal long packedValue);
method @androidx.compose.Stable public inline operator int component1();
method @androidx.compose.Stable public inline operator int component2();
method @androidx.compose.Stable public operator androidx.ui.unit.IntSize div(int other);
@@ -313,7 +313,7 @@
@androidx.compose.Immutable public final inline class Position {
ctor public Position();
- method public static long constructor-impl(internal long value);
+ method public static long constructor-impl(internal long packedValue);
method @androidx.compose.Immutable public static inline boolean equals-impl(long p, Object? p1);
method public static boolean equals-impl0(long p1, long p2);
method public static float getX-impl(long $this);
diff --git a/ui/ui-unit/api/restricted_current.txt b/ui/ui-unit/api/restricted_current.txt
index fafd9ab..82aef00 100644
--- a/ui/ui-unit/api/restricted_current.txt
+++ b/ui/ui-unit/api/restricted_current.txt
@@ -287,7 +287,7 @@
}
@androidx.compose.Immutable public final class IntSize {
- ctor public IntSize(internal long value);
+ ctor public IntSize(internal long packedValue);
method @androidx.compose.Stable public inline operator int component1();
method @androidx.compose.Stable public inline operator int component2();
method @androidx.compose.Stable public operator androidx.ui.unit.IntSize div(int other);
@@ -313,7 +313,7 @@
@androidx.compose.Immutable public final inline class Position {
ctor public Position();
- method public static long constructor-impl(internal long value);
+ method public static long constructor-impl(internal long packedValue);
method @androidx.compose.Immutable public static inline boolean equals-impl(long p, Object? p1);
method public static boolean equals-impl0(long p1, long p2);
method public static float getX-impl(long $this);
diff --git a/ui/ui-unit/src/commonMain/kotlin/androidx/ui/unit/Dp.kt b/ui/ui-unit/src/commonMain/kotlin/androidx/ui/unit/Dp.kt
index 67bb906..e170b59 100644
--- a/ui/ui-unit/src/commonMain/kotlin/androidx/ui/unit/Dp.kt
+++ b/ui/ui-unit/src/commonMain/kotlin/androidx/ui/unit/Dp.kt
@@ -486,20 +486,20 @@
@OptIn(ExperimentalUnsignedTypes::class)
@Suppress("EXPERIMENTAL_FEATURE_WARNING")
@Immutable
-inline class Position(@PublishedApi internal val value: Long) {
+inline class Position(@PublishedApi internal val packedValue: Long) {
/**
* The horizontal aspect of the position in [Dp]
*/
@Stable
/*inline*/ val x: Dp
- get() = unpackFloat1(value).dp
+ get() = unpackFloat1(packedValue).dp
/**
* The vertical aspect of the position in [Dp]
*/
@Stable
/*inline*/ val y: Dp
- get() = unpackFloat2(value).dp
+ get() = unpackFloat2(packedValue).dp
/**
* Subtract a [Position] from another one.
diff --git a/ui/ui-unit/src/commonMain/kotlin/androidx/ui/unit/IntSize.kt b/ui/ui-unit/src/commonMain/kotlin/androidx/ui/unit/IntSize.kt
index 2c3ecc6..35f174d 100644
--- a/ui/ui-unit/src/commonMain/kotlin/androidx/ui/unit/IntSize.kt
+++ b/ui/ui-unit/src/commonMain/kotlin/androidx/ui/unit/IntSize.kt
@@ -29,20 +29,20 @@
* A two-dimensional size class used for measuring in [Int] pixels.
*/
@Immutable
-/*inline*/ class IntSize(@PublishedApi internal val value: Long) {
+/*inline*/ class IntSize(@PublishedApi internal val packedValue: Long) {
/**
* The horizontal aspect of the size in [Int] pixels.
*/
@Stable
val width: Int
- get() = unpackInt1(value)
+ get() = unpackInt1(packedValue)
/**
* The vertical aspect of the size in [Int] pixels.
*/
@Stable
val height: Int
- get() = unpackInt2(value)
+ get() = unpackInt2(packedValue)
@Stable
inline operator fun component1(): Int = width
@@ -71,12 +71,12 @@
if (other !is IntSize) {
return false
}
- return other.value == value
+ return other.packedValue == packedValue
}
@Stable
override fun hashCode(): Int {
- return value.hashCode()
+ return packedValue.hashCode()
}
companion object {