From 94f80354d21be65a765421b3f8bb36ae0ee74b1a Mon Sep 17 00:00:00 2001 From: Kevin Chyn Date: Fri, 8 Sep 2017 17:39:01 -0700 Subject: [PATCH] Update UnlockMethodCache when keyguard visibility changes 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 --- .../android/systemui/statusbar/phone/UnlockMethodCache.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockMethodCache.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockMethodCache.java index 1411a544c346f..f9c2130e4e81c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockMethodCache.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockMethodCache.java @@ -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() {