Loading services/core/java/com/android/server/wm/InputConsumerImpl.java +1 −0 Original line number Diff line number Diff line Loading @@ -86,6 +86,7 @@ class InputConsumerImpl implements IBinder.DeathRecipient { mWindowHandle.ownerUid = Process.myUid(); mWindowHandle.inputFeatures = 0; mWindowHandle.scaleFactor = 1.0f; mWindowHandle.trustedOverlay = true; mInputSurface = mService.makeSurfaceBuilder(mService.mRoot.getDisplayContent(displayId).getSession()) .setContainerLayer() Loading services/core/java/com/android/server/wm/InputMonitor.java +25 −7 Original line number Diff line number Diff line Loading @@ -27,7 +27,18 @@ import static android.view.WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE; import static android.view.WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL; import static android.view.WindowManager.LayoutParams.INPUT_FEATURE_NO_INPUT_CHANNEL; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_DISABLE_WALLPAPER_TOUCH_EVENTS; import static android.view.WindowManager.LayoutParams.TYPE_ACCESSIBILITY_MAGNIFICATION_OVERLAY; import static android.view.WindowManager.LayoutParams.TYPE_ACCESSIBILITY_OVERLAY; import static android.view.WindowManager.LayoutParams.TYPE_DOCK_DIVIDER; import static android.view.WindowManager.LayoutParams.TYPE_INPUT_CONSUMER; import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD; import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD_DIALOG; import static android.view.WindowManager.LayoutParams.TYPE_MAGNIFICATION_OVERLAY; import static android.view.WindowManager.LayoutParams.TYPE_NAVIGATION_BAR; import static android.view.WindowManager.LayoutParams.TYPE_NAVIGATION_BAR_PANEL; import static android.view.WindowManager.LayoutParams.TYPE_NOTIFICATION_SHADE; import static android.view.WindowManager.LayoutParams.TYPE_SECURE_SYSTEM_OVERLAY; import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR; import static android.view.WindowManager.LayoutParams.TYPE_WALLPAPER; import static com.android.server.wm.ProtoLogGroup.WM_DEBUG_FOCUS_LIGHT; Loading Loading @@ -66,9 +77,6 @@ final class InputMonitor { private boolean mUpdateInputWindowsPending; private boolean mUpdateInputWindowsImmediately; // Currently focused input window handle. private InputWindowHandle mFocusedInputWindowHandle; private boolean mDisableWallpaperTouchEvents; private final Rect mTmpRect = new Rect(); private final UpdateInputForAllWindowsConsumer mUpdateInputForAllWindowsConsumer; Loading Loading @@ -310,10 +318,6 @@ final class InputMonitor { Slog.d(TAG_WM, "addInputWindowHandle: " + child + ", " + inputWindowHandle); } if (hasFocus) { mFocusedInputWindowHandle = inputWindowHandle; } } void setUpdateInputWindowsNeededLw() { Loading Loading @@ -572,6 +576,7 @@ final class InputMonitor { inputWindowHandle.portalToDisplayId = INVALID_DISPLAY; inputWindowHandle.touchableRegion.setEmpty(); inputWindowHandle.setTouchableRegionCrop(null); inputWindowHandle.trustedOverlay = isTrustedOverlay(type); } /** Loading @@ -586,4 +591,17 @@ final class InputMonitor { populateOverlayInputInfo(inputWindowHandle, name, TYPE_SECURE_SYSTEM_OVERLAY, true); t.setInputWindowInfo(sc, inputWindowHandle); } static boolean isTrustedOverlay(int type) { return type == TYPE_ACCESSIBILITY_MAGNIFICATION_OVERLAY || type == TYPE_INPUT_METHOD || type == TYPE_INPUT_METHOD_DIALOG || type == TYPE_MAGNIFICATION_OVERLAY || type == TYPE_STATUS_BAR || type == TYPE_NOTIFICATION_SHADE || type == TYPE_NAVIGATION_BAR || type == TYPE_NAVIGATION_BAR_PANEL || type == TYPE_SECURE_SYSTEM_OVERLAY || type == TYPE_DOCK_DIVIDER || type == TYPE_ACCESSIBILITY_OVERLAY || type == TYPE_INPUT_CONSUMER; } } services/core/java/com/android/server/wm/WindowState.java +1 −13 Original line number Diff line number Diff line Loading @@ -62,7 +62,6 @@ import static android.view.WindowManager.LayoutParams.SOFT_INPUT_MASK_ADJUST; import static android.view.WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS; import static android.view.WindowManager.LayoutParams.SYSTEM_FLAG_SHOW_FOR_ALL_USERS; import static android.view.WindowManager.LayoutParams.TYPE_ACCESSIBILITY_MAGNIFICATION_OVERLAY; import static android.view.WindowManager.LayoutParams.TYPE_ACCESSIBILITY_OVERLAY; import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION; import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA; import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA_OVERLAY; Loading @@ -87,7 +86,6 @@ import static android.view.WindowManager.LayoutParams.TYPE_PRIORITY_PHONE; import static android.view.WindowManager.LayoutParams.TYPE_PRIVATE_PRESENTATION; import static android.view.WindowManager.LayoutParams.TYPE_SCREENSHOT; import static android.view.WindowManager.LayoutParams.TYPE_SEARCH_BAR; import static android.view.WindowManager.LayoutParams.TYPE_SECURE_SYSTEM_OVERLAY; import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR; import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR_ADDITIONAL; import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR_SUB_PANEL; Loading Loading @@ -955,17 +953,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP mInputWindowHandle.trustedOverlay = (mAttrs.privateFlags & PRIVATE_FLAG_TRUSTED_OVERLAY) != 0 && mOwnerCanAddInternalSystemWindow; mInputWindowHandle.trustedOverlay |= mAttrs.type == TYPE_ACCESSIBILITY_MAGNIFICATION_OVERLAY || mAttrs.type == TYPE_INPUT_METHOD || mAttrs.type == TYPE_INPUT_METHOD_DIALOG || mAttrs.type == TYPE_MAGNIFICATION_OVERLAY || mAttrs.type == TYPE_STATUS_BAR || mAttrs.type == TYPE_NOTIFICATION_SHADE || mAttrs.type == TYPE_NAVIGATION_BAR || mAttrs.type == TYPE_NAVIGATION_BAR_PANEL || mAttrs.type == TYPE_SECURE_SYSTEM_OVERLAY || mAttrs.type == TYPE_DOCK_DIVIDER || mAttrs.type == TYPE_ACCESSIBILITY_OVERLAY || mAttrs.type == TYPE_INPUT_CONSUMER; mInputWindowHandle.trustedOverlay |= InputMonitor.isTrustedOverlay(mAttrs.type); // Make sure we initial all fields before adding to parentWindow, to prevent exception // during onDisplayChanged. Loading Loading
services/core/java/com/android/server/wm/InputConsumerImpl.java +1 −0 Original line number Diff line number Diff line Loading @@ -86,6 +86,7 @@ class InputConsumerImpl implements IBinder.DeathRecipient { mWindowHandle.ownerUid = Process.myUid(); mWindowHandle.inputFeatures = 0; mWindowHandle.scaleFactor = 1.0f; mWindowHandle.trustedOverlay = true; mInputSurface = mService.makeSurfaceBuilder(mService.mRoot.getDisplayContent(displayId).getSession()) .setContainerLayer() Loading
services/core/java/com/android/server/wm/InputMonitor.java +25 −7 Original line number Diff line number Diff line Loading @@ -27,7 +27,18 @@ import static android.view.WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE; import static android.view.WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL; import static android.view.WindowManager.LayoutParams.INPUT_FEATURE_NO_INPUT_CHANNEL; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_DISABLE_WALLPAPER_TOUCH_EVENTS; import static android.view.WindowManager.LayoutParams.TYPE_ACCESSIBILITY_MAGNIFICATION_OVERLAY; import static android.view.WindowManager.LayoutParams.TYPE_ACCESSIBILITY_OVERLAY; import static android.view.WindowManager.LayoutParams.TYPE_DOCK_DIVIDER; import static android.view.WindowManager.LayoutParams.TYPE_INPUT_CONSUMER; import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD; import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD_DIALOG; import static android.view.WindowManager.LayoutParams.TYPE_MAGNIFICATION_OVERLAY; import static android.view.WindowManager.LayoutParams.TYPE_NAVIGATION_BAR; import static android.view.WindowManager.LayoutParams.TYPE_NAVIGATION_BAR_PANEL; import static android.view.WindowManager.LayoutParams.TYPE_NOTIFICATION_SHADE; import static android.view.WindowManager.LayoutParams.TYPE_SECURE_SYSTEM_OVERLAY; import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR; import static android.view.WindowManager.LayoutParams.TYPE_WALLPAPER; import static com.android.server.wm.ProtoLogGroup.WM_DEBUG_FOCUS_LIGHT; Loading Loading @@ -66,9 +77,6 @@ final class InputMonitor { private boolean mUpdateInputWindowsPending; private boolean mUpdateInputWindowsImmediately; // Currently focused input window handle. private InputWindowHandle mFocusedInputWindowHandle; private boolean mDisableWallpaperTouchEvents; private final Rect mTmpRect = new Rect(); private final UpdateInputForAllWindowsConsumer mUpdateInputForAllWindowsConsumer; Loading Loading @@ -310,10 +318,6 @@ final class InputMonitor { Slog.d(TAG_WM, "addInputWindowHandle: " + child + ", " + inputWindowHandle); } if (hasFocus) { mFocusedInputWindowHandle = inputWindowHandle; } } void setUpdateInputWindowsNeededLw() { Loading Loading @@ -572,6 +576,7 @@ final class InputMonitor { inputWindowHandle.portalToDisplayId = INVALID_DISPLAY; inputWindowHandle.touchableRegion.setEmpty(); inputWindowHandle.setTouchableRegionCrop(null); inputWindowHandle.trustedOverlay = isTrustedOverlay(type); } /** Loading @@ -586,4 +591,17 @@ final class InputMonitor { populateOverlayInputInfo(inputWindowHandle, name, TYPE_SECURE_SYSTEM_OVERLAY, true); t.setInputWindowInfo(sc, inputWindowHandle); } static boolean isTrustedOverlay(int type) { return type == TYPE_ACCESSIBILITY_MAGNIFICATION_OVERLAY || type == TYPE_INPUT_METHOD || type == TYPE_INPUT_METHOD_DIALOG || type == TYPE_MAGNIFICATION_OVERLAY || type == TYPE_STATUS_BAR || type == TYPE_NOTIFICATION_SHADE || type == TYPE_NAVIGATION_BAR || type == TYPE_NAVIGATION_BAR_PANEL || type == TYPE_SECURE_SYSTEM_OVERLAY || type == TYPE_DOCK_DIVIDER || type == TYPE_ACCESSIBILITY_OVERLAY || type == TYPE_INPUT_CONSUMER; } }
services/core/java/com/android/server/wm/WindowState.java +1 −13 Original line number Diff line number Diff line Loading @@ -62,7 +62,6 @@ import static android.view.WindowManager.LayoutParams.SOFT_INPUT_MASK_ADJUST; import static android.view.WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS; import static android.view.WindowManager.LayoutParams.SYSTEM_FLAG_SHOW_FOR_ALL_USERS; import static android.view.WindowManager.LayoutParams.TYPE_ACCESSIBILITY_MAGNIFICATION_OVERLAY; import static android.view.WindowManager.LayoutParams.TYPE_ACCESSIBILITY_OVERLAY; import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION; import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA; import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA_OVERLAY; Loading @@ -87,7 +86,6 @@ import static android.view.WindowManager.LayoutParams.TYPE_PRIORITY_PHONE; import static android.view.WindowManager.LayoutParams.TYPE_PRIVATE_PRESENTATION; import static android.view.WindowManager.LayoutParams.TYPE_SCREENSHOT; import static android.view.WindowManager.LayoutParams.TYPE_SEARCH_BAR; import static android.view.WindowManager.LayoutParams.TYPE_SECURE_SYSTEM_OVERLAY; import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR; import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR_ADDITIONAL; import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR_SUB_PANEL; Loading Loading @@ -955,17 +953,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP mInputWindowHandle.trustedOverlay = (mAttrs.privateFlags & PRIVATE_FLAG_TRUSTED_OVERLAY) != 0 && mOwnerCanAddInternalSystemWindow; mInputWindowHandle.trustedOverlay |= mAttrs.type == TYPE_ACCESSIBILITY_MAGNIFICATION_OVERLAY || mAttrs.type == TYPE_INPUT_METHOD || mAttrs.type == TYPE_INPUT_METHOD_DIALOG || mAttrs.type == TYPE_MAGNIFICATION_OVERLAY || mAttrs.type == TYPE_STATUS_BAR || mAttrs.type == TYPE_NOTIFICATION_SHADE || mAttrs.type == TYPE_NAVIGATION_BAR || mAttrs.type == TYPE_NAVIGATION_BAR_PANEL || mAttrs.type == TYPE_SECURE_SYSTEM_OVERLAY || mAttrs.type == TYPE_DOCK_DIVIDER || mAttrs.type == TYPE_ACCESSIBILITY_OVERLAY || mAttrs.type == TYPE_INPUT_CONSUMER; mInputWindowHandle.trustedOverlay |= InputMonitor.isTrustedOverlay(mAttrs.type); // Make sure we initial all fields before adding to parentWindow, to prevent exception // during onDisplayChanged. Loading