Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 84ac3904 authored by Alejandro Nijamkin's avatar Alejandro Nijamkin
Browse files

[flexiglass] Fix for "return to lockscreen" bug.

This is a highly complex bug that started occurring following the
integration of the KeguardTransition framework (KTF) with Flexiglass
(AKA "STL").

There are multiple root causes that have conspired together to create
this highly disruptive bug, this CL addresses them all:

1. lockscreenVisibility in WindowManagerLockscreenVisibilityInteractor
   was improperly defined to only depend on transitions to and from the
   Gone scene. This CL changes that to depend on whether the keyguard
   "views" should be visible, which is the intent of the original work
   (despite a bug in it, see b/341400177) - this uses isDeviceEntered
   from DeviceEntryInteractor which is the blessed single source of
   truth for knowing whether the lockscreen has been (by)passed.
2. show in StatusBarKeyguardViewManager was directly causing a scene
   change to the Lockscreen scene. This was added in ag/26445610 to
   make sure that, when a foldable is folded closed, we change to the
   Lockscreen scene. Since the show method can be called from more than
   one place and doesn't always necessarily mean that the actual
   Lockscreen UI should be shown, this CL moves that changeScene to
   happen upstream, in showDismissibleKeyguard of KeyguardService -
   which is a callback invoked by system server when the device is
   folded to a closed position after being open.
3. There's a bug where the system server signal for showing the
   dismissible lockscreen isn't being respected when the
   keyguard_wm_refactor flag is on, this is explained thoroughly in
   b/341400177. While this isn't really a root cause for the bug that
   this CL is fixing, it complicated the debugging effort so it's worth
   mentioning here.

Fix: 340536968
Test: existing unit tests pass
Test: manually verified that scene transition work as expected. Started
on LS, swiped down to reveal shade, swiped down to reveal QS, swiped up
twice to go back to LS, swipe up again to open the bouncer, enter the
correct credentials to unlock, ended up on the gone scene, swipe down
once and again to the shade and QS scenes, swipe up twice to return to
gone.
Test: manually verified that folding the unfolded device completely
closed correctly moves to the lockscreen scene. Discovered and logged b/341445974
Flag: com.android.systemui.scene_container

Change-Id: I011b5cd43979e75b3e805bc363ca1a86d64ea5de
parent 45855bdd
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