Skip to content
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

[Android 13] WRITE_EXTERNAL_STORAGE is removed when app targets Android 13 #2415

Closed
SeungwonLee opened this issue Sep 1, 2022 · 2 comments
Closed
Milestone

Comments

@SeungwonLee
Copy link

SeungwonLee commented Sep 1, 2022

Steps to Reproduce

App > Updated that app targets 33 > Apps is running > Leak canary pops up > It can't see notification

Expected behavior: [What you expect to happen]
App > Updated that app targets 33 > Apps is running > Leak canary pops up > It can see notification

Version Information

  • LeakCanary version: 2.9.1
  • Android OS version: Andriod 13
  • Gradle version: 7.2.1

Additional Information

Any additional information, configuration or data that might be necessary to reproduce the issue.
From Android 13 devices, WRITE_EXTERNAL_STORAGE is removed.
https://issuetracker.google.com/issues/237634019
https://developer.android.com/about/versions/13/behavior-changes-13#granular-media-permissions

WRITE_EXTERNAL_STORAGE is using in those classes. Please check this.
leakcanary.internal.RequestStoragePermissionActivit
leakcanary.internal.LeakDirectoryProvider

SharkLog.d { "WRITE_EXTERNAL_STORAGE permission not granted, requesting" }

@pyricau
Copy link
Member

pyricau commented Nov 9, 2022

requestWriteExternalStoragePermission is set to false by default, so I assume you ran into an issue when setting it to true?

pyricau added a commit that referenced this issue Nov 10, 2022
We're able to write directly to the Downloads folder (tested on API 33) so there's no reason to check for storage permission when trying to cleanup, we instead just check if we can actually write to that directory and if not we don't cleanup.

This is related to #2415
pyricau added a commit that referenced this issue Nov 10, 2022
We're able to write directly to the Downloads folder (tested on API 33) so there's no reason to check for storage permission when trying to cleanup, we instead just check if we can actually write to that directory and if not we don't cleanup.

This is related to #2415
@pyricau pyricau added this to the 2.10 milestone Nov 10, 2022
@pyricau
Copy link
Member

pyricau commented Nov 10, 2022

The storage related issues should disappear with #2442 and #2440 should take care of the permission issues.

@pyricau pyricau closed this as completed Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants