mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2025-01-19 03:35:10 +08:00
CB-13415 (android) Importing corrupt images using the Camera plugin c… (#309)
* CB-13415 (android) Importing corrupt images using the Camera plugin crashes the app
This commit is contained in:
parent
ad8788a5e6
commit
bf935dfbd2
@ -943,7 +943,12 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
|
||||
try {
|
||||
fileStream = FileHelper.getInputStreamFromUriString(imageUrl, cordova);
|
||||
image = BitmapFactory.decodeStream(fileStream);
|
||||
} finally {
|
||||
} catch (OutOfMemoryError e) {
|
||||
callbackContext.error(e.getLocalizedMessage());
|
||||
} catch (Exception e){
|
||||
callbackContext.error(e.getLocalizedMessage());
|
||||
}
|
||||
finally {
|
||||
if (fileStream != null) {
|
||||
try {
|
||||
fileStream.close();
|
||||
|
Loading…
Reference in New Issue
Block a user