mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-02 00:36:49 +00:00
Reset the bubble bar scale when the animation is interrupted
Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 381283214
Test: atest BubbleBarViewAnimatorTest
Test: manual
- have a bubble in the bubble bar
- launch an app
- set animator scale to 5x to slow down animation
- send a bubble
- when the bubble bar animates interrupt the animation by
touching the bubble bar
- observe the bubble bar scale is reset correctly
Change-Id: I1abd81e3df987ba749a13eb1b7506d5c1d8fdddd
This commit is contained in:
@@ -197,6 +197,8 @@ class BubbleBarViewAnimatorTest {
|
||||
assertThat(bubbleBarParentViewController.timesInvoked).isEqualTo(2)
|
||||
assertThat(animatorScheduler.delayedBlock).isNull()
|
||||
assertThat(bubbleBarView.alpha).isEqualTo(1)
|
||||
assertThat(bubbleBarView.scaleX).isEqualTo(1)
|
||||
assertThat(bubbleBarView.scaleY).isEqualTo(1)
|
||||
assertThat(bubbleBarView.visibility).isEqualTo(VISIBLE)
|
||||
assertThat(bubbleBarView.translationY).isEqualTo(BAR_TRANSLATION_Y_FOR_TASKBAR)
|
||||
assertThat(animator.isAnimating).isFalse()
|
||||
@@ -241,6 +243,8 @@ class BubbleBarViewAnimatorTest {
|
||||
// verify that the hide animation was canceled
|
||||
assertThat(animatorScheduler.delayedBlock).isNull()
|
||||
assertThat(animator.isAnimating).isFalse()
|
||||
assertThat(bubbleBarView.scaleX).isEqualTo(1)
|
||||
assertThat(bubbleBarView.scaleY).isEqualTo(1)
|
||||
verify(bubbleStashController).onNewBubbleAnimationInterrupted(any(), any())
|
||||
|
||||
// PhysicsAnimatorTestUtils posts the cancellation to the main thread so we need to wait
|
||||
|
||||
Reference in New Issue
Block a user