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

Commit ef40a94d authored by Caitlin Shkuratov's avatar Caitlin Shkuratov
Browse files

[SB] In fullscreen mode, always auto-hide status bar after 2 seconds.

When users are in fullscreen mode, the status bar and navigation bar are
hidden. Users can temporarily show them by swiping down from the top of
the sceen or up from the bottom of the screen. We call these "transient
bars". After a few seconds, the transient status bar and navigation bar
should automatically hide.

In code, we do this using AutoHideController. Any time the status bar
transitions object or the status bar mode changes, StatusBarOrchestrator
calls AutoHideController#touchAutoHide, which checks to see if we're
showing the transient bars. If we are, then we schedule them to be
hidden in ~2 seconds.

The bug: Most fullscreen apps request their status bar mode to be
TRANSPARENT. When a user swipes down from the top of the screen, the
status bar mode changes to be SEMI_TRANSPARENT, which causes
StatusBarOrchestrator to tell AutoHideController that we might need to
schedule a timeout.

However, some fullscreen apps are requesting their status bar mode to be
SEMI_TRANSPARENT. When a user swipes down from the top of the screen,
the bar mode didn't actually change, so StatusBarOrchestrator doesn't
ask AutoHideController to schedule anything.

The fix: Also call AutoHideController#touchAutoHide whenever the
transient mode changes.

Bug: 428659575
Flag: com.android.systemui.status_bar_always_schedule_auto_hide
Test: With fullscreen app that requests SEMI_TRANSPARENT, swipe down
from top of screen. Verify the status bar and navigation bar show, but
then hide after a few seconds.
Test: atest StatusBarOrchestratorTest

Change-Id: Ia7057ff8c3691d03df628fd40f0d49664e901f1e
parent 60b62275
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment