Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit de9b1df6 authored by Liran Binyamin's avatar Liran Binyamin Committed by Android (Google) Code Review
Browse files

Merge "Remove BubbleBarView.mIsAnimatingNewBubble" into main

parents a0397781 09c2ad24
Loading
Loading
Loading
Loading
+3 −23
Original line number Diff line number Diff line
@@ -124,8 +124,6 @@ public class BubbleBarView extends FrameLayout {

    private final BubbleBarBackground mBubbleBarBackground;

    private boolean mIsAnimatingNewBubble = false;

    /**
     * The current bounds of all the bubble bar. Note that these bounds may not account for
     * translation. The bounds should be retrieved using {@link #getBubbleBarBounds()} which
@@ -714,16 +712,6 @@ public class BubbleBarView extends FrameLayout {
        return mRelativePivotY;
    }

    /** Notifies the bubble bar that a new bubble animation is starting. */
    public void onAnimatingBubbleStarted() {
        mIsAnimatingNewBubble = true;
    }

    /** Notifies the bubble bar that a new bubble animation is complete. */
    public void onAnimatingBubbleCompleted() {
        mIsAnimatingNewBubble = false;
    }

    /** Add a new bubble to the bubble bar. */
    public void addBubble(BubbleView bubble) {
        FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams((int) mIconSize, (int) mIconSize,
@@ -1353,9 +1341,7 @@ public class BubbleBarView extends FrameLayout {

    @Override
    public boolean onInterceptTouchEvent(MotionEvent ev) {
        if (mIsAnimatingNewBubble) {
            mController.onBubbleBarTouchedWhileAnimating();
        }
        mController.onBubbleBarTouched();
        if (!mIsBarExpanded) {
            // When the bar is collapsed, all taps on it should expand it.
            return true;
@@ -1363,11 +1349,6 @@ public class BubbleBarView extends FrameLayout {
        return super.onInterceptTouchEvent(ev);
    }

    /** Whether a new bubble is currently animating. */
    public boolean isAnimatingNewBubble() {
        return mIsAnimatingNewBubble;
    }

    private boolean hasOverflow() {
        // Overflow is always the last bubble
        View lastChild = getChildAt(getChildCount() - 1);
@@ -1500,7 +1481,6 @@ public class BubbleBarView extends FrameLayout {
            pw.println("    bubble key: " + key);
        }
        pw.println("  isExpanded: " + isExpanded());
        pw.println("  mIsAnimatingNewBubble: " + mIsAnimatingNewBubble);
        if (mBubbleAnimator != null) {
            pw.println("  mBubbleAnimator.isRunning(): " + mBubbleAnimator.isRunning());
            pw.println("  mBubbleAnimator is null");
@@ -1525,8 +1505,8 @@ public class BubbleBarView extends FrameLayout {
        /** Returns the translation Y that the bubble bar should have. */
        float getBubbleBarTranslationY();

        /** Notifies the controller that the bubble bar was touched while it was animating. */
        void onBubbleBarTouchedWhileAnimating();
        /** Notifies the controller that the bubble bar was touched. */
        void onBubbleBarTouched();

        /** Requests the controller to expand bubble bar */
        void expandBubbleBar();
+14 −8
Original line number Diff line number Diff line
@@ -144,8 +144,8 @@ public class BubbleBarViewController {
            }

            @Override
            public void onBubbleBarTouchedWhileAnimating() {
                BubbleBarViewController.this.onBubbleBarTouchedWhileAnimating();
            public void onBubbleBarTouched() {
                BubbleBarViewController.this.onBubbleBarTouched();
            }

            @Override
@@ -206,9 +206,12 @@ public class BubbleBarViewController {
        }
    }

    private void onBubbleBarTouchedWhileAnimating() {
    private void onBubbleBarTouched() {
        if (isAnimatingNewBubble()) {
            mBubbleBarViewAnimator.onBubbleBarTouchedWhileAnimating();
        mBubbleStashController.onNewBubbleAnimationInterrupted(false, mBarView.getTranslationY());
            mBubbleStashController.onNewBubbleAnimationInterrupted(false,
                    mBarView.getTranslationY());
        }
    }

    private void expandBubbleBar() {
@@ -307,8 +310,11 @@ public class BubbleBarViewController {

    /** Whether a new bubble is animating. */
    public boolean isAnimatingNewBubble() {
        return mBarView.isAnimatingNewBubble()
                || (mBubbleBarViewAnimator != null && mBubbleBarViewAnimator.hasAnimatingBubble());
        return mBubbleBarViewAnimator != null && mBubbleBarViewAnimator.isAnimating();
    }

    public boolean isNewBubbleAnimationRunningOrPending() {
        return mBubbleBarViewAnimator != null && mBubbleBarViewAnimator.hasAnimation();
    }

    /** The horizontal margin of the bubble bar from the edge of the screen. */
@@ -652,7 +658,7 @@ public class BubbleBarViewController {
     * from SystemUI.
     */
    public void setExpandedFromSysui(boolean isExpanded) {
        if (isAnimatingNewBubble() && isExpanded) {
        if (isNewBubbleAnimationRunningOrPending() && isExpanded) {
            mBubbleBarViewAnimator.expandedWhileAnimating();
            return;
        }
+7 −10
Original line number Diff line number Diff line
@@ -43,7 +43,13 @@ constructor(
    private val bubbleBarBounceDistanceInPx =
        bubbleBarView.resources.getDimensionPixelSize(R.dimen.bubblebar_bounce_distance)

    fun hasAnimatingBubble() = animatingBubble != null
    fun hasAnimation() = animatingBubble != null

    val isAnimating: Boolean
        get() {
            val animatingBubble = animatingBubble ?: return false
            return animatingBubble.state != AnimatingBubble.State.CREATED
        }

    private companion object {
        /** The time to show the flyout. */
@@ -157,7 +163,6 @@ constructor(
    private fun buildHandleToBubbleBarAnimation() = Runnable {
        moveToState(AnimatingBubble.State.ANIMATING_IN)
        // prepare the bubble bar for the animation
        bubbleBarView.onAnimatingBubbleStarted()
        bubbleBarView.visibility = VISIBLE
        bubbleBarView.alpha = 0f
        bubbleBarView.translationY = 0f
@@ -304,7 +309,6 @@ constructor(
        animator.addEndListener { _, _, _, canceled, _, _, _ ->
            animatingBubble = null
            if (!canceled) bubbleStashController.stashBubbleBarImmediate()
            bubbleBarView.onAnimatingBubbleCompleted()
            bubbleBarView.relativePivotY = 1f
            bubbleStashController.updateTaskbarTouchRegion()
        }
@@ -330,7 +334,6 @@ constructor(
                Runnable {
                    animatingBubble = null
                    bubbleStashController.showBubbleBarImmediate()
                    bubbleBarView.onAnimatingBubbleCompleted()
                    bubbleStashController.updateTaskbarTouchRegion()
                }
            }
@@ -343,7 +346,6 @@ constructor(
    private fun buildBubbleBarSpringInAnimation() = Runnable {
        moveToState(AnimatingBubble.State.ANIMATING_IN)
        // prepare the bubble bar for the animation
        bubbleBarView.onAnimatingBubbleStarted()
        bubbleBarView.translationY = bubbleBarView.height.toFloat()
        bubbleBarView.visibility = VISIBLE
        bubbleBarView.alpha = 1f
@@ -382,7 +384,6 @@ constructor(
        val hideAnimation = Runnable {
            animatingBubble = null
            bubbleStashController.showBubbleBarImmediate()
            bubbleBarView.onAnimatingBubbleCompleted()
            bubbleStashController.updateTaskbarTouchRegion()
        }
        animatingBubble =
@@ -398,7 +399,6 @@ constructor(
     */
    private fun buildBubbleBarBounceAnimation() = Runnable {
        moveToState(AnimatingBubble.State.ANIMATING_IN)
        bubbleBarView.onAnimatingBubbleStarted()
        val ty = bubbleStashController.bubbleBarTranslationY

        val springBackAnimation = PhysicsAnimator.getInstance(bubbleBarView)
@@ -429,7 +429,6 @@ constructor(
        bubbleStashController.getStashedHandlePhysicsAnimator().cancelIfRunning()
        val hideAnimation = animatingBubble?.hideAnimation ?: return
        scheduler.cancel(hideAnimation)
        bubbleBarView.onAnimatingBubbleCompleted()
        bubbleBarView.relativePivotY = 1f
        animatingBubble = null
    }
@@ -440,7 +439,6 @@ constructor(
        scheduler.cancel(hideAnimation)
        animatingBubble = null
        bubbleStashController.getStashedHandlePhysicsAnimator().cancelIfRunning()
        bubbleBarView.onAnimatingBubbleCompleted()
        bubbleBarView.relativePivotY = 1f
        bubbleStashController.onNewBubbleAnimationInterrupted(
            /* isStashed= */ bubbleBarView.alpha == 0f,
@@ -462,7 +460,6 @@ constructor(
        val hideAnimation = animatingBubble?.hideAnimation ?: return
        scheduler.cancel(hideAnimation)
        animatingBubble = null
        bubbleBarView.onAnimatingBubbleCompleted()
        bubbleBarView.relativePivotY = 1f
        bubbleStashController.showBubbleBarImmediate()
    }
+33 −33
Original line number Diff line number Diff line
@@ -98,7 +98,7 @@ class BubbleBarViewAnimatorTest {
        assertThat(bubbleBarView.scaleX).isEqualTo(1)
        assertThat(bubbleBarView.scaleY).isEqualTo(1)
        assertThat(bubbleBarView.translationY).isEqualTo(BAR_TRANSLATION_Y_FOR_TASKBAR)
        assertThat(bubbleBarView.isAnimatingNewBubble).isTrue()
        assertThat(animator.isAnimating).isTrue()

        // execute the hide bubble animation
        assertThat(animatorScheduler.delayedBlock).isNotNull()
@@ -111,7 +111,7 @@ class BubbleBarViewAnimatorTest {
        assertThat(handle.alpha).isEqualTo(1)
        assertThat(handle.translationY).isEqualTo(0)
        assertThat(bubbleBarView.alpha).isEqualTo(0)
        assertThat(bubbleBarView.isAnimatingNewBubble).isFalse()
        assertThat(animator.isAnimating).isFalse()
        verify(bubbleStashController).stashBubbleBarImmediate()
    }

@@ -142,7 +142,7 @@ class BubbleBarViewAnimatorTest {
        assertThat(bubbleBarView.scaleX).isEqualTo(1)
        assertThat(bubbleBarView.scaleY).isEqualTo(1)
        assertThat(bubbleBarView.translationY).isEqualTo(BAR_TRANSLATION_Y_FOR_TASKBAR)
        assertThat(bubbleBarView.isAnimatingNewBubble).isTrue()
        assertThat(animator.isAnimating).isTrue()

        verify(bubbleStashController, atLeastOnce()).updateTaskbarTouchRegion()

@@ -155,7 +155,7 @@ class BubbleBarViewAnimatorTest {
        assertThat(bubbleBarView.alpha).isEqualTo(1)
        assertThat(bubbleBarView.visibility).isEqualTo(VISIBLE)
        assertThat(bubbleBarView.translationY).isEqualTo(BAR_TRANSLATION_Y_FOR_TASKBAR)
        assertThat(bubbleBarView.isAnimatingNewBubble).isFalse()
        assertThat(animator.isAnimating).isFalse()
    }

    @Test
@@ -179,7 +179,7 @@ class BubbleBarViewAnimatorTest {
        PhysicsAnimatorTestUtils.blockUntilFirstAnimationFrameWhereTrue(handleAnimator) { true }

        handleAnimator.assertIsRunning()
        assertThat(bubbleBarView.isAnimatingNewBubble).isTrue()
        assertThat(animator.isAnimating).isTrue()
        // verify the hide bubble animation is pending
        assertThat(animatorScheduler.delayedBlock).isNotNull()

@@ -189,7 +189,7 @@ class BubbleBarViewAnimatorTest {

        // verify that the hide animation was canceled
        assertThat(animatorScheduler.delayedBlock).isNull()
        assertThat(bubbleBarView.isAnimatingNewBubble).isFalse()
        assertThat(animator.isAnimating).isFalse()
        verify(bubbleStashController).onNewBubbleAnimationInterrupted(any(), any())

        // PhysicsAnimatorTestUtils posts the cancellation to the main thread so we need to wait
@@ -230,7 +230,7 @@ class BubbleBarViewAnimatorTest {
            animator.onStashStateChangingWhileAnimating()
        }

        assertThat(bubbleBarView.isAnimatingNewBubble).isFalse()
        assertThat(animator.isAnimating).isFalse()
        verify(bubbleStashController).onNewBubbleAnimationInterrupted(any(), any())

        // PhysicsAnimatorTestUtils posts the cancellation to the main thread so we need to wait
@@ -260,12 +260,12 @@ class BubbleBarViewAnimatorTest {
        PhysicsAnimatorTestUtils.blockUntilFirstAnimationFrameWhereTrue(handleAnimator) { true }

        handleAnimator.assertIsRunning()
        assertThat(bubbleBarView.isAnimatingNewBubble).isTrue()
        assertThat(animator.isAnimating).isTrue()
        assertThat(animatorScheduler.delayedBlock).isNotNull()

        handleAnimator.cancel()
        handleAnimator.assertIsNotRunning()
        assertThat(bubbleBarView.isAnimatingNewBubble).isFalse()
        assertThat(animator.isAnimating).isFalse()
        assertThat(animatorScheduler.delayedBlock).isNull()
    }

@@ -296,7 +296,7 @@ class BubbleBarViewAnimatorTest {
        assertThat(bubbleBarView.scaleX).isEqualTo(1)
        assertThat(bubbleBarView.scaleY).isEqualTo(1)
        assertThat(bubbleBarView.translationY).isEqualTo(BAR_TRANSLATION_Y_FOR_TASKBAR)
        assertThat(bubbleBarView.isAnimatingNewBubble).isFalse()
        assertThat(animator.isAnimating).isFalse()
        assertThat(bubbleBarView.isExpanded).isTrue()

        // verify there is no hide animation
@@ -326,7 +326,7 @@ class BubbleBarViewAnimatorTest {
        PhysicsAnimatorTestUtils.blockUntilFirstAnimationFrameWhereTrue(handleAnimator) { true }

        handleAnimator.assertIsRunning()
        assertThat(bubbleBarView.isAnimatingNewBubble).isTrue()
        assertThat(animator.isAnimating).isTrue()
        // verify the hide bubble animation is pending
        assertThat(animatorScheduler.delayedBlock).isNotNull()

@@ -344,7 +344,7 @@ class BubbleBarViewAnimatorTest {
        assertThat(handle.translationY)
            .isEqualTo(DIFF_BETWEEN_HANDLE_AND_BAR_CENTERS + BAR_TRANSLATION_Y_FOR_TASKBAR)
        verifyBubbleBarIsExpandedWithTranslation(BAR_TRANSLATION_Y_FOR_TASKBAR)
        assertThat(bubbleBarView.isAnimatingNewBubble).isFalse()
        assertThat(animator.isAnimating).isFalse()
    }

    @Test
@@ -368,7 +368,7 @@ class BubbleBarViewAnimatorTest {
        // wait for the animation to end
        PhysicsAnimatorTestUtils.blockUntilAnimationsEnd(DynamicAnimation.TRANSLATION_Y)

        assertThat(bubbleBarView.isAnimatingNewBubble).isTrue()
        assertThat(animator.isAnimating).isTrue()
        // verify the hide bubble animation is pending
        assertThat(animatorScheduler.delayedBlock).isNotNull()

@@ -383,7 +383,7 @@ class BubbleBarViewAnimatorTest {
        assertThat(handle.translationY)
            .isEqualTo(DIFF_BETWEEN_HANDLE_AND_BAR_CENTERS + BAR_TRANSLATION_Y_FOR_TASKBAR)
        verifyBubbleBarIsExpandedWithTranslation(BAR_TRANSLATION_Y_FOR_TASKBAR)
        assertThat(bubbleBarView.isAnimatingNewBubble).isFalse()
        assertThat(animator.isAnimating).isFalse()
    }

    @Test
@@ -410,7 +410,7 @@ class BubbleBarViewAnimatorTest {
        PhysicsAnimatorTestUtils.blockUntilAnimationsEnd(DynamicAnimation.TRANSLATION_Y)

        barAnimator.assertIsNotRunning()
        assertThat(bubbleBarView.isAnimatingNewBubble).isTrue()
        assertThat(animator.isAnimating).isTrue()
        assertThat(bubbleBarView.alpha).isEqualTo(1)
        assertThat(bubbleBarView.translationY).isEqualTo(BAR_TRANSLATION_Y_FOR_TASKBAR)

@@ -421,7 +421,7 @@ class BubbleBarViewAnimatorTest {
        PhysicsAnimatorTestUtils.blockUntilAnimationsEnd(DynamicAnimation.TRANSLATION_Y)

        InstrumentationRegistry.getInstrumentation().waitForIdleSync()
        assertThat(bubbleBarView.isAnimatingNewBubble).isFalse()
        assertThat(animator.isAnimating).isFalse()
        assertThat(bubbleBarView.alpha).isEqualTo(0)
        assertThat(handle.translationY).isEqualTo(0)
        assertThat(handle.alpha).isEqualTo(1)
@@ -453,7 +453,7 @@ class BubbleBarViewAnimatorTest {
        PhysicsAnimatorTestUtils.blockUntilAnimationsEnd(DynamicAnimation.TRANSLATION_Y)

        barAnimator.assertIsNotRunning()
        assertThat(bubbleBarView.isAnimatingNewBubble).isFalse()
        assertThat(animator.isAnimating).isFalse()
        assertThat(bubbleBarView.alpha).isEqualTo(1)
        assertThat(bubbleBarView.translationY).isEqualTo(BAR_TRANSLATION_Y_FOR_TASKBAR)

@@ -481,14 +481,14 @@ class BubbleBarViewAnimatorTest {
        PhysicsAnimatorTestUtils.blockUntilAnimationsEnd(DynamicAnimation.TRANSLATION_Y)

        barAnimator.assertIsNotRunning()
        assertThat(bubbleBarView.isAnimatingNewBubble).isTrue()
        assertThat(animator.isAnimating).isTrue()
        assertThat(bubbleBarView.alpha).isEqualTo(1)
        assertThat(bubbleBarView.translationY).isEqualTo(BAR_TRANSLATION_Y_FOR_HOTSEAT)

        assertThat(animatorScheduler.delayedBlock).isNotNull()
        InstrumentationRegistry.getInstrumentation().runOnMainSync(animatorScheduler.delayedBlock!!)

        assertThat(bubbleBarView.isAnimatingNewBubble).isFalse()
        assertThat(animator.isAnimating).isFalse()
        assertThat(bubbleBarView.alpha).isEqualTo(1)
        assertThat(bubbleBarView.translationY).isEqualTo(BAR_TRANSLATION_Y_FOR_HOTSEAT)

@@ -516,7 +516,7 @@ class BubbleBarViewAnimatorTest {
        PhysicsAnimatorTestUtils.blockUntilFirstAnimationFrameWhereTrue(bubbleBarAnimator) { true }

        bubbleBarAnimator.assertIsRunning()
        assertThat(bubbleBarView.isAnimatingNewBubble).isTrue()
        assertThat(animator.isAnimating).isTrue()
        // verify the hide bubble animation is pending
        assertThat(animatorScheduler.delayedBlock).isNotNull()

@@ -531,7 +531,7 @@ class BubbleBarViewAnimatorTest {
        assertThat(animatorScheduler.delayedBlock).isNull()

        verifyBubbleBarIsExpandedWithTranslation(BAR_TRANSLATION_Y_FOR_HOTSEAT)
        assertThat(bubbleBarView.isAnimatingNewBubble).isFalse()
        assertThat(animator.isAnimating).isFalse()
        verify(bubbleStashController).showBubbleBarImmediate()
    }

@@ -553,7 +553,7 @@ class BubbleBarViewAnimatorTest {
        InstrumentationRegistry.getInstrumentation().runOnMainSync {}
        PhysicsAnimatorTestUtils.blockUntilAnimationsEnd(DynamicAnimation.TRANSLATION_Y)

        assertThat(bubbleBarView.isAnimatingNewBubble).isTrue()
        assertThat(animator.isAnimating).isTrue()
        // verify the hide bubble animation is pending
        assertThat(animatorScheduler.delayedBlock).isNotNull()

@@ -565,7 +565,7 @@ class BubbleBarViewAnimatorTest {
        assertThat(animatorScheduler.delayedBlock).isNull()

        verifyBubbleBarIsExpandedWithTranslation(BAR_TRANSLATION_Y_FOR_HOTSEAT)
        assertThat(bubbleBarView.isAnimatingNewBubble).isFalse()
        assertThat(animator.isAnimating).isFalse()
    }

    @Test
@@ -586,7 +586,7 @@ class BubbleBarViewAnimatorTest {

        InstrumentationRegistry.getInstrumentation().runOnMainSync {}
        // verify we started animating
        assertThat(bubbleBarView.isAnimatingNewBubble).isTrue()
        assertThat(animator.isAnimating).isTrue()

        // advance the animation handler by the duration of the initial lift
        InstrumentationRegistry.getInstrumentation().runOnMainSync {
@@ -601,7 +601,7 @@ class BubbleBarViewAnimatorTest {
        assertThat(animatorScheduler.delayedBlock).isNotNull()
        InstrumentationRegistry.getInstrumentation().runOnMainSync(animatorScheduler.delayedBlock!!)

        assertThat(bubbleBarView.isAnimatingNewBubble).isFalse()
        assertThat(animator.isAnimating).isFalse()
        // the bubble bar translation y should be back to its initial value
        assertThat(bubbleBarView.translationY).isEqualTo(BAR_TRANSLATION_Y_FOR_HOTSEAT)

@@ -626,7 +626,7 @@ class BubbleBarViewAnimatorTest {

        InstrumentationRegistry.getInstrumentation().runOnMainSync {}
        // verify we started animating
        assertThat(bubbleBarView.isAnimatingNewBubble).isTrue()
        assertThat(animator.isAnimating).isTrue()

        // advance the animation handler by the duration of the initial lift
        InstrumentationRegistry.getInstrumentation().runOnMainSync {
@@ -641,7 +641,7 @@ class BubbleBarViewAnimatorTest {
        // verify there is no hide animation
        assertThat(animatorScheduler.delayedBlock).isNull()

        assertThat(bubbleBarView.isAnimatingNewBubble).isFalse()
        assertThat(animator.isAnimating).isFalse()
        assertThat(bubbleBarView.translationY).isEqualTo(BAR_TRANSLATION_Y_FOR_HOTSEAT)
        assertThat(bubbleBarView.isExpanded).isTrue()
        verify(bubbleStashController).showBubbleBarImmediate()
@@ -665,7 +665,7 @@ class BubbleBarViewAnimatorTest {

        InstrumentationRegistry.getInstrumentation().runOnMainSync {}
        // verify we started animating
        assertThat(bubbleBarView.isAnimatingNewBubble).isTrue()
        assertThat(animator.isAnimating).isTrue()

        // advance the animation handler by the duration of the initial lift
        InstrumentationRegistry.getInstrumentation().runOnMainSync {
@@ -679,7 +679,7 @@ class BubbleBarViewAnimatorTest {

        // verify there is a pending hide animation
        assertThat(animatorScheduler.delayedBlock).isNotNull()
        assertThat(bubbleBarView.isAnimatingNewBubble).isTrue()
        assertThat(animator.isAnimating).isTrue()

        InstrumentationRegistry.getInstrumentation().runOnMainSync {
            animator.expandedWhileAnimating()
@@ -691,7 +691,7 @@ class BubbleBarViewAnimatorTest {
        // verify that the hide animation was canceled
        assertThat(animatorScheduler.delayedBlock).isNull()

        assertThat(bubbleBarView.isAnimatingNewBubble).isFalse()
        assertThat(animator.isAnimating).isFalse()
        assertThat(bubbleBarView.translationY).isEqualTo(BAR_TRANSLATION_Y_FOR_HOTSEAT)
        assertThat(bubbleBarView.isExpanded).isTrue()
        verify(bubbleStashController).showBubbleBarImmediate()
@@ -715,7 +715,7 @@ class BubbleBarViewAnimatorTest {

        InstrumentationRegistry.getInstrumentation().runOnMainSync {}
        // verify we started animating
        assertThat(bubbleBarView.isAnimatingNewBubble).isTrue()
        assertThat(animator.isAnimating).isTrue()

        // advance the animation handler by the duration of the initial lift
        InstrumentationRegistry.getInstrumentation().runOnMainSync {
@@ -729,7 +729,7 @@ class BubbleBarViewAnimatorTest {

        // verify there is a pending hide animation
        assertThat(animatorScheduler.delayedBlock).isNotNull()
        assertThat(bubbleBarView.isAnimatingNewBubble).isTrue()
        assertThat(animator.isAnimating).isTrue()

        InstrumentationRegistry.getInstrumentation().runOnMainSync {
            animator.expandedWhileAnimating()
@@ -738,7 +738,7 @@ class BubbleBarViewAnimatorTest {
        // verify that the hide animation was canceled
        assertThat(animatorScheduler.delayedBlock).isNull()

        assertThat(bubbleBarView.isAnimatingNewBubble).isFalse()
        assertThat(animator.isAnimating).isFalse()
        assertThat(bubbleBarView.translationY).isEqualTo(BAR_TRANSLATION_Y_FOR_HOTSEAT)
        assertThat(bubbleBarView.isExpanded).isTrue()
        verify(bubbleStashController).showBubbleBarImmediate()