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

onRequestPermissionsResult not called if user presses HOME button #344

Open gregko opened 2 years ago

gregko commented 2 years ago

With an EasyPermissions.requestPermissions() call, if the user presses the phone's HOME button instead of continuing on the initial message prompt, or during the system prompt to grant or refuse the permission, the onRequestPermissionResult() is never called, and also there is no call to onActivityResult(), so the activity waits in background forever for this result. I need to finish() this unnecessary activity (else much later it may cause an ANR), but there is no way of knowing what happened.