From c5b7502174159dc4519e2a0c3ba340522adf0575 Mon Sep 17 00:00:00 2001 From: Linus Tufvesson Date: Mon, 13 Dec 2021 16:53:50 +0000 Subject: [PATCH] Make Splash-screens touch opaque Test: Manually verified that touches will no longer pass through the StartingSurface to the ActivityRecordInputSink Bug: 194480991 Bug: 208659130 Change-Id: Ib695718623481b5d376a8b221048c69a73c923a1 --- .../wm/shell/startingsurface/StartingSurfaceDrawer.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingSurfaceDrawer.java b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingSurfaceDrawer.java index 73f65b08a7eb6..f69c27e749e4e 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingSurfaceDrawer.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingSurfaceDrawer.java @@ -269,16 +269,12 @@ public class StartingSurfaceDrawer { // touchable or focusable by the user. We also add in the ALT_FOCUSABLE_IM // flag because we do know that the next window will take input // focus, so we want to get the IME window up on top of us right away. - windowFlags |= WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE - | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE + windowFlags |= WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM; params.flags = windowFlags; params.token = appToken; params.packageName = activityInfo.packageName; params.privateFlags |= WindowManager.LayoutParams.SYSTEM_FLAG_SHOW_FOR_ALL_USERS; - // Setting as trusted overlay to let touches pass through. This is safe because this - // window is controlled by the system. - params.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_TRUSTED_OVERLAY; if (!context.getResources().getCompatibilityInfo().supportsScreen()) { params.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_COMPATIBLE_WINDOW;