Loading services/core/java/com/android/server/policy/PhoneWindowManager.java +2 −1 Original line number Diff line number Diff line Loading @@ -4669,7 +4669,8 @@ public class PhoneWindowManager implements WindowManagerPolicy { } else if (mInputConsumer == null && mStatusBar != null && canHideNavigationBar()) { mInputConsumer = mWindowManagerFuncs.createInputConsumer(mHandler.getLooper(), INPUT_CONSUMER_NAVIGATION, (channel, looper) -> new HideNavInputEventReceiver(channel, looper)); (channel, looper) -> new HideNavInputEventReceiver(channel, looper), displayFrames.mDisplayId); // As long as mInputConsumer is active, hover events are not dispatched to the app // and the pointer icon is likely to become stale. Hide it to avoid confusion. InputManager.getInstance().setPointerIconType(PointerIcon.TYPE_NULL); Loading services/core/java/com/android/server/policy/WindowManagerPolicy.java +1 −1 Original line number Diff line number Diff line Loading @@ -525,7 +525,7 @@ public interface WindowManagerPolicy extends WindowManagerPolicyConstants { * Add a input consumer which will consume all input events going to any window below it. */ public InputConsumer createInputConsumer(Looper looper, String name, InputEventReceiver.Factory inputEventReceiverFactory); InputEventReceiver.Factory inputEventReceiverFactory, int displayId); /** * Returns a code that describes the current state of the lid switch. Loading services/core/java/com/android/server/wm/AppWindowContainerController.java +2 −2 Original line number Diff line number Diff line Loading @@ -648,7 +648,7 @@ public class AppWindowContainerController public void pauseKeyDispatching() { synchronized (mWindowMap) { if (mContainer != null) { mService.mInputMonitor.pauseDispatchingLw(mContainer); mContainer.getDisplayContent().getInputMonitor().pauseDispatchingLw(mContainer); } } } Loading @@ -656,7 +656,7 @@ public class AppWindowContainerController public void resumeKeyDispatching() { synchronized (mWindowMap) { if (mContainer != null) { mService.mInputMonitor.resumeDispatchingLw(mContainer); mContainer.getDisplayContent().getInputMonitor().resumeDispatchingLw(mContainer); } } } Loading services/core/java/com/android/server/wm/AppWindowToken.java +3 −3 Original line number Diff line number Diff line Loading @@ -449,13 +449,13 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree + ": hidden=" + isHidden() + " hiddenRequested=" + hiddenRequested); if (changed) { mService.mInputMonitor.setUpdateInputWindowsNeededLw(); getDisplayContent().getInputMonitor().setUpdateInputWindowsNeededLw(); if (performLayout) { mService.updateFocusedWindowLocked(UPDATE_FOCUS_WILL_PLACE_SURFACES, false /*updateInputWindows*/); mService.mWindowPlacerLocked.performSurfacePlacement(); } mService.mInputMonitor.updateInputWindowsLw(false /*force*/); getDisplayContent().getInputMonitor().updateInputWindowsLw(false /*force*/); } } Loading Loading @@ -677,7 +677,7 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree if (DEBUG_FOCUS_LIGHT) Slog.v(TAG_WM, "Removing focused app token:" + this); mService.mFocusedApp = null; mService.updateFocusedWindowLocked(UPDATE_FOCUS_NORMAL, true /*updateInputWindows*/); mService.mInputMonitor.setFocusedAppLw(null); getDisplayContent().getInputMonitor().setFocusedAppLw(null); } if (!delayed) { Loading services/core/java/com/android/server/wm/DisplayContent.java +15 −5 Original line number Diff line number Diff line Loading @@ -401,6 +401,8 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo private MagnificationSpec mMagnificationSpec; private InputMonitor mInputMonitor; private final Consumer<WindowState> mUpdateWindowsForAnimator = w -> { WindowStateAnimator winAnimator = w.mWinAnimator; final AppWindowToken atoken = w.mAppToken; Loading Loading @@ -798,6 +800,8 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo // TODO(b/62541591): evaluate whether this is the best spot to declare the // {@link DisplayContent} ready for use. mDisplayReady = true; mInputMonitor = new InputMonitor(service, mDisplayId); } boolean isReady() { Loading Loading @@ -2362,6 +2366,8 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo pw.println(); mDisplayFrames.dump(prefix, pw); pw.println(); mInputMonitor.dump(pw, " "); } @Override Loading Loading @@ -2472,9 +2478,9 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo assignWindowLayers(false /* setLayoutNeeded */); } mService.mInputMonitor.setUpdateInputWindowsNeededLw(); mInputMonitor.setUpdateInputWindowsNeededLw(); mService.mWindowPlacerLocked.performSurfacePlacement(); mService.mInputMonitor.updateInputWindowsLw(false /*force*/); mInputMonitor.updateInputWindowsLw(false /*force*/); } /** Returns true if a leaked surface was destroyed */ Loading Loading @@ -3057,10 +3063,10 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo forAllWindows(mPerformLayoutAttached, true /* traverseTopToBottom */); // Window frames may have changed. Tell the input dispatcher about it. mService.mInputMonitor.layoutInputConsumers(dw, dh); mService.mInputMonitor.setUpdateInputWindowsNeededLw(); mInputMonitor.layoutInputConsumers(dw, dh); mInputMonitor.setUpdateInputWindowsNeededLw(); if (updateInputWindows) { mService.mInputMonitor.updateInputWindowsLw(false /*force*/); mInputMonitor.updateInputWindowsLw(false /*force*/); } mService.mH.sendEmptyMessage(UPDATE_DOCKED_STACK_DIVIDER); Loading Loading @@ -4112,4 +4118,8 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo private boolean canUpdateImeTarget() { return mDeferUpdateImeTargetCount == 0; } InputMonitor getInputMonitor() { return mInputMonitor; } } Loading
services/core/java/com/android/server/policy/PhoneWindowManager.java +2 −1 Original line number Diff line number Diff line Loading @@ -4669,7 +4669,8 @@ public class PhoneWindowManager implements WindowManagerPolicy { } else if (mInputConsumer == null && mStatusBar != null && canHideNavigationBar()) { mInputConsumer = mWindowManagerFuncs.createInputConsumer(mHandler.getLooper(), INPUT_CONSUMER_NAVIGATION, (channel, looper) -> new HideNavInputEventReceiver(channel, looper)); (channel, looper) -> new HideNavInputEventReceiver(channel, looper), displayFrames.mDisplayId); // As long as mInputConsumer is active, hover events are not dispatched to the app // and the pointer icon is likely to become stale. Hide it to avoid confusion. InputManager.getInstance().setPointerIconType(PointerIcon.TYPE_NULL); Loading
services/core/java/com/android/server/policy/WindowManagerPolicy.java +1 −1 Original line number Diff line number Diff line Loading @@ -525,7 +525,7 @@ public interface WindowManagerPolicy extends WindowManagerPolicyConstants { * Add a input consumer which will consume all input events going to any window below it. */ public InputConsumer createInputConsumer(Looper looper, String name, InputEventReceiver.Factory inputEventReceiverFactory); InputEventReceiver.Factory inputEventReceiverFactory, int displayId); /** * Returns a code that describes the current state of the lid switch. Loading
services/core/java/com/android/server/wm/AppWindowContainerController.java +2 −2 Original line number Diff line number Diff line Loading @@ -648,7 +648,7 @@ public class AppWindowContainerController public void pauseKeyDispatching() { synchronized (mWindowMap) { if (mContainer != null) { mService.mInputMonitor.pauseDispatchingLw(mContainer); mContainer.getDisplayContent().getInputMonitor().pauseDispatchingLw(mContainer); } } } Loading @@ -656,7 +656,7 @@ public class AppWindowContainerController public void resumeKeyDispatching() { synchronized (mWindowMap) { if (mContainer != null) { mService.mInputMonitor.resumeDispatchingLw(mContainer); mContainer.getDisplayContent().getInputMonitor().resumeDispatchingLw(mContainer); } } } Loading
services/core/java/com/android/server/wm/AppWindowToken.java +3 −3 Original line number Diff line number Diff line Loading @@ -449,13 +449,13 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree + ": hidden=" + isHidden() + " hiddenRequested=" + hiddenRequested); if (changed) { mService.mInputMonitor.setUpdateInputWindowsNeededLw(); getDisplayContent().getInputMonitor().setUpdateInputWindowsNeededLw(); if (performLayout) { mService.updateFocusedWindowLocked(UPDATE_FOCUS_WILL_PLACE_SURFACES, false /*updateInputWindows*/); mService.mWindowPlacerLocked.performSurfacePlacement(); } mService.mInputMonitor.updateInputWindowsLw(false /*force*/); getDisplayContent().getInputMonitor().updateInputWindowsLw(false /*force*/); } } Loading Loading @@ -677,7 +677,7 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree if (DEBUG_FOCUS_LIGHT) Slog.v(TAG_WM, "Removing focused app token:" + this); mService.mFocusedApp = null; mService.updateFocusedWindowLocked(UPDATE_FOCUS_NORMAL, true /*updateInputWindows*/); mService.mInputMonitor.setFocusedAppLw(null); getDisplayContent().getInputMonitor().setFocusedAppLw(null); } if (!delayed) { Loading
services/core/java/com/android/server/wm/DisplayContent.java +15 −5 Original line number Diff line number Diff line Loading @@ -401,6 +401,8 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo private MagnificationSpec mMagnificationSpec; private InputMonitor mInputMonitor; private final Consumer<WindowState> mUpdateWindowsForAnimator = w -> { WindowStateAnimator winAnimator = w.mWinAnimator; final AppWindowToken atoken = w.mAppToken; Loading Loading @@ -798,6 +800,8 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo // TODO(b/62541591): evaluate whether this is the best spot to declare the // {@link DisplayContent} ready for use. mDisplayReady = true; mInputMonitor = new InputMonitor(service, mDisplayId); } boolean isReady() { Loading Loading @@ -2362,6 +2366,8 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo pw.println(); mDisplayFrames.dump(prefix, pw); pw.println(); mInputMonitor.dump(pw, " "); } @Override Loading Loading @@ -2472,9 +2478,9 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo assignWindowLayers(false /* setLayoutNeeded */); } mService.mInputMonitor.setUpdateInputWindowsNeededLw(); mInputMonitor.setUpdateInputWindowsNeededLw(); mService.mWindowPlacerLocked.performSurfacePlacement(); mService.mInputMonitor.updateInputWindowsLw(false /*force*/); mInputMonitor.updateInputWindowsLw(false /*force*/); } /** Returns true if a leaked surface was destroyed */ Loading Loading @@ -3057,10 +3063,10 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo forAllWindows(mPerformLayoutAttached, true /* traverseTopToBottom */); // Window frames may have changed. Tell the input dispatcher about it. mService.mInputMonitor.layoutInputConsumers(dw, dh); mService.mInputMonitor.setUpdateInputWindowsNeededLw(); mInputMonitor.layoutInputConsumers(dw, dh); mInputMonitor.setUpdateInputWindowsNeededLw(); if (updateInputWindows) { mService.mInputMonitor.updateInputWindowsLw(false /*force*/); mInputMonitor.updateInputWindowsLw(false /*force*/); } mService.mH.sendEmptyMessage(UPDATE_DOCKED_STACK_DIVIDER); Loading Loading @@ -4112,4 +4118,8 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo private boolean canUpdateImeTarget() { return mDeferUpdateImeTargetCount == 0; } InputMonitor getInputMonitor() { return mInputMonitor; } }