summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Adrian Roos <roosa@google.com> 2015-07-07 23:22:20 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2015-07-07 23:22:23 +0000
commit38586bfff9b8194c86f1363d63e971bbbc6ee843 (patch)
treeb9e193bc0a3185ef36f05a22c05c09faf7ebb7e7
parent846362fa06e717784e2e60882c83c20a9350b1a7 (diff)
parentbee63000ede8ddd9ebd2fcd098569aca87a3596c (diff)
Merge "Fix bug that prevented waking from dream" into mnc-dev
-rw-r--r--services/core/java/com/android/server/wm/WindowAnimator.java23
1 files changed, 15 insertions, 8 deletions
diff --git a/services/core/java/com/android/server/wm/WindowAnimator.java b/services/core/java/com/android/server/wm/WindowAnimator.java
index 0bc6d22e252d..11eb57264eaa 100644
--- a/services/core/java/com/android/server/wm/WindowAnimator.java
+++ b/services/core/java/com/android/server/wm/WindowAnimator.java
@@ -197,18 +197,25 @@ public class WindowAnimator {
final WindowState winShowWhenLocked = (WindowState) mPolicy.getWinShowWhenLockedLw();
final AppWindowToken appShowWhenLocked = winShowWhenLocked == null ?
null : winShowWhenLocked.mAppToken;
- final boolean hideWhenLocked =
- !(((win.mIsImWindow || imeTarget == win) && showImeOverKeyguard)
- || (appShowWhenLocked != null && (appShowWhenLocked == win.mAppToken
- // Show all SHOW_WHEN_LOCKED windows while they're animating
- || (win.mAttrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0 && win.isAnimatingLw()
- // Show error dialogs over apps that dismiss keyguard.
- || (win.mAttrs.privateFlags & PRIVATE_FLAG_SYSTEM_ERROR) != 0)));
+
+ boolean allowWhenLocked = false;
+ // Show IME over the keyguard if the target allows it
+ allowWhenLocked |= (win.mIsImWindow || imeTarget == win) && showImeOverKeyguard;
+ // Show SHOW_WHEN_LOCKED windows that turn on the screen
+ allowWhenLocked |= (win.mAttrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0 && win.mTurnOnScreen;
+
+ if (appShowWhenLocked != null) {
+ allowWhenLocked |= appShowWhenLocked == win.mAppToken
+ // Show all SHOW_WHEN_LOCKED windows while they're animating
+ || (win.mAttrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0 && win.isAnimatingLw()
+ // Show error dialogs over apps that dismiss keyguard.
+ || (win.mAttrs.privateFlags & PRIVATE_FLAG_SYSTEM_ERROR) != 0;
+ }
// Only hide windows if the keyguard is active and not animating away.
boolean keyguardOn = mPolicy.isKeyguardShowingOrOccluded()
&& mForceHiding != KEYGUARD_ANIMATING_OUT;
- return keyguardOn && hideWhenLocked && (win.getDisplayId() == Display.DEFAULT_DISPLAY);
+ return keyguardOn && !allowWhenLocked && (win.getDisplayId() == Display.DEFAULT_DISPLAY);
}
private void updateWindowsLocked(final int displayId) {