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
Loading
Please register or sign in to comment