diff options
| author | TreeHugger Robot <treehugger-gerrit@google.com> | 2021-06-14 18:52:24 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2021-06-14 18:52:24 +0000 |
| commit | 9088f944c24e709656d413ecd88046bd9696018e (patch) | |
| tree | c23064beae67136e1b15e0e04232120526ec493a | |
| parent | a262629f885915133c569fd69a2b05ad353611ce (diff) | |
| parent | 97f7e3d486a3bb5f61aecb81f32093145c5540d9 (diff) | |
Merge "Apply PIP exclusion region only if in PIP mode" into sc-dev
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/navigationbar/gestural/EdgeBackGestureHandler.java | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/gestural/EdgeBackGestureHandler.java b/packages/SystemUI/src/com/android/systemui/navigationbar/gestural/EdgeBackGestureHandler.java index 004b3e5ac956..0d9749e05262 100644 --- a/packages/SystemUI/src/com/android/systemui/navigationbar/gestural/EdgeBackGestureHandler.java +++ b/packages/SystemUI/src/com/android/systemui/navigationbar/gestural/EdgeBackGestureHandler.java @@ -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); |
