Loading core/java/android/view/IWindowSession.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -298,7 +298,7 @@ interface IWindowSession { */ void grantInputChannel(int displayId, in SurfaceControl surface, in IWindow window, in IBinder hostInputToken, int flags, int privateFlags, int type, in IBinder focusGrantToken, out InputChannel outInputChannel); in IBinder focusGrantToken, String inputHandleName, out InputChannel outInputChannel); /** * Update the flags on an input channel associated with a particular surface. Loading core/java/android/view/WindowlessWindowManager.java +7 −6 Original line number Diff line number Diff line Loading @@ -164,10 +164,11 @@ public class WindowlessWindowManager implements IWindowSession { mRealWm.grantInputChannel(displayId, new SurfaceControl(sc, "WindowlessWindowManager.addToDisplay"), window, mHostInputToken, attrs.flags, attrs.privateFlags, attrs.type, mFocusGrantToken, outInputChannel); mFocusGrantToken, attrs.getTitle().toString(), outInputChannel); } else { mRealWm.grantInputChannel(displayId, sc, window, mHostInputToken, attrs.flags, attrs.privateFlags, attrs.type, mFocusGrantToken, outInputChannel); attrs.privateFlags, attrs.type, mFocusGrantToken, attrs.getTitle().toString(), outInputChannel); } } catch (RemoteException e) { Log.e(TAG, "Failed to grant input to surface: ", e); Loading Loading @@ -485,7 +486,7 @@ public class WindowlessWindowManager implements IWindowSession { @Override public void grantInputChannel(int displayId, SurfaceControl surface, IWindow window, IBinder hostInputToken, int flags, int privateFlags, int type, IBinder focusGrantToken, InputChannel outInputChannel) { String inputHandleName, InputChannel outInputChannel) { } @Override Loading services/core/java/com/android/server/wm/EmbeddedWindowController.java +7 −5 Original line number Diff line number Diff line Loading @@ -156,6 +156,7 @@ class EmbeddedWindowController { final IWindow mClient; @Nullable final WindowState mHostWindowState; @Nullable final ActivityRecord mHostActivityRecord; final String mName; final int mOwnerUid; final int mOwnerPid; final WindowManagerService mWmService; Loading Loading @@ -186,7 +187,7 @@ class EmbeddedWindowController { */ EmbeddedWindow(Session session, WindowManagerService service, IWindow clientToken, WindowState hostWindowState, int ownerUid, int ownerPid, int windowType, int displayId, IBinder focusGrantToken) { int displayId, IBinder focusGrantToken, String inputHandleName) { mSession = session; mWmService = service; mClient = clientToken; Loading @@ -198,14 +199,15 @@ class EmbeddedWindowController { mWindowType = windowType; mDisplayId = displayId; mFocusGrantToken = focusGrantToken; final String hostWindowName = (mHostWindowState != null) ? "-" + mHostWindowState.getWindowTag().toString() : ""; mName = "Embedded{" + inputHandleName + hostWindowName + "}"; } @Override public String toString() { final String hostWindowName = (mHostWindowState != null) ? mHostWindowState.getWindowTag().toString() : "Internal"; return "EmbeddedWindow{ u" + UserHandle.getUserId(mOwnerUid) + " " + hostWindowName + "}"; return mName; } InputApplicationHandle getApplicationHandle() { Loading services/core/java/com/android/server/wm/Session.java +3 −2 Original line number Diff line number Diff line Loading @@ -837,7 +837,7 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient { @Override public void grantInputChannel(int displayId, SurfaceControl surface, IWindow window, IBinder hostInputToken, int flags, int privateFlags, int type, IBinder focusGrantToken, InputChannel outInputChannel) { IBinder focusGrantToken, String inputHandleName, InputChannel outInputChannel) { if (hostInputToken == null && !mCanAddInternalSystemWindow) { // Callers without INTERNAL_SYSTEM_WINDOW permission cannot grant input channel to // embedded windows without providing a host window input token Loading @@ -853,7 +853,8 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient { try { mService.grantInputChannel(this, mUid, mPid, displayId, surface, window, hostInputToken, flags, mCanAddInternalSystemWindow ? privateFlags : 0, mCanAddInternalSystemWindow ? type : 0, focusGrantToken, outInputChannel); mCanAddInternalSystemWindow ? type : 0, focusGrantToken, inputHandleName, outInputChannel); } finally { Binder.restoreCallingIdentity(identity); } Loading services/core/java/com/android/server/wm/WindowManagerService.java +4 −4 Original line number Diff line number Diff line Loading @@ -8344,7 +8344,7 @@ public class WindowManagerService extends IWindowManager.Stub void grantInputChannel(Session session, int callingUid, int callingPid, int displayId, SurfaceControl surface, IWindow window, IBinder hostInputToken, int flags, int privateFlags, int type, IBinder focusGrantToken, InputChannel outInputChannel) { String inputHandleName, InputChannel outInputChannel) { final InputApplicationHandle applicationHandle; final String name; final InputChannel clientChannel; Loading @@ -8352,7 +8352,7 @@ public class WindowManagerService extends IWindowManager.Stub EmbeddedWindowController.EmbeddedWindow win = new EmbeddedWindowController.EmbeddedWindow(session, this, window, mInputToWindowMap.get(hostInputToken), callingUid, callingPid, type, displayId, focusGrantToken); displayId, focusGrantToken, inputHandleName); clientChannel = win.openInputChannel(); mEmbeddedWindowController.add(clientChannel.getToken(), win); applicationHandle = win.getApplicationHandle(); Loading Loading
core/java/android/view/IWindowSession.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -298,7 +298,7 @@ interface IWindowSession { */ void grantInputChannel(int displayId, in SurfaceControl surface, in IWindow window, in IBinder hostInputToken, int flags, int privateFlags, int type, in IBinder focusGrantToken, out InputChannel outInputChannel); in IBinder focusGrantToken, String inputHandleName, out InputChannel outInputChannel); /** * Update the flags on an input channel associated with a particular surface. Loading
core/java/android/view/WindowlessWindowManager.java +7 −6 Original line number Diff line number Diff line Loading @@ -164,10 +164,11 @@ public class WindowlessWindowManager implements IWindowSession { mRealWm.grantInputChannel(displayId, new SurfaceControl(sc, "WindowlessWindowManager.addToDisplay"), window, mHostInputToken, attrs.flags, attrs.privateFlags, attrs.type, mFocusGrantToken, outInputChannel); mFocusGrantToken, attrs.getTitle().toString(), outInputChannel); } else { mRealWm.grantInputChannel(displayId, sc, window, mHostInputToken, attrs.flags, attrs.privateFlags, attrs.type, mFocusGrantToken, outInputChannel); attrs.privateFlags, attrs.type, mFocusGrantToken, attrs.getTitle().toString(), outInputChannel); } } catch (RemoteException e) { Log.e(TAG, "Failed to grant input to surface: ", e); Loading Loading @@ -485,7 +486,7 @@ public class WindowlessWindowManager implements IWindowSession { @Override public void grantInputChannel(int displayId, SurfaceControl surface, IWindow window, IBinder hostInputToken, int flags, int privateFlags, int type, IBinder focusGrantToken, InputChannel outInputChannel) { String inputHandleName, InputChannel outInputChannel) { } @Override Loading
services/core/java/com/android/server/wm/EmbeddedWindowController.java +7 −5 Original line number Diff line number Diff line Loading @@ -156,6 +156,7 @@ class EmbeddedWindowController { final IWindow mClient; @Nullable final WindowState mHostWindowState; @Nullable final ActivityRecord mHostActivityRecord; final String mName; final int mOwnerUid; final int mOwnerPid; final WindowManagerService mWmService; Loading Loading @@ -186,7 +187,7 @@ class EmbeddedWindowController { */ EmbeddedWindow(Session session, WindowManagerService service, IWindow clientToken, WindowState hostWindowState, int ownerUid, int ownerPid, int windowType, int displayId, IBinder focusGrantToken) { int displayId, IBinder focusGrantToken, String inputHandleName) { mSession = session; mWmService = service; mClient = clientToken; Loading @@ -198,14 +199,15 @@ class EmbeddedWindowController { mWindowType = windowType; mDisplayId = displayId; mFocusGrantToken = focusGrantToken; final String hostWindowName = (mHostWindowState != null) ? "-" + mHostWindowState.getWindowTag().toString() : ""; mName = "Embedded{" + inputHandleName + hostWindowName + "}"; } @Override public String toString() { final String hostWindowName = (mHostWindowState != null) ? mHostWindowState.getWindowTag().toString() : "Internal"; return "EmbeddedWindow{ u" + UserHandle.getUserId(mOwnerUid) + " " + hostWindowName + "}"; return mName; } InputApplicationHandle getApplicationHandle() { Loading
services/core/java/com/android/server/wm/Session.java +3 −2 Original line number Diff line number Diff line Loading @@ -837,7 +837,7 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient { @Override public void grantInputChannel(int displayId, SurfaceControl surface, IWindow window, IBinder hostInputToken, int flags, int privateFlags, int type, IBinder focusGrantToken, InputChannel outInputChannel) { IBinder focusGrantToken, String inputHandleName, InputChannel outInputChannel) { if (hostInputToken == null && !mCanAddInternalSystemWindow) { // Callers without INTERNAL_SYSTEM_WINDOW permission cannot grant input channel to // embedded windows without providing a host window input token Loading @@ -853,7 +853,8 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient { try { mService.grantInputChannel(this, mUid, mPid, displayId, surface, window, hostInputToken, flags, mCanAddInternalSystemWindow ? privateFlags : 0, mCanAddInternalSystemWindow ? type : 0, focusGrantToken, outInputChannel); mCanAddInternalSystemWindow ? type : 0, focusGrantToken, inputHandleName, outInputChannel); } finally { Binder.restoreCallingIdentity(identity); } Loading
services/core/java/com/android/server/wm/WindowManagerService.java +4 −4 Original line number Diff line number Diff line Loading @@ -8344,7 +8344,7 @@ public class WindowManagerService extends IWindowManager.Stub void grantInputChannel(Session session, int callingUid, int callingPid, int displayId, SurfaceControl surface, IWindow window, IBinder hostInputToken, int flags, int privateFlags, int type, IBinder focusGrantToken, InputChannel outInputChannel) { String inputHandleName, InputChannel outInputChannel) { final InputApplicationHandle applicationHandle; final String name; final InputChannel clientChannel; Loading @@ -8352,7 +8352,7 @@ public class WindowManagerService extends IWindowManager.Stub EmbeddedWindowController.EmbeddedWindow win = new EmbeddedWindowController.EmbeddedWindow(session, this, window, mInputToWindowMap.get(hostInputToken), callingUid, callingPid, type, displayId, focusGrantToken); displayId, focusGrantToken, inputHandleName); clientChannel = win.openInputChannel(); mEmbeddedWindowController.add(clientChannel.getToken(), win); applicationHandle = win.getApplicationHandle(); Loading