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

Commit 14a8e9a3 authored by Mady Mellor's avatar Mady Mellor Committed by Automerger Merge Worker
Browse files

Merge "Fix an issue where stack education and the stack weren't aligned" into tm-dev am: 4db1adb6

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

Change-Id: I219585a3924241045b49abe1f704d5e28ada0758
parents 76919175 4db1adb6
Loading
Loading
Loading
Loading
+11 −5
Original line number Diff line number Diff line
@@ -899,7 +899,7 @@ public class BubbleStackView extends FrameLayout
                    mStackAnimationController.updateResources();
                    mBubbleOverflow.updateResources();

                    if (mRelativeStackPositionBeforeRotation != null) {
                    if (!isStackEduShowing() && mRelativeStackPositionBeforeRotation != null) {
                        mStackAnimationController.setStackPosition(
                                mRelativeStackPositionBeforeRotation);
                        mRelativeStackPositionBeforeRotation = null;
@@ -1200,6 +1200,8 @@ public class BubbleStackView extends FrameLayout
            addView(mStackEduView);
        }
        mBubbleContainer.bringToFront();
        // Ensure the stack is in the correct spot
        mStackAnimationController.setStackPosition(mPositioner.getDefaultStartPosition());
        return mStackEduView.show(mPositioner.getDefaultStartPosition());
    }

@@ -1214,6 +1216,8 @@ public class BubbleStackView extends FrameLayout
            mStackEduView = new StackEducationView(mContext, mPositioner, mBubbleController);
            addView(mStackEduView);
            mBubbleContainer.bringToFront(); // Stack appears on top of the stack education
            // Ensure the stack is in the correct spot
            mStackAnimationController.setStackPosition(mPositioner.getDefaultStartPosition());
            mStackEduView.show(mPositioner.getDefaultStartPosition());
        }
        if (mManageEduView != null && mManageEduView.getVisibility() == VISIBLE) {
@@ -1331,10 +1335,12 @@ public class BubbleStackView extends FrameLayout
        mStackAnimationController.updateResources();
        mDismissView.updateResources();
        mMagneticTarget.setMagneticFieldRadiusPx(mBubbleSize * 2);
        if (!isStackEduShowing()) {
            mStackAnimationController.setStackPosition(
                    new RelativeStackPosition(
                            mPositioner.getRestingPosition(),
                            mStackAnimationController.getAllowableStackPositionRegion()));
        }
        if (mIsExpanded) {
            updateExpandedView();
        }
+1 −1
Original line number Diff line number Diff line
@@ -122,7 +122,7 @@ class StackEducationView constructor(
     * If necessary, shows the user education view for the bubble stack. This appears the first
     * time a user taps on a bubble.
     *
     * @return true if user education was shown, false otherwise.
     * @return true if user education was shown and wasn't showing before, false otherwise.
     */
    fun show(stackPosition: PointF): Boolean {
        isHiding = false