Skip to content

ADFA-5225 fix(onboarding): grant storage permission on pre-Android-11 devices - #450

Merged
luisguzman-adfa merged 2 commits into
mainfrom
fix/ADFA-5225-storage-permission-pre-r
Aug 21, 2026
Merged

luisguzman-adfa merged 2 commits into
mainfrom
fix/ADFA-5225-storage-permission-pre-r

Conversation

@luisguzman-adfa

@luisguzman-adfa luisguzman-adfa commented Aug 21, 2026 •

Copy link
Copy Markdown
Collaborator

Onboarding was blocked on Android 10 and below (e.g. Samsung S9): the app only
declared MANAGE_EXTERNAL_STORAGE (Android 11+) and the wizard's storage request
had no pre-R path, so the permission could never be granted and Continue stayed
disabled.

Changes:

  • StoragePermission — single source of truth for the storage check + request,
    branching by OS version.
  • WizardActivity / SetupSectionFragment delegate to it; the duplicated
    per-surface logic is gone. WizardActivity gains the pre-R runtime launcher.
  • Manifest — READ/WRITE_EXTERNAL_STORAGE with maxSdkVersion=29 (R+ unchanged).

No behaviour change on Android 11+. targetSdk stays 28.

Verification: verified on device — build + onboarding on a pre-11 device
(grant storage, Continue enables), plus a spot-check on Android 11+.

Screen_recording_20260820_233625.webm
Screen_recording_20260820_233812.webm

… devices

Onboarding hard-gated on a storage permission that could not be granted below
Android 11: only MANAGE_EXTERNAL_STORAGE was declared, and the wizard's
requestStorage() had no pre-R branch, so on a Samsung S9 (API <= 29) the toggle
did nothing and Continue never enabled.

- New StoragePermission helper centralizes the check + request, branching by OS
  version (R+ "All files access" screen; pre-R WRITE_EXTERNAL_STORAGE runtime).
- WizardActivity and SetupSectionFragment delegate to it, removing the duplicated
  per-surface logic; WizardActivity gains the runtime launcher it was missing.
- Manifest declares READ/WRITE_EXTERNAL_STORAGE with maxSdkVersion=29; R+ keeps
  MANAGE_EXTERNAL_STORAGE.

No behaviour change on Android 11+. targetSdk unchanged (28).
…p settings

The wizard's pre-R runtime request silently no-ops once the user picks "Don't ask
again", re-stranding onboarding on a screen with no other path to Settings.
requestOrOpenSettings() now detects that (rationale==false after a prior ask) and
opens the app details settings instead. Also drops now-unused imports in
SetupSectionFragment left over from centralizing the permission logic.
@luisguzman-adfa
luisguzman-adfa merged commit 815dadc into main Aug 21, 2026
3 checks passed
@luisguzman-adfa
luisguzman-adfa deleted the fix/ADFA-5225-storage-permission-pre-r branch August 21, 2026 05:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant