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

Skip to content
Commit 44efafd6 authored by Caitlin Shkuratov's avatar Caitlin Shkuratov
Browse files

[CS] 5/ Move status bar mode & appearance to repository.

This change majorly involves:
1) Replacing the methods inside SystemBarAttributesListener to be in
flows form instead.
2) Moving CentralSurface's bar mode calculations to the repo.

This change also minorly involves:
1) Adding an OngoingCallRepository that has the ongoing call status.
2) Updating StatusBarBoundsProvider to have an #addListener method
   instead of injecting the listeners directly.
3) Updating LetterboxAppearanceCalculator to have the status bar bounds
   passed to it instead of fetching them.

Bug: 300519002
Fixes: 301605450

Test: Assortment of letterboxing tests, including:
 - On landscape tablet, open landscaped app. Move app to be center,
   left, and right, and verify status bar icons are visible in all
   locations. Verify newly added status bar icons get the right color.
 - Without rotating device at all (aka ensure #onStatusBarBoundsChanged
   is never called), letterbox an app and verify it looks correct.
 - Enter split screen in landscape with letterboxed app on left, typical app on
   right. Verify icons are correct in all split screen sizes. Rotate to
   portrait then rotate back. Verify icons get correct color again.
-  Enter split screen in portrait with typical light app on top. Rotate to
   landscape then rotate back. Verify system icons are still dark
   colored afer rotation.

Test: Assortment of ongoing call tests, including:
 - Start ongoing call then enter immersive mode in app. Verify status
   bar still displays with semi-transparent background. Verify status
   bar can be swiped away.
 - General smoke test

Test: Assortment of bar mode tests, including:
 - Use app in low profile mode -> verify notif icons disappear (replaced
   by dot) and only battery icon shows on the right and is dimmed
 - Verify status bar is transparent on homescreen background with
   sufficient contrast
 - Verify status bar has gradient scrim on homescreen background that
   needs extra contrast
 - Verify status bar appears correctly with apps that request specific
   background color

Test: Verify dumps of StatusBarModeRepositoryImpl and
LetterboxAppearanceCalculator

Test: atest StatusBarModeRepositoryImplTest OngoingCallControllerTest
LetterboxAppearanceCalculatorTest LightBarControllerTest
Test: atest SystemUITests

Change-Id: I5b084356691fca03411461748f56fe6841f1b83e
parent 90884dbc
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