OSDN Git Service

Send USER_PRESENT broadcast after keyguard animation finishes
authorJim Miller <jaggies@google.com>
Thu, 4 Sep 2014 23:51:20 +0000 (16:51 -0700)
committerJim Miller <jaggies@google.com>
Fri, 5 Sep 2014 00:11:17 +0000 (17:11 -0700)
This fixes a potential race between receiving USER_PRESENT
broadcast and testing if keyguard is finished
(KeyguardManager.isKeyguardLocked())

This also fixes an issue where USER_PRESENT isn't sent when
device encryption is enabled.

Fixes bug 17322844
Fixes bug 17301385

Change-Id: Icab3068c24032942ffdf6554d6d53cc656ae6666

packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java

index f8d0d9e..8d35eb0 100644 (file)
@@ -1142,7 +1142,6 @@ public class KeyguardViewMediator extends SystemUI {
         }
 
         handleHide();
-        sendUserPresentBroadcast();
     }
 
     private void sendUserPresentBroadcast() {
@@ -1313,6 +1312,7 @@ public class KeyguardViewMediator extends SystemUI {
             mHideAnimationRun = false;
             updateActivityLockScreenState();
             adjustStatusBarLocked();
+            sendUserPresentBroadcast();
         }
     }