Skip to content

Commit

Permalink
Fixed the image loading
Browse files Browse the repository at this point in the history
We are now requesting the correct permission on for Android sdk level
33 and above.
  • Loading branch information
Helle-Daryd committed Jul 23, 2024
1 parent ce16fca commit cb34c43
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32"/>
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

Expand Down
5 changes: 4 additions & 1 deletion app/src/main/java/com/orgzly/android/util/AppPermissions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ object AppPermissions {
Usage.BOOK_EXPORT -> Manifest.permission.WRITE_EXTERNAL_STORAGE
Usage.SYNC_START -> Manifest.permission.WRITE_EXTERNAL_STORAGE
Usage.SAVED_SEARCHES_EXPORT_IMPORT -> Manifest.permission.WRITE_EXTERNAL_STORAGE
Usage.EXTERNAL_FILES_ACCESS -> Manifest.permission.READ_EXTERNAL_STORAGE
Usage.EXTERNAL_FILES_ACCESS -> if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU)
Manifest.permission.READ_MEDIA_IMAGES
else
Manifest.permission.READ_EXTERNAL_STORAGE
Usage.POST_NOTIFICATIONS -> Manifest.permission.POST_NOTIFICATIONS
}
}
Expand Down

0 comments on commit cb34c43

Please sign in to comment.