From 5def7eb4f9e7a2f79e251e9c876956dadbece5e6 Mon Sep 17 00:00:00 2001 From: Aaron Liu Date: Thu, 9 Mar 2023 09:53:45 -0800 Subject: [PATCH] Prevent keyguard from dismissing if not... dismissable and add a log here if this is the case. KeyguardStateController#isLockscreenDismissable checks to see if the user has unlocked with biometric auth or if the user's security method is not secure (i.e. swipe/none). Is the user is attemping to dismiss the lockscreen when the user has not bio auth unlocked and has a pin/password/pattern, we also assert that the user has correctly auth'd with the respective pin/password/pattern. Fixes: 272249570 Test: Try to dismiss keyguard with bouncer and bio auth. Test: sim pin/sim puk with swipe and pin security set. Test: call StatusBarKeyguardViewManager#notifyKeyguardAuthenticated directly when on LS and observe the log being reached. Change-Id: I5150d58a44fcd927661672ec61b915f51801fb7f --- .../KeyguardSecurityContainerController.java | 8 ++++++++ ...KeyguardSecurityContainerControllerTest.java | 17 +++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java index c098d4ca286db..061bab8a7006b 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java @@ -260,6 +260,14 @@ public class KeyguardSecurityContainerController extends ViewController