Fix missing photos in gallery.

This commit is contained in:
Michelle Tang
2024-09-03 12:20:38 -07:00
committed by GitHub
parent ab7bdc3c03
commit 2c7668253e
3 changed files with 16 additions and 14 deletions

View File

@@ -145,7 +145,9 @@ public class StorageUtil {
}
public static boolean canOnlyReadSelectedMediaStore() {
return Build.VERSION.SDK_INT >= 34 && Permissions.hasAll(AppDependencies.getApplication(), Manifest.permission.READ_MEDIA_VISUAL_USER_SELECTED);
return Build.VERSION.SDK_INT >= 34 &&
Permissions.hasAll(AppDependencies.getApplication(), Manifest.permission.READ_MEDIA_VISUAL_USER_SELECTED) &&
!Permissions.hasAny(AppDependencies.getApplication(), Manifest.permission.READ_MEDIA_IMAGES, Manifest.permission.READ_MEDIA_VIDEO);
}
public static boolean canReadAllFromMediaStore() {