Loading core/java/android/view/IWindowSession.aidl +4 −2 Original line number Diff line number Diff line Loading @@ -296,9 +296,11 @@ interface IWindowSession { /** * Request the server to call setInputWindowInfo on a given Surface, and return * an input channel where the client can receive input. * an input channel where the client can receive input. For windows, the clientToken should be * the IWindow binder object. For other requests, the token can be any unique IBinder token to * be used as unique identifier. */ void grantInputChannel(int displayId, in SurfaceControl surface, in IWindow window, void grantInputChannel(int displayId, in SurfaceControl surface, in IBinder clientToken, in IBinder hostInputToken, int flags, int privateFlags, int inputFeatures, int type, in IBinder windowToken, in IBinder focusGrantToken, String inputHandleName, out InputChannel outInputChannel); Loading core/java/android/view/InputWindowHandle.java +4 −18 Original line number Diff line number Diff line Loading @@ -83,15 +83,11 @@ public final class InputWindowHandle { public IBinder token; /** * The {@link IWindow} handle if InputWindowHandle is associated with a window, null otherwise. * The {@link IBinder} handle if InputWindowHandle is associated with a client token, * normally the IWindow token, null otherwise. */ @Nullable private IBinder windowToken; /** * Used to cache IWindow from the windowToken so we don't need to convert every time getWindow * is called. */ private IWindow window; // The window name. public String name; Loading Loading @@ -181,7 +177,6 @@ public final class InputWindowHandle { inputApplicationHandle = new InputApplicationHandle(other.inputApplicationHandle); token = other.token; windowToken = other.windowToken; window = other.window; name = other.name; layoutParamsFlags = other.layoutParamsFlags; layoutParamsType = other.layoutParamsType; Loading Loading @@ -249,23 +244,14 @@ public final class InputWindowHandle { touchableRegionSurfaceControl = new WeakReference<>(bounds); } public void setWindowToken(IWindow iwindow) { windowToken = iwindow.asBinder(); window = iwindow; public void setWindowToken(IBinder iwindow) { windowToken = iwindow; } public @Nullable IBinder getWindowToken() { return windowToken; } public IWindow getWindow() { if (window != null) { return window; } window = IWindow.Stub.asInterface(windowToken); return window; } /** * Set the provided inputConfig flag values. * @param inputConfig the flag values to change Loading core/java/android/view/WindowlessWindowManager.java +5 −5 Original line number Diff line number Diff line Loading @@ -228,14 +228,14 @@ public class WindowlessWindowManager implements IWindowSession { if (mRealWm instanceof IWindowSession.Stub) { mRealWm.grantInputChannel(displayId, new SurfaceControl(sc, "WindowlessWindowManager.addToDisplay"), window, mHostInputToken, attrs.flags, attrs.privateFlags, window.asBinder(), mHostInputToken, attrs.flags, attrs.privateFlags, attrs.inputFeatures, attrs.type, attrs.token, state.mInputTransferToken, attrs.getTitle().toString(), outInputChannel); } else { mRealWm.grantInputChannel(displayId, sc, window, mHostInputToken, attrs.flags, attrs.privateFlags, attrs.inputFeatures, attrs.type, attrs.token, state.mInputTransferToken, attrs.getTitle().toString(), mRealWm.grantInputChannel(displayId, sc, window.asBinder(), mHostInputToken, attrs.flags, attrs.privateFlags, attrs.inputFeatures, attrs.type, attrs.token, state.mInputTransferToken, attrs.getTitle().toString(), outInputChannel); } state.mInputChannelToken = Loading Loading @@ -592,7 +592,7 @@ public class WindowlessWindowManager implements IWindowSession { List<Rect> unrestrictedRects) {} @Override public void grantInputChannel(int displayId, SurfaceControl surface, IWindow window, public void grantInputChannel(int displayId, SurfaceControl surface, IBinder clientToken, IBinder hostInputToken, int flags, int privateFlags, int inputFeatures, int type, IBinder windowToken, IBinder focusGrantToken, String inputHandleName, InputChannel outInputChannel) { Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DragResizeInputListener.java +2 −2 Original line number Diff line number Diff line Loading @@ -120,7 +120,7 @@ class DragResizeInputListener implements AutoCloseable { mWindowSession.grantInputChannel( mDisplayId, mDecorationSurface, mFakeWindow, mFakeWindow.asBinder(), null /* hostInputToken */, FLAG_NOT_FOCUSABLE, PRIVATE_FLAG_TRUSTED_OVERLAY, Loading Loading @@ -155,7 +155,7 @@ class DragResizeInputListener implements AutoCloseable { mWindowSession.grantInputChannel( mDisplayId, mInputSinkSurface, mFakeSinkWindow, mFakeSinkWindow.asBinder(), null /* hostInputToken */, FLAG_NOT_FOCUSABLE, 0 /* privateFlags */, Loading services/core/java/com/android/server/wm/AccessibilityController.java +1 −1 Original line number Diff line number Diff line Loading @@ -558,7 +558,7 @@ final class AccessibilityController { } if (newTarget != null) { int displayId = newTarget.getDisplayId(); IBinder clientBinder = newTarget.getIWindow().asBinder(); IBinder clientBinder = newTarget.getWindowToken(); mFocusedWindow.put(displayId, clientBinder); } } Loading Loading
core/java/android/view/IWindowSession.aidl +4 −2 Original line number Diff line number Diff line Loading @@ -296,9 +296,11 @@ interface IWindowSession { /** * Request the server to call setInputWindowInfo on a given Surface, and return * an input channel where the client can receive input. * an input channel where the client can receive input. For windows, the clientToken should be * the IWindow binder object. For other requests, the token can be any unique IBinder token to * be used as unique identifier. */ void grantInputChannel(int displayId, in SurfaceControl surface, in IWindow window, void grantInputChannel(int displayId, in SurfaceControl surface, in IBinder clientToken, in IBinder hostInputToken, int flags, int privateFlags, int inputFeatures, int type, in IBinder windowToken, in IBinder focusGrantToken, String inputHandleName, out InputChannel outInputChannel); Loading
core/java/android/view/InputWindowHandle.java +4 −18 Original line number Diff line number Diff line Loading @@ -83,15 +83,11 @@ public final class InputWindowHandle { public IBinder token; /** * The {@link IWindow} handle if InputWindowHandle is associated with a window, null otherwise. * The {@link IBinder} handle if InputWindowHandle is associated with a client token, * normally the IWindow token, null otherwise. */ @Nullable private IBinder windowToken; /** * Used to cache IWindow from the windowToken so we don't need to convert every time getWindow * is called. */ private IWindow window; // The window name. public String name; Loading Loading @@ -181,7 +177,6 @@ public final class InputWindowHandle { inputApplicationHandle = new InputApplicationHandle(other.inputApplicationHandle); token = other.token; windowToken = other.windowToken; window = other.window; name = other.name; layoutParamsFlags = other.layoutParamsFlags; layoutParamsType = other.layoutParamsType; Loading Loading @@ -249,23 +244,14 @@ public final class InputWindowHandle { touchableRegionSurfaceControl = new WeakReference<>(bounds); } public void setWindowToken(IWindow iwindow) { windowToken = iwindow.asBinder(); window = iwindow; public void setWindowToken(IBinder iwindow) { windowToken = iwindow; } public @Nullable IBinder getWindowToken() { return windowToken; } public IWindow getWindow() { if (window != null) { return window; } window = IWindow.Stub.asInterface(windowToken); return window; } /** * Set the provided inputConfig flag values. * @param inputConfig the flag values to change Loading
core/java/android/view/WindowlessWindowManager.java +5 −5 Original line number Diff line number Diff line Loading @@ -228,14 +228,14 @@ public class WindowlessWindowManager implements IWindowSession { if (mRealWm instanceof IWindowSession.Stub) { mRealWm.grantInputChannel(displayId, new SurfaceControl(sc, "WindowlessWindowManager.addToDisplay"), window, mHostInputToken, attrs.flags, attrs.privateFlags, window.asBinder(), mHostInputToken, attrs.flags, attrs.privateFlags, attrs.inputFeatures, attrs.type, attrs.token, state.mInputTransferToken, attrs.getTitle().toString(), outInputChannel); } else { mRealWm.grantInputChannel(displayId, sc, window, mHostInputToken, attrs.flags, attrs.privateFlags, attrs.inputFeatures, attrs.type, attrs.token, state.mInputTransferToken, attrs.getTitle().toString(), mRealWm.grantInputChannel(displayId, sc, window.asBinder(), mHostInputToken, attrs.flags, attrs.privateFlags, attrs.inputFeatures, attrs.type, attrs.token, state.mInputTransferToken, attrs.getTitle().toString(), outInputChannel); } state.mInputChannelToken = Loading Loading @@ -592,7 +592,7 @@ public class WindowlessWindowManager implements IWindowSession { List<Rect> unrestrictedRects) {} @Override public void grantInputChannel(int displayId, SurfaceControl surface, IWindow window, public void grantInputChannel(int displayId, SurfaceControl surface, IBinder clientToken, IBinder hostInputToken, int flags, int privateFlags, int inputFeatures, int type, IBinder windowToken, IBinder focusGrantToken, String inputHandleName, InputChannel outInputChannel) { Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DragResizeInputListener.java +2 −2 Original line number Diff line number Diff line Loading @@ -120,7 +120,7 @@ class DragResizeInputListener implements AutoCloseable { mWindowSession.grantInputChannel( mDisplayId, mDecorationSurface, mFakeWindow, mFakeWindow.asBinder(), null /* hostInputToken */, FLAG_NOT_FOCUSABLE, PRIVATE_FLAG_TRUSTED_OVERLAY, Loading Loading @@ -155,7 +155,7 @@ class DragResizeInputListener implements AutoCloseable { mWindowSession.grantInputChannel( mDisplayId, mInputSinkSurface, mFakeSinkWindow, mFakeSinkWindow.asBinder(), null /* hostInputToken */, FLAG_NOT_FOCUSABLE, 0 /* privateFlags */, Loading
services/core/java/com/android/server/wm/AccessibilityController.java +1 −1 Original line number Diff line number Diff line Loading @@ -558,7 +558,7 @@ final class AccessibilityController { } if (newTarget != null) { int displayId = newTarget.getDisplayId(); IBinder clientBinder = newTarget.getIWindow().asBinder(); IBinder clientBinder = newTarget.getWindowToken(); mFocusedWindow.put(displayId, clientBinder); } } Loading