diff options
| author | 2022-06-20 13:36:04 +0000 | |
|---|---|---|
| committer | 2022-06-20 13:36:04 +0000 | |
| commit | eb681f393e2d0bf867e0fc21a779076802d506ce (patch) | |
| tree | 6e3773cb8fc460c04c7671a9e7a894dc77bddaa4 | |
| parent | 7107a2390f73b4c6ea5eebfe23553d75d2ca27e0 (diff) | |
| parent | 4152749ca476aebd9c244cda2301dae0f91d6352 (diff) | |
Merge "Merge SQ3A.220605.009"
| -rw-r--r-- | services/core/java/com/android/server/wm/DisplayPolicy.java | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/wm/DisplayPolicy.java b/services/core/java/com/android/server/wm/DisplayPolicy.java index 9e87a172101f..ac0d747f490c 100644 --- a/services/core/java/com/android/server/wm/DisplayPolicy.java +++ b/services/core/java/com/android/server/wm/DisplayPolicy.java @@ -188,6 +188,7 @@ public class DisplayPolicy { private static final String TAG = TAG_WITH_CLASS_NAME ? "DisplayPolicy" : TAG_WM; private static final boolean ALTERNATE_CAR_MODE_NAV_SIZE = false; + private static final boolean LEGACY_TASKBAR_GESTURE_INSETS = false; // The panic gesture may become active only after the keyguard is dismissed and the immersive // app shows again. If that doesn't happen for 30s we drop the gesture. @@ -1275,6 +1276,35 @@ public class DisplayPolicy { if (!INSETS_LAYOUT_GENERALIZATION) { mDisplayContent.setInsetProvider(insetsType, win, null, imeFrameProvider); + if (LEGACY_TASKBAR_GESTURE_INSETS) { + if (mNavigationBar == null && (insetsType == ITYPE_NAVIGATION_BAR + || insetsType == ITYPE_EXTRA_NAVIGATION_BAR)) { + mDisplayContent.setInsetProvider(ITYPE_LEFT_GESTURES, win, + (displayFrames, windowState, inOutFrame) -> { + final int leftSafeInset = + Math.max(displayFrames.mDisplayCutoutSafe + .left, + 0); + inOutFrame.left = 0; + inOutFrame.top = 0; + inOutFrame.bottom = displayFrames.mDisplayHeight; + inOutFrame.right = + leftSafeInset + mLeftGestureInset; + }); + mDisplayContent.setInsetProvider(ITYPE_RIGHT_GESTURES, win, + (displayFrames, windowState, inOutFrame) -> { + final int rightSafeInset = + Math.min(displayFrames.mDisplayCutoutSafe + .right, + displayFrames.mUnrestricted.right); + inOutFrame.left = + rightSafeInset - mRightGestureInset; + inOutFrame.top = 0; + inOutFrame.bottom = displayFrames.mDisplayHeight; + inOutFrame.right = displayFrames.mDisplayWidth; + }); + } + } } else { mDisplayContent.setInsetProvider(insetsType, win, (displayFrames, windowState, inOutFrame) -> inOutFrame.inset( |