Skip to content

Commit

Permalink
add comment wrt 'camera roll'
Browse files Browse the repository at this point in the history
  • Loading branch information
r10s committed Oct 2, 2023
1 parent 90f9090 commit 95e7e2f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/org/thoughtcrime/securesms/permissions/Permissions.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
public class Permissions {

public static String[] galleryPermissions() {
// on modern androids, the gallery picker works without permissions,
// however, the "camera roll" still requires permissions.
// to get that dialog at a UX-wise good moment, we still always ask for permission when opening gallery.
// just-always-asking this also avoids the mess with handling various paths for various apis.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
return new String[]{Manifest.permission.READ_MEDIA_IMAGES, Manifest.permission.READ_MEDIA_VIDEO};
} else {
Expand Down

0 comments on commit 95e7e2f

Please sign in to comment.