Skip to content
Commit 6a0634dc authored by Curtis Belmonte's avatar Curtis Belmonte
Browse files

Fix face auth not triggering after lock icon pressed

Long-pressing on the lock icon after the device has been unlocked causes
it to relock until the user manually authenticates. This intentionally
disables face unlock, since we don't want the device to unlock again
immediately after the lock icon has been pressed. However, when the
device screen turns off, pressing the power button again should
re-trigger face auth.

This commit fixes a bug in that flow where, if a user long presses the
lock icon, then turns the screen off and back on very quickly, face auth
is not retriggered. It does this by resetting the lock icon pressed
status when the device begins going to sleep, rather than when the
screen has been fully turned off.

Test: manual
1. Enroll face and turn off "skip lock screen"
2. Lock device, then wake and unlock with face
3. Long-press on the lock icon to relock device
4. Enter PIN/pattern/password to unlock the device
5. Press power twice in quick succession (without triggering camera)

Before: Lock screen would be shown but face auth would not trigger
After: Lock screen is shown and face auth is triggered

Fixes: 138974321
Change-Id: Icecd7cb76688cd19f7e3b445a8228b21e1599068
parent ce81d325
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment