Skip to content

Commit

Permalink
feat: add Android 12 BLUETOOTH_ADVERTISE to PermissionsAndroid (#32079)
Browse files Browse the repository at this point in the history
Summary:
This PR adds BLUETOOTH_ADVERTISE, which showed up in the latest Android 12 Beta build as new `dangerous` permissions requiring approval for them.

https://developer.android.com/reference/android/Manifest.permission.html#BLUETOOTH_ADVERTISE

You can see the new set of `SCAN/ADVERTISE/CONNECT` added in this doc - https://developer.android.com/about/versions/12/features/bluetooth-permissions, previously SCAN/CONNECT were added in: #31488

## Changelog

[Android] [Changed] - Add BLUETOOTH_ADVERTISE to PermissionsAndroid

Pull Request resolved: #32079

Test Plan:
```
PermissionsAndroid.BLUETOOTH_ADVERTISE === 'android.permission.BLUETOOTH_ADVERTISE'
```

Reviewed By: cortinico

Differential Revision: D30532656

Pulled By: yungsters

fbshipit-source-id: 986ad8cbfc27913df13ab24bba36f6e13104e7d9
  • Loading branch information
iBotPeaches authored and facebook-github-bot committed Aug 25, 2021
1 parent 2550948 commit 2bcc6fa
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 @@ -43,7 +43,8 @@ export type PermissionType =
| 'android.permission.READ_EXTERNAL_STORAGE'
| 'android.permission.WRITE_EXTERNAL_STORAGE'
| 'android.permission.BLUETOOTH_CONNECT'
| 'android.permission.BLUETOOTH_SCAN';
| 'android.permission.BLUETOOTH_SCAN'
| 'android.permission.BLUETOOTH_ADVERTISE';
*/

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 @@ -61,6 +61,7 @@ const PERMISSIONS = Object.freeze({
WRITE_EXTERNAL_STORAGE: 'android.permission.WRITE_EXTERNAL_STORAGE',
BLUETOOTH_CONNECT: 'android.permission.BLUETOOTH_CONNECT',
BLUETOOTH_SCAN: 'android.permission.BLUETOOTH_SCAN',
BLUETOOTH_ADVERTISE: 'android.permission.BLUETOOTH_ADVERTISE',
});

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

0 comments on commit 2bcc6fa

Please sign in to comment.