}
mAppController.getCameraAppUI().transitionToCapture();
mAppController.getCameraAppUI().showModeOptions();
+ mAppController.setShutterEnabled(true);
}
@Override
// If we are already in the middle of taking a snapshot or the image
// save request is full then ignore.
if (mCameraDevice == null || mCameraState == SNAPSHOT_IN_PROGRESS
- || mCameraState == SWITCHING_CAMERA || !mAppController.isShutterEnabled()) {
+ || mCameraState == SWITCHING_CAMERA) {
return false;
}
+ setCameraState(SNAPSHOT_IN_PROGRESS);
+
mCaptureStartTime = System.currentTimeMillis();
mPostViewPictureCallbackTime = 0;
mJpegRotation = info.getJpegOrientation(orientation);
mCameraDevice.setJpegOrientation(mJpegRotation);
- // We don't want user to press the button again while taking a
- // multi-second HDR photo.
- mAppController.setShutterEnabled(false);
mCameraDevice.takePicture(mHandler,
new ShutterCallback(!animateBefore),
mRawPictureCallback, mPostViewPictureCallback,
mNamedImages.nameNewImage(mCaptureStartTime);
mFaceDetectionStarted = false;
- setCameraState(SNAPSHOT_IN_PROGRESS);
return true;
}
@Override
public void onShutterButtonClick() {
if (mPaused || (mCameraState == SWITCHING_CAMERA)
- || (mCameraState == PREVIEW_STOPPED)) {
+ || (mCameraState == PREVIEW_STOPPED)
+ || !mAppController.isShutterEnabled()) {
mVolumeButtonClickedFlag = false;
return;
}
Log.d(TAG, "onShutterButtonClick: mCameraState=" + mCameraState +
" mVolumeButtonClickedFlag=" + mVolumeButtonClickedFlag);
+ mAppController.setShutterEnabled(false);
+
int countDownDuration = mActivity.getSettingsManager()
.getInteger(SettingsManager.SCOPE_GLOBAL, Keys.KEY_COUNTDOWN_DURATION);
mTimerDuration = countDownDuration;