diff options
| author | Chris Ye <lzye@google.com> | 2020-05-10 15:07:31 -0700 |
|---|---|---|
| committer | Chris Ye <lzye@google.com> | 2020-05-19 10:51:56 -0700 |
| commit | 535a128dc1a53a7958926070dd7d6eebfdb172dd (patch) | |
| tree | 9e624f69524dec941a9c4d40aefbaecf56586fd9 /core/java/android/view/WindowlessWindowManager.java | |
| parent | 1eee66b8ea2ee95690ca97f79ce935ec42d4dbdc (diff) | |
Change InputWindowInfo::isTrustedOverlay() to be permission and flag based
Add private flag to WindowManager.LayoutParams. If the flag is set,
check if caller has INTERNAL_SYSTEM_WINDOW permission.
Bug: 155781676
Test: atest WindowManagerServiceTests
Change-Id: I70151697cc01e8427129f951f0ebadc4805b2d56
Diffstat (limited to 'core/java/android/view/WindowlessWindowManager.java')
| -rw-r--r-- | core/java/android/view/WindowlessWindowManager.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/core/java/android/view/WindowlessWindowManager.java b/core/java/android/view/WindowlessWindowManager.java index d20ffb3a6ec1..e8803cf1f820 100644 --- a/core/java/android/view/WindowlessWindowManager.java +++ b/core/java/android/view/WindowlessWindowManager.java @@ -116,7 +116,8 @@ public class WindowlessWindowManager implements IWindowSession { if (state.mInputChannelToken != null) { try { mRealWm.updateInputChannel(state.mInputChannelToken, state.mDisplayId, - state.mSurfaceControl, state.mParams.flags, state.mInputRegion); + state.mSurfaceControl, state.mParams.flags, state.mParams.privateFlags, + state.mInputRegion); } catch (RemoteException e) { Log.e(TAG, "Failed to update surface input channel: ", e); } @@ -143,7 +144,7 @@ public class WindowlessWindowManager implements IWindowSession { WindowManager.LayoutParams.INPUT_FEATURE_NO_INPUT_CHANNEL) == 0)) { try { mRealWm.grantInputChannel(displayId, sc, window, mHostInputToken, attrs.flags, - attrs.type, outInputChannel); + attrs.privateFlags, attrs.type, outInputChannel); } catch (RemoteException e) { Log.e(TAG, "Failed to grant input to surface: ", e); } @@ -262,7 +263,7 @@ public class WindowlessWindowManager implements IWindowSession { && state.mInputChannelToken != null) { try { mRealWm.updateInputChannel(state.mInputChannelToken, state.mDisplayId, sc, - attrs.flags, state.mInputRegion); + attrs.flags, attrs.privateFlags, state.mInputRegion); } catch (RemoteException e) { Log.e(TAG, "Failed to update surface input channel: ", e); } @@ -432,12 +433,13 @@ public class WindowlessWindowManager implements IWindowSession { @Override public void grantInputChannel(int displayId, SurfaceControl surface, IWindow window, - IBinder hostInputToken, int flags, int type, InputChannel outInputChannel) { + IBinder hostInputToken, int flags, int privateFlags, int type, + InputChannel outInputChannel) { } @Override public void updateInputChannel(IBinder channelToken, int displayId, SurfaceControl surface, - int flags, Region region) { + int flags, int privateFlags, Region region) { } @Override |
