From d3f17d7df7ca571265c134a0c72e254108d84b76 Mon Sep 17 00:00:00 2001 From: arthurhung Date: Fri, 8 May 2020 17:20:38 +0800 Subject: Pass window type to the InputWindowHandle of embedded window A windowless SurfaceControl could grant input via IWindowSession.grantInputChannel, but other window may receive the obscured events because of the type value of input window is always 0. The obscured or partially obscured flag indicates that the window received this motion event is wholly or partially obscured by another visible window above it. We have to filter out the trusted overlap so the motion event could properly dispatch to the view if it is a security sensitive application. Bug: 156063505 Test: enter split window mode and check the motion event Change-Id: I10f63ea131a70ee8cc7d5c4b3e5ca4e5f06fdbad --- core/java/android/view/WindowlessWindowManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/java/android/view/WindowlessWindowManager.java') diff --git a/core/java/android/view/WindowlessWindowManager.java b/core/java/android/view/WindowlessWindowManager.java index cd954c41f469..d20ffb3a6ec1 100644 --- a/core/java/android/view/WindowlessWindowManager.java +++ b/core/java/android/view/WindowlessWindowManager.java @@ -143,7 +143,7 @@ public class WindowlessWindowManager implements IWindowSession { WindowManager.LayoutParams.INPUT_FEATURE_NO_INPUT_CHANNEL) == 0)) { try { mRealWm.grantInputChannel(displayId, sc, window, mHostInputToken, attrs.flags, - outInputChannel); + attrs.type, outInputChannel); } catch (RemoteException e) { Log.e(TAG, "Failed to grant input to surface: ", e); } @@ -432,7 +432,7 @@ public class WindowlessWindowManager implements IWindowSession { @Override public void grantInputChannel(int displayId, SurfaceControl surface, IWindow window, - IBinder hostInputToken, int flags, InputChannel outInputChannel) { + IBinder hostInputToken, int flags, int type, InputChannel outInputChannel) { } @Override -- cgit v1.2.3