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: I7d6a8c2b9cc95d3003f006a403866796dab67e82
Merged-In: Icecd7cb76688cd19f7e3b445a8228b21e1599068
1 file changed