update patch
This commit is contained in:
parent
878ed8b2fc
commit
1aecff2d69
|
@ -1,22 +0,0 @@
|
||||||
index 3e84862..f683796 100644
|
|
||||||
--- a/node_modules/expo-image-picker/android/src/main/java/expo/modules/imagepicker/ImagePickerModule.kt
|
|
||||||
+++ b/node_modules/expo-image-picker/android/src/main/java/expo/modules/imagepicker/ImagePickerModule.kt
|
|
||||||
@@ -140,17 +140,7 @@ class ImagePickerModule(
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
- val permissionsResponseHandler = PermissionsResponseListener { permissionsResponse: Map<String, PermissionsResponse> ->
|
|
||||||
- if (permissionsResponse[Manifest.permission.WRITE_EXTERNAL_STORAGE]?.status == PermissionsStatus.GRANTED &&
|
|
||||||
- permissionsResponse[Manifest.permission.CAMERA]?.status == PermissionsStatus.GRANTED
|
|
||||||
- ) {
|
|
||||||
- launchCameraWithPermissionsGranted(promise, cameraIntent, pickerOptions)
|
|
||||||
- } else {
|
|
||||||
- promise.reject(SecurityException("User rejected permissions"))
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- mPermissions.askForPermissions(permissionsResponseHandler, Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.CAMERA)
|
|
||||||
+ return launchCameraWithPermissionsGranted(promise, cameraIntent, pickerOptions)
|
|
||||||
}
|
|
||||||
|
|
||||||
// NOTE: Currently not reentrant / doesn't support concurrent requests
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
index 7a28702..77888fc 100644
|
||||||
|
--- a/node_modules/expo-image-picker/android/src/main/java/expo/modules/imagepicker/ImagePickerModule.kt
|
||||||
|
+++ b/node_modules/expo-image-picker/android/src/main/java/expo/modules/imagepicker/ImagePickerModule.kt
|
||||||
|
@@ -56,7 +56,7 @@ class ImagePickerModule : Module() {
|
||||||
|
|
||||||
|
AsyncFunction("launchCameraAsync") Coroutine { options: ImagePickerOptions ->
|
||||||
|
ensureTargetActivityIsAvailable(options)
|
||||||
|
- ensureCameraPermissionsAreGranted()
|
||||||
|
+ // ensureCameraPermissionsAreGranted()
|
||||||
|
|
||||||
|
val mediaFile = createOutputFile(context.cacheDir, options.mediaTypes.toFileExtension())
|
||||||
|
val uri = mediaFile.toContentUri(context)
|
Loading…
Reference in New Issue