From faa693a80e623e316844f0eb7fb311e24e134cae Mon Sep 17 00:00:00 2001 From: Anton Potapov Date: Mon, 24 Feb 2025 13:33:36 +0000 Subject: Use suspendAnimate to cancel the previous animaiton when the next event arrives. Flag: com.android.systemui.volume_redesign Fixes: 398130553 Test: atest VolumeDialogScreenshotTest Test: manual on the foldable. Dialog appears and disappears with an animation Change-Id: I29e83cdf39237cdf5de8899d125a866bdf1d6bc3 --- .../android/systemui/volume/dialog/ui/binder/VolumeDialogViewBinder.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/volume/dialog/ui/binder/VolumeDialogViewBinder.kt b/packages/SystemUI/src/com/android/systemui/volume/dialog/ui/binder/VolumeDialogViewBinder.kt index 0c10aaa57a05..feb47693e98d 100644 --- a/packages/SystemUI/src/com/android/systemui/volume/dialog/ui/binder/VolumeDialogViewBinder.kt +++ b/packages/SystemUI/src/com/android/systemui/volume/dialog/ui/binder/VolumeDialogViewBinder.kt @@ -148,7 +148,7 @@ constructor( junkListener?.let(animation::removeUpdateListener) junkListener = jankListenerFactory.show(view).also(animation::addUpdateListener) - animation.animateToFinalPosition(FRACTION_SHOW) + animation.suspendAnimate(FRACTION_SHOW) } is VolumeDialogVisibilityModel.Dismissed -> { tracer.traceVisibilityEnd(it) -- cgit v1.2.3-59-g8ed1b