Skip to content

Commit 79db483

Browse files
Skrilltraxfacebook-github-bot
authored andcommitted
Add ACCESS_MEDIA_LOCATION permission (#32282)
Summary: This PR adds `ACCESS_MEDIA_LOCATION` permission to the PermissionsAndroid library. It fixes #31953. It's a `dangerous` permission added in API level 29. https://developer.android.com/reference/android/Manifest.permission#ACCESS_MEDIA_LOCATION ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [Android] [Added] - Add ACCESS_MEDIA_LOCATION permission to PermisionsAndroid library. Pull Request resolved: #32282 Test Plan: ``` PermissionsAndroid.ACCESS_MEDIA_LOCATION === 'android.permission.ACCESS_MEDIA_LOCATION' ``` Reviewed By: yungsters Differential Revision: D31235523 Pulled By: cortinico fbshipit-source-id: 45fa86b1cdf8bc76453e9df6198c1f7ed923db7c
1 parent d47c487 commit 79db483

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Libraries/PermissionsAndroid/NativePermissionsAndroid.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ export type PermissionType =
4444
| 'android.permission.WRITE_EXTERNAL_STORAGE'
4545
| 'android.permission.BLUETOOTH_CONNECT'
4646
| 'android.permission.BLUETOOTH_SCAN'
47-
| 'android.permission.BLUETOOTH_ADVERTISE';
47+
| 'android.permission.BLUETOOTH_ADVERTISE'
48+
| 'android.permission.ACCESS_MEDIA_LOCATION';
4849
*/
4950

5051
export interface Spec extends TurboModule {

Libraries/PermissionsAndroid/PermissionsAndroid.js

+2
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ const PERMISSIONS = Object.freeze({
6262
BLUETOOTH_CONNECT: 'android.permission.BLUETOOTH_CONNECT',
6363
BLUETOOTH_SCAN: 'android.permission.BLUETOOTH_SCAN',
6464
BLUETOOTH_ADVERTISE: 'android.permission.BLUETOOTH_ADVERTISE',
65+
ACCESS_MEDIA_LOCATION: 'android.permission.ACCESS_MEDIA_LOCATION',
6566
});
6667

6768
/**
@@ -75,6 +76,7 @@ class PermissionsAndroid {
7576
ACCESS_BACKGROUND_LOCATION: string,
7677
ACCESS_COARSE_LOCATION: string,
7778
ACCESS_FINE_LOCATION: string,
79+
ACCESS_MEDIA_LOCATION: string,
7880
ADD_VOICEMAIL: string,
7981
BLUETOOTH_ADVERTISE: string,
8082
BLUETOOTH_CONNECT: string,

0 commit comments

Comments
 (0)