|
|
|
|
18
|
import com.facebook.react.bridge.ReadableArray;
|
18
|
import com.facebook.react.bridge.ReadableArray;
|
19
|
import com.facebook.react.modules.permissions.PermissionsModule;
|
19
|
import com.facebook.react.modules.permissions.PermissionsModule;
|
20
|
|
20
|
|
|
|
21
|
+import java.util.Locale;
|
21
|
|
22
|
|
22
|
public class ReactNativePermissionsModule extends ReactContextBaseJavaModule {
|
23
|
public class ReactNativePermissionsModule extends ReactContextBaseJavaModule {
|
23
|
private final ReactApplicationContext reactContext;
|
24
|
private final ReactApplicationContext reactContext;
|
|
|
|
|
114
|
}
|
115
|
}
|
115
|
|
116
|
|
116
|
private String permissionForString(String permission) {
|
117
|
private String permissionForString(String permission) {
|
117
|
- switch (RNType.valueOf(permission.toUpperCase())) {
|
|
|
|
|
118
|
+ switch (RNType.valueOf(permission.toUpperCase(Locale.ENGLISH))) {
|
118
|
case LOCATION:
|
119
|
case LOCATION:
|
119
|
return Manifest.permission.ACCESS_FINE_LOCATION;
|
120
|
return Manifest.permission.ACCESS_FINE_LOCATION;
|
120
|
case CAMERA:
|
121
|
case CAMERA:
|