From 620ee47b2a9466364ea8ff8ac31782e63342f4fb Mon Sep 17 00:00:00 2001 From: Siarhei Vishniakou Date: Mon, 8 Nov 2021 14:19:30 -0800 Subject: Mark screen decorations as trusted overlays These decorations set flag_slippery, to cover the unlikely event of user tapping a screen decor and then not able to send this touch gesture to the neighboring window. Bug: 157929241 Test: `adb shell dumpsys input` and make sure that ScreenDecorOverlay and ScreeDecorOverlayBottom have FLAG_SLIPPERY Change-Id: Ib276764edcf1acffe94e3db7397fd23aaaa5dbaa Merged-In: Ib276764edcf1acffe94e3db7397fd23aaaa5dbaa (cherry picked from commit 8eca1d561568b038b3f257f1d31ed94fdec5b719) --- packages/SystemUI/src/com/android/systemui/ScreenDecorations.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java b/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java index 7861211e802d..b167750c63e8 100644 --- a/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java +++ b/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java @@ -436,6 +436,9 @@ public class ScreenDecorations extends SystemUI implements Tunable { lp.privateFlags |= WindowManager.LayoutParams.SYSTEM_FLAG_SHOW_FOR_ALL_USERS | WindowManager.LayoutParams.PRIVATE_FLAG_NO_MOVE_ANIMATION; + // FLAG_SLIPPERY can only be set by trusted overlays + lp.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_TRUSTED_OVERLAY; + if (!DEBUG_SCREENSHOT_ROUNDED_CORNERS) { lp.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_IS_ROUNDED_CORNERS_OVERLAY; } -- cgit v1.2.3-59-g8ed1b