diff options
author | Danesh M <danesh@cyngn.com> | 2016-06-03 11:55:04 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2016-06-03 14:58:59 -0700 |
commit | 28e023d0c621f00e357f52264baaedf72c1eeee7 (patch) | |
tree | a15741f3db07427542732425ee3f0f149c126e6f /services/core | |
parent | 981a59d29fe56fe3c8a9ccb04e64284bc6b7ad49 (diff) | |
download | frameworks_base-28e023d0c621f00e357f52264baaedf72c1eeee7.zip frameworks_base-28e023d0c621f00e357f52264baaedf72c1eeee7.tar.gz frameworks_base-28e023d0c621f00e357f52264baaedf72c1eeee7.tar.bz2 |
Only show keyguard panel if on lockscreen + no activity on top
There is a bug in window manager, where if the keyboard is collapsed,
the reference to the window is lost when destroying its surface. This in
turn prevents the ime window from being reordered later on. For normal apps
this is not an issue, but since we're above normal apps (KEYGUARD_PANEL),
this rises an issue for us in this scenario :
1) Set password lockscreen
2) Swipe up to unlock
3) Collapse keyboard
4) Launch emergency dialer (SHOW_WHEN_LOCKED)
5) Press home button
Notice that all touch events are going to the external keyguard.
If the keyboard is not collapsed in step 3, everything works and the reason
is the reference to the input method window in window manager isn't lost
and it gets re-ordered behind the windows.
To workaround this issue, avoid removing/re-adding the window and instead
rely on window manager to control its visibility.
Change-Id: I59dd41547902ae5e23bbeb0a01ee27f11fc29dfc
Diffstat (limited to 'services/core')
-rw-r--r-- | services/core/java/com/android/server/wm/WindowAnimator.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/wm/WindowAnimator.java b/services/core/java/com/android/server/wm/WindowAnimator.java index 1ff209b..3289c2e 100644 --- a/services/core/java/com/android/server/wm/WindowAnimator.java +++ b/services/core/java/com/android/server/wm/WindowAnimator.java @@ -220,7 +220,9 @@ public class WindowAnimator { // Show SHOW_WHEN_LOCKED windows that turn on the screen allowWhenLocked |= (win.mAttrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0 && win.mTurnOnScreen; // Show windows that use TYPE_STATUS_BAR_SUB_PANEL when locked - allowWhenLocked |= win.mAttrs.type == WindowManager.LayoutParams.TYPE_KEYGUARD_PANEL; + allowWhenLocked |= win.mAttrs.type == WindowManager.LayoutParams.TYPE_KEYGUARD_PANEL && + winShowWhenLocked == null; + if (appShowWhenLocked != null) { allowWhenLocked |= appShowWhenLocked == win.mAppToken |