OSDN Git Service

Update UnlockMethodCache when keyguard visibility changes
authorKevin Chyn <kchyn@google.com>
Sat, 9 Sep 2017 00:39:01 +0000 (17:39 -0700)
committerKevin Chyn <kchyn@google.com>
Sat, 9 Sep 2017 01:02:41 +0000 (18:02 -0700)
When screensaver (not AOD) starts, the device is still "screen-on".
Keyguard can come up in the background, and if the user dismisses
screensaver, the cache will not have been updated but the device now
requires authentication

Fixes: 65487788

Test: 1) go to settings, start screensaver
2) wait 5s for keyguard to come up beneath
3) tap on screen to dismiss screensaver
4) lock or fingerprint icon should be shown, instead of unlocked icon

Change-Id: I160e6fa03ea4f72e792c2428d4246e7f3a60ace4

packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockMethodCache.java

index 1411a54..f9c2130 100644 (file)
@@ -159,6 +159,11 @@ public class UnlockMethodCache {
         public void onScreenTurnedOff() {
             update(false /* updateAlways */);
         }
+
+        @Override
+        public void onKeyguardVisibilityChanged(boolean showing) {
+            update(false /* updateAlways */);
+        }
     };
 
     public boolean isTrustManaged() {