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
This commit is contained in:
Kevin Chyn
2017-09-08 17:39:01 -07:00
parent 63643cedf2
commit 94f80354d2

View 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() {