Skip to content

Commit

Permalink
request correct permissions for the 'photo rail'
Browse files Browse the repository at this point in the history
  • Loading branch information
r10s committed Oct 1, 2023
1 parent ac8cc1a commit 8dd88fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public AttachmentTypeSelector(@NonNull Context context, @NonNull LoaderManager l
}

public void show(@NonNull Activity activity, final @NonNull View anchor) {
if (Permissions.hasAll(activity, Manifest.permission.READ_EXTERNAL_STORAGE)) {
if (Permissions.hasAll(activity, Permissions.galleryPermissions())) {
recentRail.setVisibility(View.VISIBLE);
loaderManager.restartLoader(1, null, recentRail);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public RecentPhotosLoader(Context context) {

@Override
public Cursor loadInBackground() {
if (Permissions.hasAll(context, Manifest.permission.READ_EXTERNAL_STORAGE)) {
if (Permissions.hasAll(context, Permissions.galleryPermissions())) {
return context.getContentResolver().query(MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
PROJECTION, SELECTION, null,
MediaStore.Images.ImageColumns.DATE_MODIFIED + " DESC");
Expand Down

0 comments on commit 8dd88fc

Please sign in to comment.