Loading core/java/android/view/InputChannel.java +7 −0 Original line number Diff line number Diff line Loading @@ -103,6 +103,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 @@ -627,10 +627,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 @@ -719,7 +716,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/location/GnssLocationProvider.java +3 −0 Original line number Diff line number Diff line Loading @@ -1069,6 +1069,9 @@ public class GnssLocationProvider implements LocationProviderInterface { } private void handleUpdateLocation(Location location) { if (location.isFromMockProvider()) { return; } if (location.hasAccuracy()) { native_inject_location(location.getLatitude(), location.getLongitude(), location.getAccuracy()); Loading services/core/java/com/android/server/policy/PhoneWindowManager.java +19 −6 Original line number Diff line number Diff line Loading @@ -6349,8 +6349,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { @Override public void run() { synchronized (mScreenshotLock) { if (mScreenshotConnection != null) { mContext.unbindService(mScreenshotConnection); mScreenshotConnection = null; resetScreenshotConnection(); notifyScreenshotError(); } } Loading Loading @@ -6382,8 +6381,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { public void handleMessage(Message msg) { synchronized (mScreenshotLock) { if (mScreenshotConnection == myConn) { mContext.unbindService(mScreenshotConnection); mScreenshotConnection = null; resetScreenshotConnection(); mHandler.removeCallbacks(mScreenshotTimeout); } } Loading @@ -6406,8 +6404,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { public void onServiceDisconnected(ComponentName name) { synchronized (mScreenshotLock) { if (mScreenshotConnection != null) { mContext.unbindService(mScreenshotConnection); mScreenshotConnection = null; resetScreenshotConnection(); mHandler.removeCallbacks(mScreenshotTimeout); notifyScreenshotError(); } Loading Loading @@ -6467,6 +6464,16 @@ public class PhoneWindowManager implements WindowManagerPolicy { } } /** * Reset the screenshot connection. */ private void resetScreenshotConnection() { if (mScreenshotConnection != null) { mContext.unbindService(mScreenshotConnection); mScreenshotConnection = null; } } /** {@inheritDoc} */ @Override public int interceptKeyBeforeQueueing(KeyEvent event, int policyFlags) { Loading Loading @@ -7285,6 +7292,12 @@ public class PhoneWindowManager implements WindowManagerPolicy { mLastSystemUiFlags = 0; updateSystemUiVisibilityLw(); } // close the screenshot connection on user switch so that screenshots // are always started with the correct user's context synchronized(mScreenshotLock) { resetScreenshotConnection(); } } } }; Loading services/core/java/com/android/server/wm/WindowManagerService.java +7 −2 Original line number Diff line number Diff line Loading @@ -2082,8 +2082,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 != Process.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 @@ -103,6 +103,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 @@ -627,10 +627,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 @@ -719,7 +716,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/location/GnssLocationProvider.java +3 −0 Original line number Diff line number Diff line Loading @@ -1069,6 +1069,9 @@ public class GnssLocationProvider implements LocationProviderInterface { } private void handleUpdateLocation(Location location) { if (location.isFromMockProvider()) { return; } if (location.hasAccuracy()) { native_inject_location(location.getLatitude(), location.getLongitude(), location.getAccuracy()); Loading
services/core/java/com/android/server/policy/PhoneWindowManager.java +19 −6 Original line number Diff line number Diff line Loading @@ -6349,8 +6349,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { @Override public void run() { synchronized (mScreenshotLock) { if (mScreenshotConnection != null) { mContext.unbindService(mScreenshotConnection); mScreenshotConnection = null; resetScreenshotConnection(); notifyScreenshotError(); } } Loading Loading @@ -6382,8 +6381,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { public void handleMessage(Message msg) { synchronized (mScreenshotLock) { if (mScreenshotConnection == myConn) { mContext.unbindService(mScreenshotConnection); mScreenshotConnection = null; resetScreenshotConnection(); mHandler.removeCallbacks(mScreenshotTimeout); } } Loading @@ -6406,8 +6404,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { public void onServiceDisconnected(ComponentName name) { synchronized (mScreenshotLock) { if (mScreenshotConnection != null) { mContext.unbindService(mScreenshotConnection); mScreenshotConnection = null; resetScreenshotConnection(); mHandler.removeCallbacks(mScreenshotTimeout); notifyScreenshotError(); } Loading Loading @@ -6467,6 +6464,16 @@ public class PhoneWindowManager implements WindowManagerPolicy { } } /** * Reset the screenshot connection. */ private void resetScreenshotConnection() { if (mScreenshotConnection != null) { mContext.unbindService(mScreenshotConnection); mScreenshotConnection = null; } } /** {@inheritDoc} */ @Override public int interceptKeyBeforeQueueing(KeyEvent event, int policyFlags) { Loading Loading @@ -7285,6 +7292,12 @@ public class PhoneWindowManager implements WindowManagerPolicy { mLastSystemUiFlags = 0; updateSystemUiVisibilityLw(); } // close the screenshot connection on user switch so that screenshots // are always started with the correct user's context synchronized(mScreenshotLock) { resetScreenshotConnection(); } } } }; Loading
services/core/java/com/android/server/wm/WindowManagerService.java +7 −2 Original line number Diff line number Diff line Loading @@ -2082,8 +2082,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 != Process.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