-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RequestStoragePermissionActivity infinite loop on M #422
Comments
Possible duplicate of #382 ? |
I don't think so, I see no problem observed by reporter. The notification is issued (as this was fix for mentioned issue) but there is the problem to enable storage permission when original app does not request it in manifest. |
What version of the library are you using? Can you post a crash stack? |
Version 1.4-beta1
|
This is weird, I tried to debug it and the only thing that happens there is |
I think debug app should specify that it wants to request storage permission in runtime. During manifest merging of final apk, debug versions would have external storage persmissions available, release builds would not. That might break certain setups but the only other solution I see is:
|
Not sure if this is related but I saw the same thing on our app. We ask for that permission in app but as it's not essential I had declined with don't ask again. When LC kicked in I saw the notification saying it needed permission but when I tapped on the notification I got into the same loop as mentioned. |
Pretty sure it's caused by this: https://github.com/square/leakcanary/blob/master/leakcanary-android/src/main/java/com/squareup/leakcanary/internal/RequestStoragePermissionActivity.java#L42 I've been lazy and didn't do the result checking. Not sure what we should do when the permission is refused after we ask. |
If the storage permission is denied, don't retry, just show a toast. Fixes #422
If the storage permission is denied, don't retry, just show a toast. Fixes #422
If the storage permission is denied, don't retry, just show a toast. Fixes #422
If the storage permission is denied, don't retry, just show a toast. Fixes square#422
Using leak canary requires external storage permission. On android 6 runtime permissions come into play. Unfortunately, if original app does not define this permission as requested, attempt to turn it on from notification issued by leak canary silently crashes.
I don't know how app + leak canary hybrid works but: is there a way to attach required permission / add permissions paragraph to instruction?
Edit by py: this is an infinite loop with RequestStoragePermissionActivity when the storage permission is permanently not granted.
The text was updated successfully, but these errors were encountered: