Loading packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/PhysicsPropertyAnimatorTest.kt +11 −0 Original line number Diff line number Diff line Loading @@ -224,6 +224,15 @@ class PhysicsPropertyAnimatorTest : SysuiTestCase() { @Test fun testEndedBeforeStartingCleanupHandler() { effectiveProperty.setValue(view, 100f) val finishListener2 = Mockito.mock(DynamicAnimation.OnAnimationEndListener::class.java) val animationProperties: AnimationProperties = object : AnimationProperties() { override fun getAnimationEndListener( property: Property<*, *>? ): DynamicAnimation.OnAnimationEndListener { return finishListener2 } } animationProperties.setDelay(200) PhysicsPropertyAnimator.setProperty( view, Loading @@ -240,6 +249,8 @@ class PhysicsPropertyAnimatorTest : SysuiTestCase() { Assert.assertTrue(propertyData.offset == 0f) Assert.assertTrue(propertyData.animator == null) Assert.assertTrue(propertyData.doubleOvershootAvoidingListener == null) Mockito.verify(finishListener)?.onAnimationEnd(any(), any(), any(), any()) Mockito.verify(finishListener2).onAnimationEnd(any(), any(), any(), any()) } @Test Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/PhysicsPropertyAnimator.kt +4 −0 Original line number Diff line number Diff line Loading @@ -223,6 +223,10 @@ private fun startAnimation( 0f /* value */, 0f /* velocity */ ) endListener?.onAnimationEnd(propertyData.animator, cancelled, 0f /* value */, 0f /* velocity */) propertyData.animator = null propertyData.doubleOvershootAvoidingListener = null propertyData.offset = 0f Loading Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/PhysicsPropertyAnimatorTest.kt +11 −0 Original line number Diff line number Diff line Loading @@ -224,6 +224,15 @@ class PhysicsPropertyAnimatorTest : SysuiTestCase() { @Test fun testEndedBeforeStartingCleanupHandler() { effectiveProperty.setValue(view, 100f) val finishListener2 = Mockito.mock(DynamicAnimation.OnAnimationEndListener::class.java) val animationProperties: AnimationProperties = object : AnimationProperties() { override fun getAnimationEndListener( property: Property<*, *>? ): DynamicAnimation.OnAnimationEndListener { return finishListener2 } } animationProperties.setDelay(200) PhysicsPropertyAnimator.setProperty( view, Loading @@ -240,6 +249,8 @@ class PhysicsPropertyAnimatorTest : SysuiTestCase() { Assert.assertTrue(propertyData.offset == 0f) Assert.assertTrue(propertyData.animator == null) Assert.assertTrue(propertyData.doubleOvershootAvoidingListener == null) Mockito.verify(finishListener)?.onAnimationEnd(any(), any(), any(), any()) Mockito.verify(finishListener2).onAnimationEnd(any(), any(), any(), any()) } @Test Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/PhysicsPropertyAnimator.kt +4 −0 Original line number Diff line number Diff line Loading @@ -223,6 +223,10 @@ private fun startAnimation( 0f /* value */, 0f /* velocity */ ) endListener?.onAnimationEnd(propertyData.animator, cancelled, 0f /* value */, 0f /* velocity */) propertyData.animator = null propertyData.doubleOvershootAvoidingListener = null propertyData.offset = 0f Loading