fix(android): battery exemption request opened nothing; add settings entry #1528
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/settings-power-exemption"
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
User report (Android 13, stock): tapping the battery-optimization exemption button („Kør altid i baggrunden" on the onboarding card / backup tab) did nothing — no dialog, no crash.
Root cause
PowerExemptionImpl.requestExemptionresolved the system dialog intent before starting it. On Android 11+ package visibility hides that system activity unless the manifest declares<queries>— it did not — so the guard misread "hidden" as "OEM-stripped" and silently returned.Fix
ActivityNotFoundException).<queries>block for the dialog + app-info settings action.Also: settings entry (third surface)
The exemption now shows in MEHR → Einstellungen as its own SectionCard (between Appearance and About): the wizard's
background_run_*copy (de/en/da, zero new strings), a „Tillad/Erlauben" button (≥48dp) while missing, and the calm granted check row once allowed. State re-polls on every ON_RESUME viarememberExemptState— same as the other two surfaces. Wired inMemoriesApp.ktexactly likeBackupScreen.Verification
rtk ./gradlew :core:test :app:testDebugUnitTest— green in the worktree (includes the rewrittenPowerExemptionRobolectricTest).Notes