update patch

This commit is contained in:
Gleidson Daniel 2022-09-14 16:10:01 -03:00
parent 878ed8b2fc
commit 1aecff2d69
2 changed files with 12 additions and 22 deletions

View File

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

View File

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