Parcourir la source

Add support for new dangerous permissions on Android

Mathieu Acthernoene il y a 5 ans
Parent
révision
cfaa2dd70c
1 fichiers modifiés avec 4 ajouts et 2 suppressions
  1. 4
    2
      index.js

+ 4
- 2
index.js Voir le fichier

@@ -12,9 +12,11 @@ const { RNPermissions } = NativeModules;
12 12
 
13 13
 export const ANDROID_PERMISSIONS = {
14 14
   ...PermissionsAndroid.PERMISSIONS,
15
-  // Dangerous permissions not included in PermissionsAndroid (which might be unavailable)
15
+  // Dangerous permissions not included in PermissionsAndroid
16
+  // They might be unavailable in the current OS
17
+  ANSWER_PHONE_CALLS: "android.permission.ANSWER_PHONE_CALLS",
16 18
   ACCEPT_HANDOVER: "android.permission.ACCEPT_HANDOVER",
17
-  // @TODO Add more of them (https://developer.android.com/reference/android/Manifest.permission)
19
+  READ_PHONE_NUMBERS: "android.permission.READ_PHONE_NUMBERS",
18 20
 };
19 21
 
20 22
 // function keyMirror<O: {}>(obj: O): $ObjMapi<O, <K>(k: K) => K> {