Do not turn off screen before locking out device
Adaptive auth originally decided to turn off the screen before locking out the device in order to always show the lockscreen on the foreground with proper strings to explain why the device is being locked out. Otherwise activities such as BiometricPrompt may take the foreground, and users may have to dismiss such activities before seeing the lockscreen. UI becomes inconsistent depending on whether AOD is enabled. If AOD is disabled, putting the device into sleep turns it into a black screen. If AOD is enabled, AOD is shown but sometimes the lockscreen is shown because the screen is turned back on due to different wake reasons (e.g. WAKE_REASON_BIOMETRIC, WAKE_REASON_LIFT, etc.). To avoid inconsistent UI and potential user confusions (due to the black screen), this fix changes to not turn off the screen. Flag: EXEMPT bugfix Bug: 353869874 Test: atest AdaptiveAuthServiceTest Test: With AOD disabled, trigger adaptive auth on an unlocked device by failing biometric auth 5 times on BiometricPrompt, and then verify that the lockscreen is immediately shown without seeing a black screen first. With AOD enabled, trigger adaptive auth and then verify that the lockscreen is immediately shown followed by AOD if the screen is off due to timeout. Change-Id: I253dc9adcc011892549ebb9172bd64308bca12fc
Loading
Please register or sign in to comment