[go: nahoru, domu]

Replace PxPosition with Offset

Relnote: "In order to consolidate the
number of classes used to represent
positioning information, standardize
on usage of the Offset class instead
of PxPosition. This provides the benefits
of an inline class to leverage a long
to pack 2 float values to represent x
and y offsets represented as floats."

Bug: 157948366
Test: re-ran compose tests
Change-Id: I3ad983207bc37af20afac03e2cd09b4240777687
diff --git a/ui/ui-test/src/androidTest/java/androidx/ui/test/inputdispatcher/SendSwipeWithKeyTimesTest.kt b/ui/ui-test/src/androidTest/java/androidx/ui/test/inputdispatcher/SendSwipeWithKeyTimesTest.kt
index 15646c9..13379bc 100644
--- a/ui/ui-test/src/androidTest/java/androidx/ui/test/inputdispatcher/SendSwipeWithKeyTimesTest.kt
+++ b/ui/ui-test/src/androidTest/java/androidx/ui/test/inputdispatcher/SendSwipeWithKeyTimesTest.kt
@@ -25,7 +25,6 @@
 import androidx.ui.test.util.assertHasValidEventTimes
 import androidx.ui.test.util.verify
 import androidx.ui.unit.Duration
-import androidx.ui.unit.PxPosition
 import androidx.ui.unit.inMilliseconds
 import androidx.ui.unit.milliseconds
 import com.google.common.truth.Truth.assertThat
@@ -55,7 +54,7 @@
 
     companion object {
         private val curve = { t: Long ->
-            PxPosition(t.toFloat(), (-t).toFloat())
+            androidx.ui.geometry.Offset(t.toFloat(), (-t).toFloat())
         }
 
         @JvmStatic