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

Skip to content
Commit 75584ff6 authored by Alejandro Nijamkin's avatar Alejandro Nijamkin
Browse files

[flexiglass] Occlusion support.

Adds support for occlusion in Flexiglass.

System UI's window is rendered on top of all other windows. This is by
design because the keyguard (lockscreen, bouncer) must be rendered on
top of any other activity window to "lock" the device and also because
the shade (notification or QS shade) must be expandable above any other
activity window.

Sometimes, however, we can show an activity "on top" of the locked
keyguard; this is a developer-facing API that allows them to mark their
activities as "shown on lockscreen" in their app's AndroidManifest.xml
file (if they have the right permission).

When an activity like that is shown, we simulate "occlusion" of the
System UI window by hiding our window-view, which shows that activity.
That said, when the user expands the shade or QS, our window needs to be
shown again.

Similarly, in AOD, our window should again be shown.

This CL adds that logic to Flexiglass.

The majority of the logic is in the new
SceneContainerOcclusionInteractor which reuses the
KeyguardOcclusionInteractor (with one minor change). The
visibility-setting logic in our SceneContainerStartable is also altered
to take that new state into account.

Still missing:
1. Transition to bouncer when the "camera roll" button is clicked inside
   the camera app (this requires compliance with a signal from
   KeyguardService, most likely)
2. Inability to navigate home or back while the occluding activity is
   showing

Bug: 308001302
Test: manually verified that showing an occluding activity (used the
camera lockscreen shortcut) hides system UI
Test: manually verified that expanding the shade or QS scenes when
occluded, shows those scenes and that collapsing them re-occludes system
UI
Test: manually verified that AOD also shows system UI, even when the
camera activity was on top
Test: Launched Maps Navigation while unlocked, turned the screen off, and then back on (ended on occluding activity, tests waking to occluded)
Test: Set a timer, turned the screen off, waited for the timer activity to open over lockscreen, dismissed it (tests manually interacting with the device to end an occluding activity)
Test: Received a phone call and didn't answer it (this tests the occluding activity ending itself)
Test: added unit and integration tests
Flag: ACONFIG com.android.systemui.scene_container DEVELOPMENT

Change-Id: If004ecae201d8193e598030a89a0dc589bd6b4d4
parent c3d7b636
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