Fix lockscreen bugs with SHOW_WHEN_LOCKED

When unlocking to a SHOW_WHEN_LOCKED activity by clicking
a notification, we don't get a the startKeyguardExitAnimation
because Keyguard is not actually going away. Instead, we start
it ourselves.

Also fixes the bug where restarting Keyguard while it's occluded
lead to an inconsistent state where the user got stuck on the
lockscreen.

Bug: 16481924
Change-Id: Iebc5bdd1287bbb81415ae01c7428850acc16c53f
This commit is contained in:
Adrian Roos
2015-04-15 18:03:08 -07:00
parent dc3e29c390
commit f253eeb9d3
2 changed files with 9 additions and 0 deletions

View File

@@ -867,6 +867,12 @@ public class KeyguardViewMediator extends SystemUI {
*/
private void handleSetOccluded(boolean isOccluded) {
synchronized (KeyguardViewMediator.this) {
if (mHiding && isOccluded) {
// We're in the process of going away but WindowManager wants to show a
// SHOW_WHEN_LOCKED activity instead.
startKeyguardExitAnimation(0, 0);
}
if (mOccluded != isOccluded) {
mOccluded = isOccluded;
mStatusBarKeyguardViewManager.setOccluded(isOccluded);

View File

@@ -145,6 +145,9 @@ public class KeyguardServiceDelegate {
if (mKeyguardState.bootCompleted) {
mKeyguardService.onBootCompleted();
}
if (mKeyguardState.occluded) {
mKeyguardService.setOccluded(mKeyguardState.occluded);
}
}
@Override