From 630cf3b21cbd26154e4bed64871408439ddb8d97 Mon Sep 17 00:00:00 2001 From: Lulu Wu Date: Wed, 20 Sep 2023 12:31:17 -0700 Subject: [PATCH] Add the new media permission to typescript (#39563) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/39563 In https://github.com/facebook/react-native/pull/38880 we added the new media permission "READ_MEDIA_VISUAL_USER_SELECTED", this diff added it for TS as well Reviewed By: NickGerleman, mdvacca Differential Revision: D49371798 fbshipit-source-id: ebc77872f5609b411904b04e684b804584eeaaa9 --- .../Libraries/PermissionsAndroid/NativePermissionsAndroid.js | 1 + .../Libraries/PermissionsAndroid/PermissionsAndroid.d.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/react-native/Libraries/PermissionsAndroid/NativePermissionsAndroid.js b/packages/react-native/Libraries/PermissionsAndroid/NativePermissionsAndroid.js index 27c068082ad2c1..6373ab08d6173b 100644 --- a/packages/react-native/Libraries/PermissionsAndroid/NativePermissionsAndroid.js +++ b/packages/react-native/Libraries/PermissionsAndroid/NativePermissionsAndroid.js @@ -48,6 +48,7 @@ export type PermissionType = | 'android.permission.READ_MEDIA_IMAGES', | 'android.permission.READ_MEDIA_VIDEO', | 'android.permission.READ_MEDIA_AUDIO', + | 'android.permission.READ_MEDIA_VISUAL_USER_SELECTED' | 'android.permission.WRITE_EXTERNAL_STORAGE' | 'android.permission.BLUETOOTH_CONNECT' | 'android.permission.BLUETOOTH_SCAN' diff --git a/packages/react-native/Libraries/PermissionsAndroid/PermissionsAndroid.d.ts b/packages/react-native/Libraries/PermissionsAndroid/PermissionsAndroid.d.ts index 71b41076ef94b9..86708891d782ec 100644 --- a/packages/react-native/Libraries/PermissionsAndroid/PermissionsAndroid.d.ts +++ b/packages/react-native/Libraries/PermissionsAndroid/PermissionsAndroid.d.ts @@ -46,6 +46,7 @@ export type Permission = | 'android.permission.READ_MEDIA_IMAGES' | 'android.permission.READ_MEDIA_VIDEO' | 'android.permission.READ_MEDIA_AUDIO' + | 'android.permission.READ_MEDIA_VISUAL_USER_SELECTED' | 'android.permission.WRITE_EXTERNAL_STORAGE' | 'android.permission.BLUETOOTH_CONNECT' | 'android.permission.BLUETOOTH_SCAN'