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

Skip to content
Commit 07cc5b73 authored by Tiger's avatar Tiger Committed by Tiger Huang
Browse files

Let light bar state be able to be read by insets API

Before this CL, if the light bar state is controlled by the window style
attribute, apps can only query it via View#getSystemUiVisibility.
However, the API has been deprecated since Android SDK 30.
WindowInsetsController#getSystemBarsAppearance could only return the
values set by WindowInsetsController#setSystemBarsAppearance. Thus, no
API (except the deprecated one), can return the light bar state.

This CL adds a new @hide method, setSystemBarsAppearanceFromResource.
The light bar state read from resource will be passed to that method.
And now getSystemBarsAppearance will also return the appearance flag
specified via setSystemBarsAppearanceFromResource if the same flag is
not controlled by setSystemBarsAppearance.

Fix: 330891999
Flag: NA
Test: atest PendingInsetsControllerTest ViewRootImplTest
Test: ThemeSystemBarsTest
Change-Id: If740d360ad3211b682bd04598099240863048960
parent 69a62d57
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