fix(android): restore SystemBars work lost to upstream-preferred sync

Merged
TO
9d ago
+71-8

Summary

Audit of every PR merged into plus since the sync script started merging whole upstream PR branches with -X theirs (commit 5dee10fb / PR #39 on 2026-04-08). That fallback replayed unrelated upstream main commits and overwrote Capacitor+ files. #243 (already on plus) switched the sync to cherry-picks; this PR restores plus-only work that those earlier syncs still deleted.

This PR restores two things that #219 (f29c51ec, upstream-preferred sync of upstream main) removed:

  1. SystemBars.handleOnResume() from #67 (plus follow-up on the upstream #8454 sync). On resume it re-applies edge-to-edge window flags, the transparent navigation bar on API < 35, and the current bar styles. The window setup is shared with initSystemBars() so the two paths cannot drift.
  2. The #106 hide-path unit tests (hideWithEmptyBarHidesSystemBars, hideWithStatusBarHidesOnlyStatusBars). They cover the still-present #8480 setHidden behavior (an empty bar uses Type.systemBars()).

Not restored, with reasons:

  • navBarVisible, getNavBarHeightFromResources(), and calcSafeAreaInsets() from #67/#106. Upstream rewrote SystemBars in #219 (DecorView listener, INSETS_HANDLING_NATIVE, injectSafeAreaCSS(insets, keyboardVisible)). Upstream #8692 (plus #223) then kept the API < 30 bottom inset via getBottomInset and the keyboardVisible argument. Restoring the resource fallback would add a parallel inset path that upstream replaced. #243 already dropped leftover navBarVisible assignments after #223 and restored the android.os.Build import; this PR does not repeat that compile fix.
  • No .github/workflows hunks. Plus-only workflow PRs (#86, #107, #108, #109, #110, #232) are still present or were intentionally superseded (#86 removed Claude; #232 replaced SHA pins with version tags). #219 removed test.yml's pull_request: branches: [main, plus], but ci.yml already runs on every pull request (branches: '**'), so putting that trigger back would double-run the same jobs.
  • The sync helper is not edited (including lint-after-cherry-pick lines).

Based on current plus (includes #243). Actions stay pinned by version tag. No new secrets. CI timeout caps unchanged.

Restore table

PRwhat was lostrestored
#38SPM iOS platform helperskipped (still present; prettier only changed wrapping)
#39Claude sync conflict automationskipped (removed on purpose by #86; remaining helper/fmt/swiftpm pin still present)
#86Claude removalskipped (still present)
#104SECURITY_AUDIT_CLI.mdskipped (still present)
#1058.3.10 version pins and bump-version concurrencyskipped (concurrency group still present; version numbers superseded by later releases)
#106hide-path tests; navBarVisible tracking; older CSS inset guardspartial: hide-path tests restored. #8480/#8481 code still present or extended with NATIVE. navBarVisible path skipped as superseded by #219 + upstream #8692 / plus #223
#107bun setup in the release jobskipped (still present)
#108npm stage publishskipped (still present)
#109fetch upstream objects so plus sync worksskipped (still present)
#110modify/delete conflict handlingskipped (still present; helper later evolved by #243)
#187iOS private API static callsskipped (still present)
#229R8 keep rules for plugin annotationsskipped (still present)
#232actions pinned by version tag, checkout v7skipped (still present)
#236README backport docsskipped (still present)
#243cherry-pick sync + SystemBars compile fixskipped (already on plus; not duplicated)
#67 (sync of upstream #8454 + plus extras)handleOnResume; navBarVisible / resource inset fallbackpartial: handleOnResume restored. Inset-resource fallback skipped (superseded by #219 rewrite + #8692)
#115 (upstream-preferred main sync + plus follow-ups)SystemBars navBarVisible path later wiped by #219; CLI/iOS/CI follow-upsskipped (CLI/iOS/CI follow-ups still present in evolved form; SystemBars extras covered under #67/#106; SHA action pins correctly replaced by #232)
#122small UIScene test/AppDelegate syncskipped (not a feature wipe)
#219this is the wipe of handleOnResume, hide tests, navBarVisible path; also dropped test.yml PR trigger and onDOMReadypartial: resume handler and hide tests restored. test.yml PR trigger skipped (ci.yml covers all PR branches). onDOMReady skipped (replaced by handleOnStart / onPageCommitVisible)
#231deleted a duplicate SPM version-patch block in update.tsskipped (same valid() / from|exact logic remains later in the file)
Other upstream syncs (#66, #68-#72, #80, #83, #85, #87-#93, #95-#103, #193, #203, #212, #221, #223, #228)upstream Capacitor changesskipped (upstream syncs, not plus-only work)

Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Summary by CodeRabbit

  • Bug Fixes
    • System bar appearance and visibility are now restored when the app resumes, helping keep status and gesture bars consistent.
    • Edge-to-edge layout and inset handling are reapplied on resume so screen content can adjust to the available space.