diff options
-rwxr-xr-x | src/com/android/camera/CaptureModule.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java index df0f43700..02d01c222 100755 --- a/src/com/android/camera/CaptureModule.java +++ b/src/com/android/camera/CaptureModule.java @@ -3297,6 +3297,7 @@ public class CaptureModule implements CameraModule, PhotoController, try { manager = (CameraManager) mActivity.getSystemService(Context.CAMERA_SERVICE); mCameraId[id] = manager.getCameraIdList()[id]; + mOriginalCropRegion[id] = mSettingsManager.getSensorActiveArraySize(id); if (!mCameraOpenCloseLock.tryAcquire(5000, TimeUnit.MILLISECONDS)) { Log.d(TAG, "Time out waiting to lock camera opening."); throw new RuntimeException("Time out waiting to lock camera opening"); @@ -4639,7 +4640,7 @@ public class CaptureModule implements CameraModule, PhotoController, } private boolean startRecordingVideo(final int cameraId) { - if (null == mCameraDevice[cameraId]) { + if (null == mCameraDevice[cameraId] || !mUI.isShutterEnabled()) { return false; } mStartRecordingTime = System.currentTimeMillis(); @@ -4669,7 +4670,9 @@ public class CaptureModule implements CameraModule, PhotoController, mState[cameraId] = STATE_PREVIEW; mControlAFMode = CaptureRequest.CONTROL_AF_MODE_CONTINUOUS_PICTURE; mIsAutoFocusStarted = false; - closePreviewSession(); + if (!isAbortCapturesEnable()) { + closePreviewSession(); + } mFrameProcessor.onClose(); if (mUI.setPreviewSize(mVideoPreviewSize.getWidth(), mVideoPreviewSize.getHeight())) { @@ -5305,7 +5308,7 @@ public class CaptureModule implements CameraModule, PhotoController, e.printStackTrace(); } } - if (!mPaused) { + if (!mPaused && !isAbortCapturesEnable()) { closePreviewSession(); } mMediaRecorderStarted = false; |