瀏覽代碼

Add support for new dangerous permissions on Android

Mathieu Acthernoene 5 年之前
父節點
當前提交
cfaa2dd70c
共有 1 個檔案被更改,包括 4 行新增2 行删除
  1. 4
    2
      index.js

+ 4
- 2
index.js 查看文件

@@ -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> {