From 9e1bc8b0b25f6901fdbbe5c7abc474a55627323b Mon Sep 17 00:00:00 2001 From: Aaron Liu Date: Mon, 13 Mar 2023 14:25:05 -0700 Subject: [PATCH 1/2] Add flag to prevent keyguard bypass Bug: 272249570 Flag Bug: 273341787 Test: None as this is for flag creation Change-Id: If6c3edbf2ce50adefea86c5297f641118a17667d --- packages/SystemUI/src/com/android/systemui/flags/Flags.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/flags/Flags.kt b/packages/SystemUI/src/com/android/systemui/flags/Flags.kt index 20e079e28eb57..ef271282ddd1a 100644 --- a/packages/SystemUI/src/com/android/systemui/flags/Flags.kt +++ b/packages/SystemUI/src/com/android/systemui/flags/Flags.kt @@ -226,6 +226,11 @@ object Flags { @JvmField val ASYNC_INFLATE_BOUNCER = unreleasedFlag(229, "async_inflate_bouncer", teamfood = true) + /** Whether to inflate the bouncer view on a background thread. */ + // TODO(b/273341787): Tracking Bug + @JvmField + val PREVENT_BYPASS_KEYGUARD = unreleasedFlag(230, "prevent_bypass_keyguard") + // 300 - power menu // TODO(b/254512600): Tracking Bug @JvmField val POWER_MENU_LITE = releasedFlag(300, "power_menu_lite") From 5def7eb4f9e7a2f79e251e9c876956dadbece5e6 Mon Sep 17 00:00:00 2001 From: Aaron Liu Date: Thu, 9 Mar 2023 09:53:45 -0800 Subject: [PATCH 2/2] 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