Loading core/java/android/view/InputChannel.java +7 −0 Original line number Diff line number Diff line Loading @@ -110,6 +110,13 @@ public final class InputChannel implements Parcelable { return name != null ? name : "uninitialized"; } /** * @hide */ public boolean isValid() { return mPtr != 0; } /** * Disposes the input channel. * Explicitly releases the reference this object is holding on the input channel. Loading core/java/android/view/ViewRootImpl.java +2 −5 Original line number Diff line number Diff line Loading @@ -851,10 +851,7 @@ public final class ViewRootImpl implements ViewParent, // manager, to make sure we do the relayout before receiving // any other events from the system. requestLayout(); if ((mWindowAttributes.inputFeatures & WindowManager.LayoutParams.INPUT_FEATURE_NO_INPUT_CHANNEL) == 0) { mInputChannel = new InputChannel(); } mForceDecorViewVisibility = (mWindowAttributes.privateFlags & PRIVATE_FLAG_FORCE_DECOR_VIEW_VISIBILITY) != 0; try { Loading Loading @@ -947,7 +944,7 @@ public final class ViewRootImpl implements ViewParent, mInputQueueCallback = ((RootViewSurfaceTaker)view).willYouTakeTheInputQueue(); } if (mInputChannel != null) { if (mInputChannel.isValid()) { if (mInputQueueCallback != null) { mInputQueue = new InputQueue(); mInputQueueCallback.onInputQueueCreated(mInputQueue); Loading services/core/java/com/android/server/wm/WindowManagerService.java +7 −2 Original line number Diff line number Diff line Loading @@ -1441,8 +1441,13 @@ public class WindowManagerService extends IWindowManager.Stub return res; } final boolean openInputChannels = (outInputChannel != null boolean openInputChannels = (outInputChannel != null && (attrs.inputFeatures & INPUT_FEATURE_NO_INPUT_CHANNEL) == 0); if (callingUid != SYSTEM_UID) { Slog.e(TAG_WM, "App trying to use insecure INPUT_FEATURE_NO_INPUT_CHANNEL flag. Ignoring"); openInputChannels = true; } if (openInputChannels) { win.openInputChannel(outInputChannel); } Loading Loading
core/java/android/view/InputChannel.java +7 −0 Original line number Diff line number Diff line Loading @@ -110,6 +110,13 @@ public final class InputChannel implements Parcelable { return name != null ? name : "uninitialized"; } /** * @hide */ public boolean isValid() { return mPtr != 0; } /** * Disposes the input channel. * Explicitly releases the reference this object is holding on the input channel. Loading
core/java/android/view/ViewRootImpl.java +2 −5 Original line number Diff line number Diff line Loading @@ -851,10 +851,7 @@ public final class ViewRootImpl implements ViewParent, // manager, to make sure we do the relayout before receiving // any other events from the system. requestLayout(); if ((mWindowAttributes.inputFeatures & WindowManager.LayoutParams.INPUT_FEATURE_NO_INPUT_CHANNEL) == 0) { mInputChannel = new InputChannel(); } mForceDecorViewVisibility = (mWindowAttributes.privateFlags & PRIVATE_FLAG_FORCE_DECOR_VIEW_VISIBILITY) != 0; try { Loading Loading @@ -947,7 +944,7 @@ public final class ViewRootImpl implements ViewParent, mInputQueueCallback = ((RootViewSurfaceTaker)view).willYouTakeTheInputQueue(); } if (mInputChannel != null) { if (mInputChannel.isValid()) { if (mInputQueueCallback != null) { mInputQueue = new InputQueue(); mInputQueueCallback.onInputQueueCreated(mInputQueue); Loading
services/core/java/com/android/server/wm/WindowManagerService.java +7 −2 Original line number Diff line number Diff line Loading @@ -1441,8 +1441,13 @@ public class WindowManagerService extends IWindowManager.Stub return res; } final boolean openInputChannels = (outInputChannel != null boolean openInputChannels = (outInputChannel != null && (attrs.inputFeatures & INPUT_FEATURE_NO_INPUT_CHANNEL) == 0); if (callingUid != SYSTEM_UID) { Slog.e(TAG_WM, "App trying to use insecure INPUT_FEATURE_NO_INPUT_CHANNEL flag. Ignoring"); openInputChannels = true; } if (openInputChannels) { win.openInputChannel(outInputChannel); } Loading