[flexiglass] Fixes user switching issue.
In ag/32362050, we tied lockscreenVisibilityWithScenes to the visibility
of the scene container because that already took device provisioning
into account. As it turns out, that's doing too much.
Because now lockscreenVisibilityWithScenes is returning false when the
scene container isn't visible which is then checked indirectly from
KeyguardViewMediator when attempting to respond to commands from system
server when the user is switched.
By changing lockscreenVisibilityWithScenes to more narrowly depend on
isDeviceProvisioned, we let KeyguardViewMediator see that lockscreen is
visible when it needs to be as part of user switching.
Fix: 408267151
Test: unit test updated and passes
Test: manually verified that switching to and from a secondary user on a
phone works as expected and doesn't just time out and restart as it did
before
Test: factory reset the device to enter device provisioning mode (when
setup wizard is shown) and verified that the lockscreen isn't showing
and that it shows up again once the setup wizard is skipped; also
checked the SysUiState via the command from ag/32362050
Flag: com.android.systemui.scene_container
Change-Id: I35bcdaeeda523e761b4b231b5af70d726a465c4d
3 files changed