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
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 1411a54..f9c2130 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 void onScreenTurnedOff() {
             update(false /* updateAlways */);
         }
+
+        @Override
+        public void onKeyguardVisibilityChanged(boolean showing) {
+            update(false /* updateAlways */);
+        }
     };
 
     public boolean isTrustManaged() {