easypermissions icon indicating copy to clipboard operation
easypermissions copied to clipboard

Readme example may run into infinite loop

Open TWiStErRob opened this issue 4 years ago • 0 comments

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:

  • Call methodRequiresTwoPermission from onResume
  • Open the app
  • Deny permission
  • Ok on rationale
  • Deny permission

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.

TWiStErRob avatar Dec 21 '21 14:12 TWiStErRob