mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:20:19 +01:00
Add selected photos access.
This commit is contained in:
committed by
mtang-signal
parent
4f001a0c95
commit
57adab858c
@@ -110,10 +110,18 @@ public class StorageUtil {
|
||||
Permissions.hasAll(AppDependencies.getApplication(), Manifest.permission.WRITE_EXTERNAL_STORAGE);
|
||||
}
|
||||
|
||||
public static boolean canReadFromMediaStore() {
|
||||
public static boolean canReadAnyFromMediaStore() {
|
||||
return Permissions.hasAny(AppDependencies.getApplication(), PermissionCompat.forImagesAndVideos());
|
||||
}
|
||||
|
||||
public static boolean canOnlyReadSelectedMediaStore() {
|
||||
return Build.VERSION.SDK_INT >= 34 && Permissions.hasAll(AppDependencies.getApplication(), Manifest.permission.READ_MEDIA_VISUAL_USER_SELECTED);
|
||||
}
|
||||
|
||||
public static boolean canReadAllFromMediaStore() {
|
||||
return Permissions.hasAll(AppDependencies.getApplication(), PermissionCompat.forImagesAndVideos());
|
||||
}
|
||||
|
||||
public static @NonNull Uri getVideoUri() {
|
||||
return MediaStore.Video.Media.EXTERNAL_CONTENT_URI;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user