OSDN Git Service

Update UnlockMethodCache when screen turns off
authorKevin Chyn <kchyn@google.com>
Thu, 31 Aug 2017 02:02:43 +0000 (19:02 -0700)
committerKevin Chyn <kchyn@google.com>
Thu, 31 Aug 2017 02:16:33 +0000 (19:16 -0700)
Fixes: 65212307

Test: 1) add a temporary log in update()
2) turn off screen, make sure update() is called, and
   canSkipBouncer value is updated and correct

Change-Id: I576d2375d38e83f286ad1fc6aa25944326c3ef8f

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

index 7e92edf..1411a54 100644 (file)
@@ -154,6 +154,11 @@ public class UnlockMethodCache {
         public void onStrongAuthStateChanged(int userId) {
             update(false /* updateAlways */);
         }
+
+        @Override
+        public void onScreenTurnedOff() {
+            update(false /* updateAlways */);
+        }
     };
 
     public boolean isTrustManaged() {