Skip to content

Commit

Permalink
Add ACCESS_MEDIA_LOCATION permission (#32282)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Skrilltrax authored and facebook-github-bot committed Oct 12, 2021
1 parent d47c487 commit 79db483
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Libraries/PermissionsAndroid/NativePermissionsAndroid.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ export type PermissionType =
| 'android.permission.WRITE_EXTERNAL_STORAGE'
| 'android.permission.BLUETOOTH_CONNECT'
| 'android.permission.BLUETOOTH_SCAN'
| 'android.permission.BLUETOOTH_ADVERTISE';
| 'android.permission.BLUETOOTH_ADVERTISE'
| 'android.permission.ACCESS_MEDIA_LOCATION';
*/

export interface Spec extends TurboModule {
Expand Down
2 changes: 2 additions & 0 deletions Libraries/PermissionsAndroid/PermissionsAndroid.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ const PERMISSIONS = Object.freeze({
BLUETOOTH_CONNECT: 'android.permission.BLUETOOTH_CONNECT',
BLUETOOTH_SCAN: 'android.permission.BLUETOOTH_SCAN',
BLUETOOTH_ADVERTISE: 'android.permission.BLUETOOTH_ADVERTISE',
ACCESS_MEDIA_LOCATION: 'android.permission.ACCESS_MEDIA_LOCATION',
});

/**
Expand All @@ -75,6 +76,7 @@ class PermissionsAndroid {
ACCESS_BACKGROUND_LOCATION: string,
ACCESS_COARSE_LOCATION: string,
ACCESS_FINE_LOCATION: string,
ACCESS_MEDIA_LOCATION: string,
ADD_VOICEMAIL: string,
BLUETOOTH_ADVERTISE: string,
BLUETOOTH_CONNECT: string,
Expand Down

0 comments on commit 79db483

Please sign in to comment.