From d5584538f1aef379840ed1748a8b990670a68f11 Mon Sep 17 00:00:00 2001 From: Beverly Date: Thu, 24 Mar 2022 13:34:08 +0000 Subject: [PATCH] Add Keyguard DPM state change callback DevicePolicyManager can change the security mode (ie: pin/pattern/password/none), so on DPM state changes, update SecurityContainer so that the Bouncer will be in the correct security mode if there are any changes while the device is already on the keyguard. Prior to this CL, the security mode would eventually be reset when the device went to sleep & woke back up; however, this issue was causing flaky & slow tests. Test: manual From home screen: adb shell locksettings set-pin "1234" From lock screen: adb shell locksettings clear --old "1234" On lock screen: adb shell wm dismiss-keyguard Observe & expect: keyguard is dismissed (previously bouncer would show) Fixes: 223440441 Change-Id: I22281dcc85d75509f1a754d57359d5f862e3d8d0 --- .../keyguard/KeyguardSecurityContainerController.java | 9 +++++++++ .../com/android/keyguard/KeyguardUpdateMonitor.java | 10 +++++++++- .../keyguard/KeyguardUpdateMonitorCallback.java | 5 +++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java index 57997d8efd6f4..1a325d3586f4c 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java @@ -233,6 +233,13 @@ public class KeyguardSecurityContainerController extends ViewController