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

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

Merge "Fix usage of temporary restricted keep clear area for hotseat" into...

Merge "Fix usage of temporary restricted keep clear area for hotseat" into udc-qpr-dev am: 5b5df31e

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



Change-Id: I1580d79863e67b43bd4e5fb9220d51c998957d3b
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents b3fbc5dd 5b5df31e
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -352,6 +352,10 @@ public class PipController implements PipTransitionController.PipTransitionCallb
                            mMainExecutor.executeDelayed(
                                    mMovePipInResponseToKeepClearAreasChangeCallback,
                                    PIP_KEEP_CLEAR_AREAS_DELAY);

                            ProtoLog.d(ShellProtoLogGroup.WM_SHELL_PICTURE_IN_PICTURE,
                                    "onKeepClearAreasChanged: restricted=%s, unrestricted=%s",
                                    restricted, unrestricted);
                        }
                    }
                }
@@ -950,6 +954,8 @@ public class PipController implements PipTransitionController.PipTransitionCallb
    }

    private void setLauncherKeepClearAreaHeight(boolean visible, int height) {
        ProtoLog.d(ShellProtoLogGroup.WM_SHELL_PICTURE_IN_PICTURE,
                "setLauncherKeepClearAreaHeight: visible=%b, height=%d", visible, height);
        if (visible) {
            Rect rect = new Rect(
                    0, mPipBoundsState.getDisplayBounds().bottom - height,
@@ -1007,9 +1013,10 @@ public class PipController implements PipTransitionController.PipTransitionCallb
            int launcherRotation, Rect hotseatKeepClearArea) {

        if (mEnablePipKeepClearAlgorithm) {
            // pre-emptively add the keep clear area for Hotseat, so that it is taken into account
            // preemptively add the keep clear area for Hotseat, so that it is taken into account
            // when calculating the entry destination bounds of PiP window
            mPipBoundsState.getRestrictedKeepClearAreas().add(hotseatKeepClearArea);
            mPipBoundsState.addNamedUnrestrictedKeepClearArea(LAUNCHER_KEEP_CLEAR_AREA_TAG,
                    hotseatKeepClearArea);
        } else {
            int shelfHeight = hotseatKeepClearArea.height();
            setShelfHeightLocked(shelfHeight > 0 /* visible */, shelfHeight);