From 1aecff2d6933b91ac92f90ea791867f516a6d896 Mon Sep 17 00:00:00 2001 From: Gleidson Daniel Date: Wed, 14 Sep 2022 16:10:01 -0300 Subject: [PATCH] update patch --- patches/expo-image-picker+13.1.1.patch | 22 ---------------------- patches/expo-image-picker+13.3.1.patch | 12 ++++++++++++ 2 files changed, 12 insertions(+), 22 deletions(-) delete mode 100644 patches/expo-image-picker+13.1.1.patch create mode 100644 patches/expo-image-picker+13.3.1.patch diff --git a/patches/expo-image-picker+13.1.1.patch b/patches/expo-image-picker+13.1.1.patch deleted file mode 100644 index ad8808864..000000000 --- a/patches/expo-image-picker+13.1.1.patch +++ /dev/null @@ -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 -> -- 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 diff --git a/patches/expo-image-picker+13.3.1.patch b/patches/expo-image-picker+13.3.1.patch new file mode 100644 index 000000000..1c57dadb5 --- /dev/null +++ b/patches/expo-image-picker+13.3.1.patch @@ -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)