|
|
|
@ -428,6 +428,7 @@ class Camera1 extends CameraController { |
|
|
|
|
if (!mOptions.isVideoSnapshotSupported()) return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
// Set boolean to wait for image callback
|
|
|
|
|
mIsCapturingImage = true; |
|
|
|
|
final int exifRotation = computeExifRotation(); |
|
|
|
@ -459,6 +460,12 @@ class Camera1 extends CameraController { |
|
|
|
|
}); |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
catch (Exception e) { |
|
|
|
|
CameraException cameraException = new CapturingPictureFailedException("Capturing a picture failed.", e); |
|
|
|
|
mCameraCallbacks.onError(cameraException); |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@ -471,6 +478,8 @@ class Camera1 extends CameraController { |
|
|
|
|
capturePicture(); |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
mIsCapturingImage = true; |
|
|
|
|
mCamera.setOneShotPreviewCallback(new Camera.PreviewCallback() { |
|
|
|
|
@Override |
|
|
|
@ -503,6 +512,12 @@ class Camera1 extends CameraController { |
|
|
|
|
}); |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
catch (Exception e) { |
|
|
|
|
CameraException cameraException = new CapturingSnapshotFailedException("Capturing a snapshot failed.", e); |
|
|
|
|
mCameraCallbacks.onError(cameraException); |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
boolean shouldFlipSizes() { |
|
|
|
|