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

Commit 031d4a36 authored by Sergey Serokurov's avatar Sergey Serokurov Committed by Automerger Merge Worker
Browse files

Merge "Update stack position after a bubble is removed" into tm-dev am: 697c991a

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16994045

Change-Id: I6ae20b9fb6ee859d3c162025dc294263ad119a31
parents 6b3240d0 697c991a
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -1608,7 +1608,9 @@ public class BubbleStackView extends FrameLayout
            Log.d(TAG, "addBubble: " + bubble);
        }

        if (getBubbleCount() == 0 && shouldShowStackEdu()) {
        final boolean firstBubble = getBubbleCount() == 0;

        if (firstBubble && shouldShowStackEdu()) {
            // Override the default stack position if we're showing user education.
            mStackAnimationController.setStackPosition(mPositioner.getDefaultStartPosition());
        }
@@ -1621,7 +1623,7 @@ public class BubbleStackView extends FrameLayout
                new FrameLayout.LayoutParams(mPositioner.getBubbleSize(),
                        mPositioner.getBubbleSize()));

        if (getBubbleCount() == 0) {
        if (firstBubble) {
            mStackOnLeftOrWillBe = mStackAnimationController.isStackOnLeftSide();
        }
        // Set the dot position to the opposite of the side the stack is resting on, since the stack
@@ -1652,6 +1654,10 @@ public class BubbleStackView extends FrameLayout
                    bubble.cleanupViews();
                }
                updateExpandedView();
                if (getBubbleCount() == 0 && !isExpanded()) {
                    // This is the last bubble and the stack is collapsed
                    updateStackPosition();
                }
                logBubbleEvent(bubble, FrameworkStatsLog.BUBBLE_UICHANGED__ACTION__DISMISSED);
                return;
            }