Skip to content
Commit a181d665 authored by Josh Tsuji's avatar Josh Tsuji
Browse files

Don't always showSurfaceBehindKeyguard if keyguard exit is cancelled.

The exit animation can be cancelled for several reasons:
(1) Timeout during swipe to unlock: we should end up unlocked
(2) App transition begins during unlock: we should end up unlocked
(3) Power button pressed at very specific time during unlock,
cancelling the animation: we should end up *locked*, since we were
cancelled due to a power button press intending to lock the device.

ag/14934054, back in 2021, modified this logic to fix issues with (1)
and (2) above, ensuring we'd end up unlocked if the animation was
cancelled. However, it caused issues with (3). This timing was nearly
impossible to trigger at the time, however new devices with in-button
fingerprint readers make it far easier to simultaneously trigger power
off and fingerprint unlock at exactly the same time.

We can fix this by checking for a pending lock, and only ensuring we
end up unlocked if there is *not* a pending lock. Otherwise, we
should just end the surface animation but not re-show the keyguard.

Bug: 260094933
Fixes: 232002936
Fixes: 250946719
Test: on lockscreen, mash the power button with an enrolled finger
Test: swipe to unlock and hold at 50%, wait 10 seconds for cancellation
Test: atest KeyguardViewMediatorTest
Change-Id: Ib54e8781562ceda2d0c66a60b4a5d0e325f3f866
parent f1f50ee2
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