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

Commit a3829297 authored by Wale Ogunwale's avatar Wale Ogunwale Committed by android-build-merger
Browse files

Merge "Defer showing pip menu activity until pip animation ends" into oc-dev

am: d2ec5a62

Change-Id: I2413fae7813f795c6e88c225dc6b8fc1964eee52
parents 60c9403f d2ec5a62
Loading
Loading
Loading
Loading
+8 −2
Original line number Original line Diff line number Diff line
@@ -78,6 +78,7 @@ public class PipTouchHandler implements TunerService.Tunable {
    private final PipDismissViewController mDismissViewController;
    private final PipDismissViewController mDismissViewController;
    private final PipSnapAlgorithm mSnapAlgorithm;
    private final PipSnapAlgorithm mSnapAlgorithm;
    private final AccessibilityManager mAccessibilityManager;
    private final AccessibilityManager mAccessibilityManager;
    private boolean mShowPipMenuOnAnimationEnd = false;


    // The current movement bounds
    // The current movement bounds
    private Rect mMovementBounds = new Rect();
    private Rect mMovementBounds = new Rect();
@@ -221,13 +222,18 @@ public class PipTouchHandler implements TunerService.Tunable {
            setMinimizedStateInternal(false);
            setMinimizedStateInternal(false);
        }
        }
        mDismissViewController.destroyDismissTarget();
        mDismissViewController.destroyDismissTarget();
        mMenuController.showMenu(MENU_STATE_CLOSE, mMotionHelper.getBounds(),
        mShowPipMenuOnAnimationEnd = true;
                mMovementBounds, true /* allowMenuTimeout */);
    }
    }


    public void onPinnedStackAnimationEnded() {
    public void onPinnedStackAnimationEnded() {
        // Always synchronize the motion helper bounds once PiP animations finish
        // Always synchronize the motion helper bounds once PiP animations finish
        mMotionHelper.synchronizePinnedStackBounds();
        mMotionHelper.synchronizePinnedStackBounds();

        if (mShowPipMenuOnAnimationEnd) {
            mMenuController.showMenu(MENU_STATE_CLOSE, mMotionHelper.getBounds(),
                    mMovementBounds, true /* allowMenuTimeout */);
            mShowPipMenuOnAnimationEnd = false;
        }
    }
    }


    @Override
    @Override