fix(engine): re-poll safe-area insets after app resume #121
Reference in New Issue
Block a user
Delete Branch "fix/safe-area-resume-repoll"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
refresh_insetsgated its poll loop oninsets.is_populated(), so once insets resolved at first launch,rearm_on_resumed's poll-counter reset was a no-op — JNI was never queried again for the lifetime of the process. Insets that changed while backgrounded (fold/unfold, rotation, gesture ↔ 3-button nav switch) stayed stale until app restart.Fix
SafeAreaInsetsonly when the value actually differs — resumes where nothing changed trigger no change detection and no relayout, preserving the no-flash resume behaviour.on_app_resumeddoc comment that still described the old inset-zeroing approach.Known limitation (pre-existing): a transition to genuinely zero insets is indistinguishable from the not-yet-laid-out state, so it still can't be detected.
Verification
cargo clippy --workspace -- -D warningscleancargo ndk -t arm64-v8a clippy -p solitaire_engine -- -D warningsclean (the changed code iscfg(target_os = "android")-gated)cargo test --workspaceall passingCloses #116
🤖 Generated with Claude Code