From 7d7808fcf8e6a1c27d52375210f9da2705d5f590 Mon Sep 17 00:00:00 2001 From: Craig Mautner Date: Thu, 11 Sep 2014 18:02:38 -0700 Subject: Show all windows from activity that hides keyguard Popup windows from the activity hiding the keyguard weren't being shown. This change retrieves that activity from PhoneWindowManager and applies the show or hide call to the windows that match the activity. Fixes bug 16479813. Change-Id: Ia6fe97240aec85c5233eee9038138f7d48095a6e --- services/core/java/com/android/server/wm/WindowAnimator.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'services/core/java/com') diff --git a/services/core/java/com/android/server/wm/WindowAnimator.java b/services/core/java/com/android/server/wm/WindowAnimator.java index 81cd602..92f57f5 100644 --- a/services/core/java/com/android/server/wm/WindowAnimator.java +++ b/services/core/java/com/android/server/wm/WindowAnimator.java @@ -252,6 +252,10 @@ public class WindowAnimator { final boolean showImeOverKeyguard = imeTarget != null && imeTarget.isVisibleNow() && (imeTarget.getAttrs().flags & FLAG_SHOW_WHEN_LOCKED) != 0; + final WindowState winShowWhenLocked = (WindowState) mPolicy.getWinShowWhenLockedLw(); + final AppWindowToken appShowWhenLocked = winShowWhenLocked == null ? + null : winShowWhenLocked.mAppToken; + for (int i = windows.size() - 1; i >= 0; i--) { WindowState win = windows.get(i); WindowStateAnimator winAnimator = win.mWinAnimator; @@ -316,8 +320,8 @@ public class WindowAnimator { + " hidden=" + win.mRootToken.hidden + " anim=" + win.mWinAnimator.mAnimation); } else if (mPolicy.canBeForceHidden(win, win.mAttrs)) { - final boolean hideWhenLocked = (flags & FLAG_SHOW_WHEN_LOCKED) == 0 && - !(win.mIsImWindow && showImeOverKeyguard); + final boolean hideWhenLocked = !((win.mIsImWindow && showImeOverKeyguard) || + (appShowWhenLocked != null && appShowWhenLocked == win.mAppToken)); final boolean changed; if (((mForceHiding == KEYGUARD_ANIMATING_IN) && (!winAnimator.isAnimating() || hideWhenLocked)) -- cgit v1.1