fix(android): apply modern system bar appearance on Android 12+ - #81
Open
huxinhai wants to merge 1 commit into
Open
fix(android): apply modern system bar appearance on Android 12+#81huxinhai wants to merge 1 commit into
huxinhai wants to merge 1 commit into
Conversation
huxinhai
marked this pull request as ready for review
August 18, 2026 02:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #80
What changed
WindowInsetsController.setSystemBarsAppearanceAPI on Android 12+.WindowInsetsControllerCompatpath on Android 11 and below.status,navigation, andbothisolated through their respective appearance masks.Why
On an affected Xiaomi Android 12 device, the window-backed compat controller could report light status-bar appearance as enabled while only the legacy
systemUiVisibilityflag had changed. SystemUI continued to consume the modern WindowManager appearance, so the status-bar icons returned to white after task removal and process restoration.Calling the platform controller directly on API 31+ matches React Native's current Android status-bar implementation and updates the modern appearance consumed by SystemUI. There are no JavaScript API or default-value changes.
User impact
Apps using
setBarStyle('dark', 'status')no longer lose dark status-bar icons during affected OEM task/process transitions.Validation
yarn install --immutableyarn typecheckyarn lintyarn test— 2 suites, 44 testsyarn prepare:react-native-system-navigation-bar:compileDebugKotlin --rerun-tasksin the example app:react-native-system-navigation-bar:assembleDebugin the example appapr=LIGHT_STATUS_BARS; no Android or React Native fatal logsThe issue did not reproduce on the Android emulator; the before/after WindowManager evidence was captured on the physical Xiaomi device.