darkmodewallpaper
darkmodewallpaper copied to clipboard
Import wallpaper failes on Android 13 (Tiramisu)
Cannot import wallpaper on Android 13 (Tiramisu) Beta
The permission Manifest.permission.READ_EXTERNAL_STORAGE
is required to import the wallpaper with WallpaperManager.getDrawable()
.
On Android 13 with targetSdkVersion set to 33 this permission cannot be requested anymore (if it was requested in an earlier version it does persist though).
Instead of the permission dialog, the user sees nothing and the permission request is automatically denied.
So the getDrawable()
call would fail with java.lang.SecurityException: Permission android.permission.READ_EXTERNAL_STORAGE denied for package
https://github.com/cvzi/darkmodewallpaper/blob/9527ba9cdd8b4f81e5befdcdf2f6c237bb1de1d0/app/src/main/AndroidManifest.xml#L27
https://github.com/cvzi/darkmodewallpaper/blob/9527ba9cdd8b4f81e5befdcdf2f6c237bb1de1d0/app/src/main/java/com/github/cvzi/darkmodewallpaper/activity/MainActivity.kt#L1167-L1173
https://github.com/cvzi/darkmodewallpaper/blob/9527ba9cdd8b4f81e5befdcdf2f6c237bb1de1d0/app/src/main/java/com/github/cvzi/darkmodewallpaper/activity/MainActivity.kt#L156-L168
Upstream report: https://issuetracker.google.com/issues/237124750