fix(android): auto-request media location so GPS survives upload #1389
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/android-media-location-request"
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\nUploaded images lost their GPS EXIF when
ACCESS_MEDIA_LOCATIONwas never granted:MediaStore.setRequireOriginal(AndroidMediaStoreScanner) then returns redacted bytes. The permission existed as an optional wizard card, but was only requested on an explicit tap — skip it and GPS was silently stripped forever.\n\n## Fix\nAll paths now auto-fire the location request through one shared gate (autoRequestLocationIfEligible()in BackupPermissions.kt):\n- wizard entry when media access is already granted (once, ask-once respected)\n- chained after a full media grant result (both wizard and backup tab)\n- retry pathensureMediaPermissions()no longer strands a missing location\n- backup tab startup chain unchanged (deduplicated onto the shared gate)\n\nSeparate launcher design kept (OEM auto-denial avoidance). Card stays optional/denyable — the change only guarantees the user is asked.\n\n## Verification\n./gradlew :app:testDebugUnitTest :core:test :app:assembleDebug→ BUILD SUCCESSFUL (app 826 tests, core 176 tests, 0 failures; BackupPermissionsTest 108 cases across SDK 25/29/33 incl. 14 new auto-ask cases).