google / accompanist

A collection of extension libraries for Jetpack Compose
https://google.github.io/accompanist
Apache License 2.0
7.38k stars 596 forks source link

[Permissions] fix(gh-1781): check for `Denied(shouldShowRationale=false)` in `MutableMultiplePermissionsState.shouldShowRationale` #1783

Open FelixZY opened 1 month ago

FelixZY commented 1 month ago

Adding the fix I proposed in #1781

Fixes #1781


Additional complication:

I have indications that ACCESS_BACKGROUND_LOCATION may be Denied(shouldShowRationale=false) while ACCESS_FINE_LOCATION is Denied(shouldShowRationale=true). It then seems like ACCESS_BACKGROUND_LOCATION shifts to Denied(shouldShowRationale=true) once ACCESS_FINE_LOCATION is granted.

I have not yet confirmed this but something seems to be acting strange with these two. If the above description is correct, the proposed solution in this PR is insufficient (though covering an unexpected gap that exists today).

I think someone should take a closer look and disprove the above theory before merging this (that'll probably be a few months out on my end - if even then).

bentrengrove commented 2 weeks ago

Sorry for the slow response here, I am planning to get to this. Just trying to get the beta release out first