Bläddra i källkod

Merge pull request #39 from pfeiffer/patch-1

Android: Specify locale to toUpperCase call
Yonah Forst 8 år sedan
förälder
incheckning
f20918041d

+ 2
- 1
android/src/main/java/com/joshblour/reactnativepermissions/ReactNativePermissionsModule.java Visa fil

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