Loading services/core/java/com/android/server/policy/PhoneWindowManager.java +5 −1 Original line number Diff line number Diff line Loading @@ -234,7 +234,6 @@ import android.util.SparseArray; import android.util.proto.ProtoOutputStream; import android.view.Display; import android.view.DisplayCutout; import android.view.DisplayInfo; import android.view.Gravity; import android.view.HapticFeedbackConstants; import android.view.IApplicationToken; Loading Loading @@ -2292,6 +2291,11 @@ public class PhoneWindowManager implements WindowManagerPolicy { public void onTrustedChanged() { mWindowManagerFuncs.notifyKeyguardTrustedChanged(); } @Override public void onShowingChanged() { mWindowManagerFuncs.onKeyguardShowingAndNotOccludedChanged(); } }); mScreenshotHelper = new ScreenshotHelper(mContext); } Loading services/core/java/com/android/server/policy/WindowManagerPolicy.java +5 −0 Original line number Diff line number Diff line Loading @@ -660,6 +660,11 @@ public interface WindowManagerPolicy extends WindowManagerPolicyConstants { * abort animations that have no timeout, in case they got stuck. */ void triggerAnimationFailsafe(); /** * The keyguard showing state has changed */ void onKeyguardShowingAndNotOccludedChanged(); } /** Window has been added to the screen. */ Loading services/core/java/com/android/server/policy/keyguard/KeyguardStateMonitor.java +2 −0 Original line number Diff line number Diff line Loading @@ -94,6 +94,7 @@ public class KeyguardStateMonitor extends IKeyguardStateCallback.Stub { public void onShowingStateChanged(boolean showing) { mIsShowing = showing; mCallback.onShowingChanged(); try { mKeystoreService.onKeyguardVisibilityChanged(showing, mCurrentUserId); } catch (RemoteException e) { Loading Loading @@ -132,6 +133,7 @@ public class KeyguardStateMonitor extends IKeyguardStateCallback.Stub { public interface StateCallback { void onTrustedChanged(); void onShowingChanged(); } public void dump(String prefix, PrintWriter pw) { Loading services/core/java/com/android/server/wm/RootWindowContainer.java +8 −0 Original line number Diff line number Diff line Loading @@ -157,10 +157,18 @@ class RootWindowContainer extends WindowContainer<DisplayContent> { } WindowState computeFocusedWindow() { // While the keyguard is showing, we must focus anything besides the main display. // Otherwise we risk input not going to the keyguard when the user expects it to. final boolean forceDefaultDisplay = mService.isKeyguardShowingAndNotOccluded(); for (int i = mChildren.size() - 1; i >= 0; i--) { final DisplayContent dc = mChildren.get(i); final WindowState win = dc.findFocusedWindow(); if (win != null) { if (forceDefaultDisplay && !dc.isDefaultDisplay) { EventLog.writeEvent(0x534e4554, "71786287", win.mOwnerUid, ""); continue; } return win; } } Loading services/core/java/com/android/server/wm/WindowManagerService.java +13 −0 Original line number Diff line number Diff line Loading @@ -2846,6 +2846,11 @@ public class WindowManagerService extends IWindowManager.Stub mH.sendEmptyMessage(H.ANIMATION_FAILSAFE); } @Override public void onKeyguardShowingAndNotOccludedChanged() { mH.sendEmptyMessage(H.RECOMPUTE_FOCUS); } /** * Starts deferring layout passes. Useful when doing multiple changes but to optimize * performance, only one layout pass should be done. This can be called multiple times, and Loading Loading @@ -4626,6 +4631,7 @@ public class WindowManagerService extends IWindowManager.Stub public static final int SET_HAS_OVERLAY_UI = 58; public static final int SET_RUNNING_REMOTE_ANIMATION = 59; public static final int ANIMATION_FAILSAFE = 60; public static final int RECOMPUTE_FOCUS = 61; /** * Used to denote that an integer field in a message will not be used. Loading Loading @@ -5052,6 +5058,13 @@ public class WindowManagerService extends IWindowManager.Stub } } break; case RECOMPUTE_FOCUS: { synchronized (mWindowMap) { updateFocusedWindowLocked(UPDATE_FOCUS_NORMAL, true /* updateInputWindows */); } } break; } if (DEBUG_WINDOW_TRACE) { Slog.v(TAG_WM, "handleMessage: exit"); Loading Loading
services/core/java/com/android/server/policy/PhoneWindowManager.java +5 −1 Original line number Diff line number Diff line Loading @@ -234,7 +234,6 @@ import android.util.SparseArray; import android.util.proto.ProtoOutputStream; import android.view.Display; import android.view.DisplayCutout; import android.view.DisplayInfo; import android.view.Gravity; import android.view.HapticFeedbackConstants; import android.view.IApplicationToken; Loading Loading @@ -2292,6 +2291,11 @@ public class PhoneWindowManager implements WindowManagerPolicy { public void onTrustedChanged() { mWindowManagerFuncs.notifyKeyguardTrustedChanged(); } @Override public void onShowingChanged() { mWindowManagerFuncs.onKeyguardShowingAndNotOccludedChanged(); } }); mScreenshotHelper = new ScreenshotHelper(mContext); } Loading
services/core/java/com/android/server/policy/WindowManagerPolicy.java +5 −0 Original line number Diff line number Diff line Loading @@ -660,6 +660,11 @@ public interface WindowManagerPolicy extends WindowManagerPolicyConstants { * abort animations that have no timeout, in case they got stuck. */ void triggerAnimationFailsafe(); /** * The keyguard showing state has changed */ void onKeyguardShowingAndNotOccludedChanged(); } /** Window has been added to the screen. */ Loading
services/core/java/com/android/server/policy/keyguard/KeyguardStateMonitor.java +2 −0 Original line number Diff line number Diff line Loading @@ -94,6 +94,7 @@ public class KeyguardStateMonitor extends IKeyguardStateCallback.Stub { public void onShowingStateChanged(boolean showing) { mIsShowing = showing; mCallback.onShowingChanged(); try { mKeystoreService.onKeyguardVisibilityChanged(showing, mCurrentUserId); } catch (RemoteException e) { Loading Loading @@ -132,6 +133,7 @@ public class KeyguardStateMonitor extends IKeyguardStateCallback.Stub { public interface StateCallback { void onTrustedChanged(); void onShowingChanged(); } public void dump(String prefix, PrintWriter pw) { Loading
services/core/java/com/android/server/wm/RootWindowContainer.java +8 −0 Original line number Diff line number Diff line Loading @@ -157,10 +157,18 @@ class RootWindowContainer extends WindowContainer<DisplayContent> { } WindowState computeFocusedWindow() { // While the keyguard is showing, we must focus anything besides the main display. // Otherwise we risk input not going to the keyguard when the user expects it to. final boolean forceDefaultDisplay = mService.isKeyguardShowingAndNotOccluded(); for (int i = mChildren.size() - 1; i >= 0; i--) { final DisplayContent dc = mChildren.get(i); final WindowState win = dc.findFocusedWindow(); if (win != null) { if (forceDefaultDisplay && !dc.isDefaultDisplay) { EventLog.writeEvent(0x534e4554, "71786287", win.mOwnerUid, ""); continue; } return win; } } Loading
services/core/java/com/android/server/wm/WindowManagerService.java +13 −0 Original line number Diff line number Diff line Loading @@ -2846,6 +2846,11 @@ public class WindowManagerService extends IWindowManager.Stub mH.sendEmptyMessage(H.ANIMATION_FAILSAFE); } @Override public void onKeyguardShowingAndNotOccludedChanged() { mH.sendEmptyMessage(H.RECOMPUTE_FOCUS); } /** * Starts deferring layout passes. Useful when doing multiple changes but to optimize * performance, only one layout pass should be done. This can be called multiple times, and Loading Loading @@ -4626,6 +4631,7 @@ public class WindowManagerService extends IWindowManager.Stub public static final int SET_HAS_OVERLAY_UI = 58; public static final int SET_RUNNING_REMOTE_ANIMATION = 59; public static final int ANIMATION_FAILSAFE = 60; public static final int RECOMPUTE_FOCUS = 61; /** * Used to denote that an integer field in a message will not be used. Loading Loading @@ -5052,6 +5058,13 @@ public class WindowManagerService extends IWindowManager.Stub } } break; case RECOMPUTE_FOCUS: { synchronized (mWindowMap) { updateFocusedWindowLocked(UPDATE_FOCUS_NORMAL, true /* updateInputWindows */); } } break; } if (DEBUG_WINDOW_TRACE) { Slog.v(TAG_WM, "handleMessage: exit"); Loading