remove write external storage permission only on android 11
This commit is contained in:
parent
2437d998ac
commit
f63a954547
|
@ -227,8 +227,8 @@ class PickerModule extends ReactContextBaseJavaModule implements ActivityEventLi
|
||||||
List<String> missingPermissions = new ArrayList<>();
|
List<String> missingPermissions = new ArrayList<>();
|
||||||
List<String> supportedPermissions = new ArrayList<>(requiredPermissions);
|
List<String> supportedPermissions = new ArrayList<>(requiredPermissions);
|
||||||
|
|
||||||
// we should not ask for WRITE_EXTERNAL_STORAGE when android on version with scoped storage
|
// android 11 introduced scoped storage, and WRITE_EXTERNAL_STORAGE no longer works there
|
||||||
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.P) {
|
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.Q) {
|
||||||
supportedPermissions.remove(Manifest.permission.WRITE_EXTERNAL_STORAGE);
|
supportedPermissions.remove(Manifest.permission.WRITE_EXTERNAL_STORAGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue