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

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

Merge "Persist the launcher keep clear area." into tm-qpr-dev am: edf1ca06...

Merge "Persist the launcher keep clear area." into tm-qpr-dev am: edf1ca06 am: d4c5eac3 am: c1dfe6f6

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



Change-Id: Ib866208c0581afc313e33ca1414ffc03e2689acf
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 1281f025 c1dfe6f6
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -104,7 +104,6 @@ import com.android.wm.shell.sysui.UserChangeListener;
import com.android.wm.shell.transition.Transitions;

import java.io.PrintWriter;
import java.util.HashSet;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
@@ -119,6 +118,8 @@ public class PipController implements PipTransitionController.PipTransitionCallb
        UserChangeListener {
    private static final String TAG = "PipController";

    private static final String LAUNCHER_KEEP_CLEAR_AREA_TAG = "hotseat";

    private static final long PIP_KEEP_CLEAR_AREAS_DELAY =
            SystemProperties.getLong("persist.wm.debug.pip_keep_clear_areas_delay", 200);

@@ -934,12 +935,10 @@ public class PipController implements PipTransitionController.PipTransitionCallb
                    0, mPipBoundsState.getDisplayBounds().bottom - height,
                    mPipBoundsState.getDisplayBounds().right,
                    mPipBoundsState.getDisplayBounds().bottom);
            Set<Rect> restrictedKeepClearAreas = new HashSet<>(
                    mPipBoundsState.getRestrictedKeepClearAreas());
            restrictedKeepClearAreas.add(rect);
            mPipBoundsState.setKeepClearAreas(restrictedKeepClearAreas,
                    mPipBoundsState.getUnrestrictedKeepClearAreas());
            mPipBoundsState.addNamedUnrestrictedKeepClearArea(LAUNCHER_KEEP_CLEAR_AREA_TAG, rect);
            updatePipPositionForKeepClearAreas();
        } else {
            mPipBoundsState.removeNamedUnrestrictedKeepClearArea(LAUNCHER_KEEP_CLEAR_AREA_TAG);
        }
    }