Skip to content
Commit c0823b6c authored by Jeff DeCew's avatar Jeff DeCew
Browse files

Fix LightBarController's dark/light logic for the Navigation Bar

The old logic failed to account for the notification shade's white scrim in light theme appearing underneath the navigation bar and didn't correctly keep the navigation bar in light mode for that state, making for white buttons on a nearly white background.  However, when accounting for the new possibility of an override to light mode, a pair of bug was discovered that cancelled each other out but made intermediate logic very confusing to follow.  It's still confusing, but now it's more correct.

* GradientColors.supportsDarkText() was set backward by the ScrimController.  This has been fixed.
* Clarified in the docs for the fields that mNavigationLight and related fields use "Light" to mean the theme / background, which means that the button color would be dark.  These locals were interpreted incorrectly in some places, cancelling out the above incorrectness.
* We never had light background scrims before, but we do now, so the other main thing this logical change does is introduce the ability for the scrim to override the theme to light (thus forcing the buttons to be dark).
* GlobalActionsDialogLite needed to be updated to let the LightBarController know when it was visible, since that would require light status bars.
* Finally, I added a ton of debug logging (off by default) and more info in the dumps that allows validating the progression of the logic for any state.

Bug: 195622153
Test: atest LightBarControllerTest
Flag: NEW_LIGHT_BAR_LOGIC
Change-Id: I380a8d03fdebace7dacba5f6c0b610540acc0c5a
parent 1cdd2a76
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