jcesarmobile closed pull request #309: CB-13415 (android) Importing corrupt 
images using the Camera plugin c?
URL: https://github.com/apache/cordova-plugin-camera/pull/309

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/src/android/CameraLauncher.java b/src/android/CameraLauncher.java
index a8e6fc43..fbe8470e 100644
--- a/src/android/CameraLauncher.java
+++ b/src/android/CameraLauncher.java
@@ -943,7 +943,12 @@ private Bitmap getScaledAndRotatedBitmap(String imageUrl) 
throws IOException {
             try {
                 fileStream = FileHelper.getInputStreamFromUriString(imageUrl, 
                 image = BitmapFactory.decodeStream(fileStream);
-            } finally {
+            }  catch (OutOfMemoryError e) {
+                callbackContext.error(e.getLocalizedMessage());
+            } catch (Exception e){
+                callbackContext.error(e.getLocalizedMessage());
+            }
+            finally {
                 if (fileStream != null) {
                     try {


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

With regards,
Apache Git Services

To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org

Reply via email to