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

Commit 865f6386 authored by Mateusz Cicheński's avatar Mateusz Cicheński Committed by Automerger Merge Worker
Browse files

Merge "Don't move PiP if keyguard is showing or animating." into tm-qpr-dev...

Merge "Don't move PiP if keyguard is showing or animating." into tm-qpr-dev am: de264b42 am: 1057133c

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



Change-Id: I8757fc0e2ddf621b64e212b70641bef56e543cb7
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 240d6326 1057133c
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -163,6 +163,10 @@ public class PipController implements PipTransitionController.PipTransitionCallb
            this::onKeepClearAreasChangedCallback;

    private void onKeepClearAreasChangedCallback() {
        if (mIsKeyguardShowingOrAnimating) {
            // early bail out if the change was caused by keyguard showing up
            return;
        }
        if (!mEnablePipKeepClearAlgorithm) {
            // early bail out if the keep clear areas feature is disabled
            return;
@@ -188,6 +192,10 @@ public class PipController implements PipTransitionController.PipTransitionCallb
            // early bail out if the keep clear areas feature is disabled
            return;
        }
        if (mIsKeyguardShowingOrAnimating) {
            // early bail out if the change was caused by keyguard showing up
            return;
        }
        // only move if we're in PiP or transitioning into PiP
        if (!mPipTransitionState.shouldBlockResizeRequest()) {
            Rect destBounds = mPipKeepClearAlgorithm.adjust(mPipBoundsState,
@@ -639,9 +647,11 @@ public class PipController implements PipTransitionController.PipTransitionCallb
                        DisplayLayout pendingLayout = mDisplayController
                                .getDisplayLayout(mPipDisplayLayoutState.getDisplayId());
                        if (mIsInFixedRotation
                                || mIsKeyguardShowingOrAnimating
                                || pendingLayout.rotation()
                                != mPipBoundsState.getDisplayLayout().rotation()) {
                            // bail out if there is a pending rotation or fixed rotation change
                            // bail out if there is a pending rotation or fixed rotation change or
                            // there's a keyguard present
                            return;
                        }
                        int oldMaxMovementBound = mPipBoundsState.getMovementBounds().bottom;
@@ -936,10 +946,10 @@ public class PipController implements PipTransitionController.PipTransitionCallb
                    mPipBoundsState.getDisplayBounds().right,
                    mPipBoundsState.getDisplayBounds().bottom);
            mPipBoundsState.addNamedUnrestrictedKeepClearArea(LAUNCHER_KEEP_CLEAR_AREA_TAG, rect);
            updatePipPositionForKeepClearAreas();
        } else {
            mPipBoundsState.removeNamedUnrestrictedKeepClearArea(LAUNCHER_KEEP_CLEAR_AREA_TAG);
        }
        updatePipPositionForKeepClearAreas();
    }

    private void setLauncherAppIconSize(int iconSizePx) {