do not log errors, as they are alreayd logged by the camera engine, and do not put try catch around DNG captures

pull/1024/head
Michael Specht 5 years ago
parent 25bfa6126e
commit 03fb7f3537
  1. 5
      cameraview/src/main/java/com/otaliastudios/cameraview/picture/Full1PictureRecorder.java
  2. 22
      cameraview/src/main/java/com/otaliastudios/cameraview/picture/Full2PictureRecorder.java

@ -99,11 +99,6 @@ public class Full1PictureRecorder extends FullPictureRecorder {
);
LOG.i("take() returned.");
} catch (Exception e) {
String msg = "Error";
if (e.getMessage() != null) {
msg = e.getMessage();
}
Log.e("onTakePicture:", msg);
mError = e;
dispatchResult();
}

@ -87,24 +87,20 @@ public class Full2PictureRecorder extends FullPictureRecorder
public void onCaptureCompleted(@NonNull ActionHolder holder,
@NonNull CaptureRequest request,
@NonNull TotalCaptureResult result) {
super.onCaptureCompleted(holder, request, result);
try {
if (mResult.format == PictureFormat.DNG) {
mDngCreator = new DngCreator(holder.getCharacteristics(this), result);
mDngCreator.setOrientation(ExifHelper.getExifOrientation(mResult.rotation));
if (mResult.location != null) {
mDngCreator.setLocation(mResult.location);
}
}
super.onCaptureCompleted(holder, request, result);
} catch (Exception e) {
String msg = "Error";
if (e.getMessage() != null) {
msg = e.getMessage();
}
Log.e("onCaptureCompleted:", msg);
mError = e;
dispatchResult();
}
if (mResult.format == PictureFormat.DNG) {
mDngCreator = new DngCreator(holder.getCharacteristics(this), result);
mDngCreator.setOrientation(ExifHelper.getExifOrientation(mResult.rotation));
if (mResult.location != null) {
mDngCreator.setLocation(mResult.location);
}
}
}
};
}

Loading…
Cancel
Save