summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Issei Suzuki <issei@google.com> 2021-10-20 16:02:02 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2021-10-20 16:02:02 +0000
commit3b5edccda0c713ea71cb5176e12a4bb5f36e5db4 (patch)
tree908173d74e2b100314276679e8a3b9cf21ec7613
parent556d14f60eb70c265a475d13d5c4f0ec5b0eab8a (diff)
parent5e6c273cdf57cc43d1833977d81920443e62cdc9 (diff)
Merge changes I69e9cbb6,I187b5a56 into sc-v2-dev
* changes: Prevent the occlusion state mismatch between WM and SystemUI. Remove keyguard candidate.
-rw-r--r--services/core/java/com/android/server/policy/PhoneWindowManager.java11
-rw-r--r--services/core/java/com/android/server/policy/WindowManagerPolicy.java7
-rw-r--r--services/core/java/com/android/server/wm/DisplayPolicy.java6
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/TestWindowManagerPolicy.java4
4 files changed, 1 insertions, 27 deletions
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index 83b7489dec85..cda7407dc98c 100644
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -404,7 +404,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.
@@ -3061,7 +3060,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;
@@ -3271,14 +3269,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.
*
@@ -3291,6 +3281,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 c3ec6a4ab6b5..87465a4b2ffe 100644
--- a/services/core/java/com/android/server/policy/WindowManagerPolicy.java
+++ b/services/core/java/com/android/server/policy/WindowManagerPolicy.java
@@ -722,13 +722,6 @@ public interface WindowManagerPolicy extends WindowManagerPolicyConstants {
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.
*/
public Animation createHiddenByKeyguardExit(boolean onWallpaper,
diff --git a/services/core/java/com/android/server/wm/DisplayPolicy.java b/services/core/java/com/android/server/wm/DisplayPolicy.java
index 0c0d01c3db89..d1357c0899b8 100644
--- a/services/core/java/com/android/server/wm/DisplayPolicy.java
+++ b/services/core/java/com/android/server/wm/DisplayPolicy.java
@@ -1094,9 +1094,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;
@@ -1292,9 +1289,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 16d75ca884f1..9001578cf37a 100644
--- a/services/tests/wmtests/src/com/android/server/wm/TestWindowManagerPolicy.java
+++ b/services/tests/wmtests/src/com/android/server/wm/TestWindowManagerPolicy.java
@@ -128,10 +128,6 @@ class TestWindowManagerPolicy implements WindowManagerPolicy {
}
@Override
- public void setKeyguardCandidateLw(WindowState win) {
- }
-
- @Override
public Animation createHiddenByKeyguardExit(boolean onWallpaper,
boolean goingToNotificationShade, boolean subtleAnimation) {
return null;