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

Commit 8113aef2 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Apply PIP exclusion region only if in PIP mode" into sc-dev am: 9088f944

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

Change-Id: If85e7ede3a3a5a9402e060f4802b8e69588ae80c
parents c83a4651 9088f944
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -147,6 +147,16 @@ public class EdgeBackGestureHandler extends CurrentUserTracker
                mPackageName = "_UNKNOWN";
            }
        }

        @Override
        public void onActivityPinned(String packageName, int userId, int taskId, int stackId) {
            mIsInPipMode = true;
        }

        @Override
        public void onActivityUnpinned() {
            mIsInPipMode = false;
        }
    };

    private DeviceConfig.OnPropertiesChangedListener mOnPropertiesChangedListener =
@@ -220,6 +230,7 @@ public class EdgeBackGestureHandler extends CurrentUserTracker
    private boolean mIsNavBarShownTransiently;
    private boolean mIsBackGestureAllowed;
    private boolean mGestureBlockingActivityRunning;
    private boolean mIsInPipMode;

    private InputMonitor mInputMonitor;
    private InputChannelCompat.InputEventReceiver mInputEventReceiver;
@@ -636,7 +647,8 @@ public class EdgeBackGestureHandler extends CurrentUserTracker

        // If the point is inside the PiP or Nav bar overlay excluded bounds, then ignore the back
        // gesture
        if (mPipExcludedBounds.contains(x, y) || mNavBarOverlayExcludedBounds.contains(x, y)) {
        final boolean isInsidePip = mIsInPipMode && mPipExcludedBounds.contains(x, y);
        if (isInsidePip || mNavBarOverlayExcludedBounds.contains(x, y)) {
            return false;
        }

@@ -898,6 +910,7 @@ public class EdgeBackGestureHandler extends CurrentUserTracker
        pw.println("  mInRejectedExclusion" + mInRejectedExclusion);
        pw.println("  mExcludeRegion=" + mExcludeRegion);
        pw.println("  mUnrestrictedExcludeRegion=" + mUnrestrictedExcludeRegion);
        pw.println("  mIsInPipMode=" + mIsInPipMode);
        pw.println("  mPipExcludedBounds=" + mPipExcludedBounds);
        pw.println("  mNavBarOverlayExcludedBounds=" + mNavBarOverlayExcludedBounds);
        pw.println("  mEdgeWidthLeft=" + mEdgeWidthLeft);