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

Commit 1418bcd8 authored by Jorge Gil's avatar Jorge Gil Committed by Automerger Merge Worker
Browse files

Merge "Check that PIP is active before setting the PIP exclusion bounds" into sc-dev am: 2363bb81

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

Change-Id: I3c6e8f80467140aeb3fb9de3114c2248bbd13d5d
parents 4204ba06 2363bb81
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -73,6 +73,7 @@ public class PipTouchHandler {
    // Allow PIP to resize to a slightly bigger state upon touch
    private boolean mEnableResize;
    private final Context mContext;
    private final PipTaskOrganizer mPipTaskOrganizer;
    private final PipBoundsAlgorithm mPipBoundsAlgorithm;
    private final @NonNull PipBoundsState mPipBoundsState;
    private final PipUiEventLogger mPipUiEventLogger;
@@ -169,6 +170,7 @@ public class PipTouchHandler {
        mContext = context;
        mMainExecutor = mainExecutor;
        mAccessibilityManager = context.getSystemService(AccessibilityManager.class);
        mPipTaskOrganizer = pipTaskOrganizer;
        mPipBoundsAlgorithm = pipBoundsAlgorithm;
        mPipBoundsState = pipBoundsState;
        mMenuController = menuController;
@@ -982,7 +984,9 @@ public class PipTouchHandler {

    void setPipExclusionBoundsChangeListener(Consumer<Rect> pipExclusionBoundsChangeListener) {
        mPipExclusionBoundsChangeListener = new WeakReference<>(pipExclusionBoundsChangeListener);
        pipExclusionBoundsChangeListener.accept(mPipBoundsState.getBounds());
        pipExclusionBoundsChangeListener.accept(mPipTaskOrganizer.isInPip()
                ? mPipBoundsState.getBounds() : new Rect());

    }

    /**