Ktfmt on MultiPointerDraggable MultiPointerDraggableTest
Test: No test. Ktfmt refactor
Bug: 365564010
Flag: com.android.systemui.scene_container
Change-Id: Iff4d6116fc8aa0b2df8528b6bbcb2a55d0fd0df0
diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/MultiPointerDraggable.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/MultiPointerDraggable.kt
index 0d05f4e..b99b7f9 100644
--- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/MultiPointerDraggable.kt
+++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/MultiPointerDraggable.kt
@@ -200,7 +200,7 @@
override fun onPointerEvent(
pointerEvent: PointerEvent,
pass: PointerEventPass,
- bounds: IntSize
+ bounds: IntSize,
) {
// The order is important here: the tracker is always called first.
pointerTracker.onPointerEvent(pointerEvent, pass, bounds)
@@ -312,13 +312,13 @@
velocityTracker.calculateVelocity(maxVelocity)
}
.toFloat(),
- onFling = { controller.onStop(it, canChangeContent = true) }
+ onFling = { controller.onStop(it, canChangeContent = true) },
)
},
onDragCancel = { controller ->
startFlingGesture(
initialVelocity = 0f,
- onFling = { controller.onStop(it, canChangeContent = true) }
+ onFling = { controller.onStop(it, canChangeContent = true) },
)
},
swipeDetector = swipeDetector,
@@ -369,10 +369,7 @@
// PreScroll phase
val consumedByPreScroll =
dispatcher
- .dispatchPreScroll(
- available = availableOnPreScroll.toOffset(),
- source = source,
- )
+ .dispatchPreScroll(available = availableOnPreScroll.toOffset(), source = source)
.toFloat()
// Scroll phase
@@ -484,12 +481,12 @@
Orientation.Horizontal ->
awaitHorizontalTouchSlopOrCancellation(
consumablePointer.id,
- onSlopReached
+ onSlopReached,
)
Orientation.Vertical ->
awaitVerticalTouchSlopOrCancellation(
consumablePointer.id,
- onSlopReached
+ onSlopReached,
)
}
@@ -553,7 +550,7 @@
}
private suspend fun AwaitPointerEventScope.awaitConsumableEvent(
- pass: () -> PointerEventPass,
+ pass: () -> PointerEventPass
): PointerEvent {
fun canBeConsumed(changes: List<PointerInputChange>): Boolean {
// At least one pointer down AND
@@ -661,7 +658,4 @@
fun pointersInfo(): PointersInfo
}
-internal data class PointersInfo(
- val startedPosition: Offset?,
- val pointersDown: Int,
-)
+internal data class PointersInfo(val startedPosition: Offset?, val pointersDown: Int)
diff --git a/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/MultiPointerDraggableTest.kt b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/MultiPointerDraggableTest.kt
index bf192e7..942cb23 100644
--- a/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/MultiPointerDraggableTest.kt
+++ b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/MultiPointerDraggableTest.kt
@@ -259,7 +259,7 @@
it
}
),
- Orientation.Vertical
+ Orientation.Vertical,
)
.fillMaxSize()
)
@@ -640,7 +640,7 @@
override fun onPostScroll(
consumed: Offset,
available: Offset,
- source: NestedScrollSource
+ source: NestedScrollSource,
): Offset {
availableOnPostScroll = available.y
return Offset.Zero
@@ -653,7 +653,7 @@
override suspend fun onPostFling(
consumed: Velocity,
- available: Velocity
+ available: Velocity,
): Velocity {
availableOnPostFling = available.y
return Velocity.Zero