googlesamples / easypermissions

Simplify Android M system permissions
https://firebaseopensource.com/projects/googlesamples/easypermissions/
Apache License 2.0
9.86k stars 1.46k forks source link

Readme example may run into infinite loop #340

Open TWiStErRob opened 2 years ago

TWiStErRob commented 2 years ago

Basic Information

Device type: emu OS version: 31 EasyPermissions version: 3.0.0

Describe the problem

The code in the README.md file results in an infinite loop of starting an invisible activity on top of my activity. The following conditions have to be met:

At this point because methodRequiresTwoPermission doesn't check for permissionPermanentlyDenied, the execution goes to requesting the permission, butit doesn't show the rationale dialog, but I get a callback that the permission is granted, but it doesn't have permission so it requests... [loop].

Code and logs

I used the code simplest fully functional combo from the README.md.