mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-01 10:32:51 +08:00
CB-1212: When camera is started, and then cancelled with no photo, attempt to read exif data results in fatal error
This commit is contained in:
parent
d35c913249
commit
c52dc10c9e
@ -273,6 +273,9 @@ public class CameraLauncher extends Plugin implements MediaScannerConnectionClie
|
|||||||
|
|
||||||
// If CAMERA
|
// If CAMERA
|
||||||
if (srcType == CAMERA) {
|
if (srcType == CAMERA) {
|
||||||
|
// If image available
|
||||||
|
if (resultCode == Activity.RESULT_OK) {
|
||||||
|
try {
|
||||||
// Create an ExifHelper to save the exif data that is lost during compression
|
// Create an ExifHelper to save the exif data that is lost during compression
|
||||||
ExifHelper exif = new ExifHelper();
|
ExifHelper exif = new ExifHelper();
|
||||||
try {
|
try {
|
||||||
@ -284,9 +287,7 @@ public class CameraLauncher extends Plugin implements MediaScannerConnectionClie
|
|||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
// If image available
|
|
||||||
if (resultCode == Activity.RESULT_OK) {
|
|
||||||
try {
|
|
||||||
Bitmap bitmap = null;
|
Bitmap bitmap = null;
|
||||||
Uri uri = null;
|
Uri uri = null;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user