Karumi / Dexter

Android library that simplifies the process of requesting permissions at runtime.
http://karumi.com
Apache License 2.0
5.23k stars 671 forks source link

Force isPermanentlyDenied flag to false for SDK < 23 #219

Closed Serchinastico closed 4 years ago

Serchinastico commented 5 years ago

:pushpin: References

:tophat: What is the goal?

To have a consistent answer in the isPermanentlyDenied flag for SDK versions lower than 23. Those devices won't ever ask for runtime permissions (because they are granted at installation time) so the right response is to say that permissions are NOT permanently denied in such scenario.

How is it being implemented?

Adding a new method to the AndroidPermissionService class called isPermissionPermanentlyDenied that does the version checking in its implementation.

How can it be tested?

Adding a logging statement to a MultiplePermissionListener and verifying that in an emulator with SDK < 23 the flag is never true.