diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java index 1890a1f7573a1..61076cec87745 100644 --- a/services/core/java/com/android/server/policy/PhoneWindowManager.java +++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java @@ -424,7 +424,6 @@ public class PhoneWindowManager implements WindowManagerPolicy { private AccessibilityShortcutController mAccessibilityShortcutController; boolean mSafeMode; - private WindowState mKeyguardCandidate = null; // Whether to allow dock apps with METADATA_DOCK_HOME to temporarily take over the Home key. // This is for car dock and this is updated from resource. @@ -3309,7 +3308,6 @@ public class PhoneWindowManager implements WindowManagerPolicy { if (mKeyguardOccludedChanged) { if (DEBUG_KEYGUARD) Slog.d(TAG, "transition/occluded changed occluded=" + mPendingKeyguardOccluded); - mKeyguardOccludedChanged = false; if (setKeyguardOccludedLw(mPendingKeyguardOccluded, false /* force */, transitionStarted)) { return FINISH_LAYOUT_REDO_LAYOUT | FINISH_LAYOUT_REDO_WALLPAPER; @@ -3519,14 +3517,6 @@ public class PhoneWindowManager implements WindowManagerPolicy { mNavBarVirtualKeyHapticFeedbackEnabled = enabled; } - /** {@inheritDoc} */ - @Override - public void setKeyguardCandidateLw(WindowState win) { - mKeyguardCandidate = win; - setKeyguardOccludedLw(isKeyguardOccluded(), true /* force */, - false /* keyguardOccludingStarted */); - } - /** * Updates the occluded state of the Keyguard. * @@ -3539,6 +3529,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { private boolean setKeyguardOccludedLw(boolean isOccluded, boolean force, boolean transitionStarted) { if (DEBUG_KEYGUARD) Slog.d(TAG, "setKeyguardOccluded occluded=" + isOccluded); + mKeyguardOccludedChanged = false; if (isKeyguardOccluded() == isOccluded && !force) { return false; } diff --git a/services/core/java/com/android/server/policy/WindowManagerPolicy.java b/services/core/java/com/android/server/policy/WindowManagerPolicy.java index ab69da7665246..81dd9c571c0c6 100644 --- a/services/core/java/com/android/server/policy/WindowManagerPolicy.java +++ b/services/core/java/com/android/server/policy/WindowManagerPolicy.java @@ -713,13 +713,6 @@ public interface WindowManagerPolicy extends WindowManagerPolicyConstants { int theme, CompatibilityInfo compatInfo, CharSequence nonLocalizedLabel, int labelRes, int icon, int logo, int windowFlags, Configuration overrideConfig, int displayId); - /** - * Set or clear a window which can behave as the keyguard. - * - * @param win The window which can behave as the keyguard. - */ - void setKeyguardCandidateLw(@Nullable WindowState win); - /** * Create and return an animation to re-display a window that was force hidden by Keyguard. */ diff --git a/services/core/java/com/android/server/wm/DisplayPolicy.java b/services/core/java/com/android/server/wm/DisplayPolicy.java index ad264b40e2923..c23d5411df268 100644 --- a/services/core/java/com/android/server/wm/DisplayPolicy.java +++ b/services/core/java/com/android/server/wm/DisplayPolicy.java @@ -1104,9 +1104,6 @@ public class DisplayPolicy { switch (attrs.type) { case TYPE_NOTIFICATION_SHADE: mNotificationShade = win; - if (mDisplayContent.isDefaultDisplay) { - mService.mPolicy.setKeyguardCandidateLw(win); - } break; case TYPE_STATUS_BAR: mStatusBar = win; @@ -1302,9 +1299,6 @@ public class DisplayPolicy { mDisplayContent.setInsetProvider(ITYPE_NAVIGATION_BAR, null, null); } else if (mNotificationShade == win) { mNotificationShade = null; - if (mDisplayContent.isDefaultDisplay) { - mService.mPolicy.setKeyguardCandidateLw(null); - } } else if (mClimateBarAlt == win) { mClimateBarAlt = null; mDisplayContent.setInsetProvider(ITYPE_CLIMATE_BAR, null, null); diff --git a/services/tests/wmtests/src/com/android/server/wm/TestWindowManagerPolicy.java b/services/tests/wmtests/src/com/android/server/wm/TestWindowManagerPolicy.java index 16d75ca884f1d..9001578cf37ae 100644 --- a/services/tests/wmtests/src/com/android/server/wm/TestWindowManagerPolicy.java +++ b/services/tests/wmtests/src/com/android/server/wm/TestWindowManagerPolicy.java @@ -127,10 +127,6 @@ class TestWindowManagerPolicy implements WindowManagerPolicy { }; } - @Override - public void setKeyguardCandidateLw(WindowState win) { - } - @Override public Animation createHiddenByKeyguardExit(boolean onWallpaper, boolean goingToNotificationShade, boolean subtleAnimation) {