summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorDanesh M <danesh@cyngn.com>2016-06-17 15:13:27 -0700
committerGerrit Code Review <gerrit@cyanogenmod.org>2016-06-29 11:27:38 -0700
commitc76766953ebabd327f5ddc8410bfcdbc09e77b25 (patch)
treef7054b5140e202c4dc4a39f9bd3e59b370c57e6f /services
parentd4c6db9ce9020148d41234d5f28f0d57cc98f41c (diff)
downloadframeworks_base-c76766953ebabd327f5ddc8410bfcdbc09e77b25.zip
frameworks_base-c76766953ebabd327f5ddc8410bfcdbc09e77b25.tar.gz
frameworks_base-c76766953ebabd327f5ddc8410bfcdbc09e77b25.tar.bz2
WindowAnimator : Check KEYGUARD_PANEL when deciding to show/hide window
By default, if blur is enabled we don't hide the window behind since we want the user to see it. This is not true for when a KEYGUARD_PANEL is active since we can't see anything behind it anyway. Only apply blur logic if KEYGUARD_PANEL is not added. CYNGNOS-2980 Change-Id: Icecae14455d6e68665bb688e3f6dc4ea9d74e88c
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/policy/PhoneWindowManager.java5
-rw-r--r--services/core/java/com/android/server/wm/WindowAnimator.java9
2 files changed, 13 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index 4d93c78..755592f 100644
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -2692,6 +2692,11 @@ public class PhoneWindowManager implements WindowManagerPolicy {
return mWinShowWhenLocked;
}
+ @Override
+ public WindowState getWinKeyguardPanelLw() {
+ return mKeyguardPanel;
+ }
+
/** {@inheritDoc} */
@Override
public View addStartingWindow(IBinder appToken, String packageName, int theme,
diff --git a/services/core/java/com/android/server/wm/WindowAnimator.java b/services/core/java/com/android/server/wm/WindowAnimator.java
index 1ff209b..8e5ebc9 100644
--- a/services/core/java/com/android/server/wm/WindowAnimator.java
+++ b/services/core/java/com/android/server/wm/WindowAnimator.java
@@ -232,7 +232,14 @@ public class WindowAnimator {
// Only hide windows if the keyguard is active and not animating away.
boolean keyguardOn = mPolicy.isKeyguardShowingOrOccluded()
- && (mForceHiding != KEYGUARD_ANIMATING_OUT && !mKeyguardBlurEnabled);
+ && mForceHiding != KEYGUARD_ANIMATING_OUT;
+
+ final WindowState winKeyguardPanel = (WindowState) mPolicy.getWinKeyguardPanelLw();
+ // If a keyguard panel is currently being shown, we should
+ // continue to hide the windows as if blur is disabled.
+ if (winKeyguardPanel == null) {
+ keyguardOn &= !mKeyguardBlurEnabled;
+ }
return keyguardOn && !allowWhenLocked && (win.getDisplayId() == Display.DEFAULT_DISPLAY);
}