mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-22 23:48:08 -05:00
replace readmedia perms with one file perm
This commit is contained in:
parent
2e20cccf22
commit
5f7af1a434
2 changed files with 7 additions and 3 deletions
|
@ -6,9 +6,10 @@
|
|||
|
||||
namespace geode::utils::permission {
|
||||
enum class Permission {
|
||||
ReadAudio,
|
||||
ReadImages,
|
||||
ReadVideo,
|
||||
ReadAudio [[deprecated("This permission is Android 13+ specific! Use ReadFiles instead.")]],
|
||||
ReadImages [[deprecated("This permission is Android 13+ specific! Use ReadFiles instead.")]],
|
||||
ReadVideo [[deprecated("This permission is Android 13+ specific! Use ReadFiles instead.")]],
|
||||
ReadAllFiles,
|
||||
RecordAudio,
|
||||
};
|
||||
|
||||
|
|
|
@ -311,13 +311,16 @@ void geode::utils::game::restart() {
|
|||
|
||||
static const char* permissionToName(Permission permission) {
|
||||
#define PERM(x) "android.permission." x
|
||||
#define INTERNAL_PERM(x) "geode.permission_internal." x
|
||||
switch (permission) {
|
||||
case Permission::ReadAudio: return PERM("READ_MEDIA_AUDIO");
|
||||
case Permission::ReadImages: return PERM("READ_MEDIA_IMAGES");
|
||||
case Permission::ReadVideo: return PERM("READ_MEDIA_VIDEO");
|
||||
case Permission::RecordAudio: return PERM("RECORD_AUDIO");
|
||||
case Permission::ReadAllFiles: return INTERNAL_PERM("MANAGE_ALL_FILES");
|
||||
}
|
||||
#undef PERM
|
||||
#undef INTERNAL_PERM
|
||||
}
|
||||
|
||||
bool geode::utils::permission::getPermissionStatus(Permission permission) {
|
||||
|
|
Loading…
Reference in a new issue