Skip to content

v2.2.3

Choose a tag to compare

@vietnguyentuan2019 vietnguyentuan2019 released this 30 Jun 10:14
369ac92

πŸ› Fixed β€” Settings guide shown as rationale again after a permanent denial, in the same session (#55 follow-up)

On Android, once a permission was permanently denied, dismissing the settings guide and tapping request again re-showed the rationale dialog instead of the settings guide β€” but only within the same app session. After a restart it behaved correctly, which is what made it confusing to track down.

The cause: checkStatus() short-circuited on the in-memory status cache before consulting the OS-persisted shouldShowRequestPermissionRationale() flag. The first denial cached DENIED, so the second (permanent) denial was masked by that stale value and never became DENIED_ALWAYS until the cache was cleared on process death. The OS rationale flag is now consulted first β€” matching the RawPermission and LOCATION_ALWAYS branches β€” so the DENIED β†’ DENIED_ALWAYS transition is detected immediately, no restart needed.

Verified end-to-end on a physical Pixel 6 Pro (Android 16): deny β†’ rationale β†’ deny β†’ settings guide β†’ dismiss β†’ request β†’ settings guide (no rationale loop). iOS (iPhone XS Max, iOS 18.7.9) is unaffected by design β€” it reads the live OS status and has no rationale step, so denial routes straight to the settings guide on every request.

πŸ“ Notes

  • Pure correctness fix β€” no public API changes, no behavior changes for apps that don't hit this exact deny β†’ deny β†’ dismiss β†’ request sequence.
  • Android-only. iOS, RawPermission, LOCATION_ALWAYS, and the special-access permissions were already correct and are untouched.

Full diff: v2.2.2...v2.2.3