[flexiglass] isDeviceEntered also checks back stack
isDeviceEntered should always reflect whether the user has "passed the
lockscreen". Up until this point, this has only happened if the user
visited the Gone scene. This CL changes that for cases when the
lockscreen is "passed" by the user but without yet visiting the Gone
scene.
For example, in the case of
unlocking while looking at the Shade scene (when clicking a notification
that requires unlocking to continue).
In cases like the one above, the current scene is Bouncer and the
back stack is (top to bottom): [Shade, Lockscreen].
This CL contains two main changes:
1. Replace the Lockscreen at the bottom of the back stack with Gone,
when unlocking in this case
2. Make DeviceEntryInteractor.isDeviceEntered watch the bottom of the
back stack for a Lockscreen -> Gone swap in addition to the classic
visiting of the Gone or Lockscreen scenes as it did before
Bug: 359530769
Test: unit test added for the new case
Test: existing unit and integration tests modified to better model
what's going on and make them pass
Test: manually verified no harm done (a) normal unlock with pattern
bouncer + re-lock + visiting all scenes in both locked and unlocked
states (b) locked -> shade -> notification click -> unlock via alternate
bouncer / fingerprint (c) locked -> shade -> notification click ->
dismiss alternate bouncer -> bouncer -> unlock via bouncer (d) double
tap power to bring up camera app while locked -> click on gallery button
-> unlock via alternate bouncer / primary bouncer
Flag: com.android.systemui.scene_container
Change-Id: I9e8b6a34afd574352d01f25819b71e1702af3d15
9 files changed