boolean stop = mMediaRecorderRecording;
if (stop) {
+ // CameraAppUI mishandles mode option enable/disable
+ // for video, override that
+ mAppController.getCameraAppUI().enableModeOptions();
onStopVideoRecording();
} else {
+ // CameraAppUI mishandles mode option enable/disable
+ // for video, override that
+ mAppController.getCameraAppUI().disableModeOptions();
startVideoRecording();
}
mAppController.setShutterEnabled(false);
hideModeCover();
}
- /**
- * Set the mode options toggle clickable.
- */
- public void enableModeOptions() {
- /*
- * For modules using camera 1 api, this gets called in
- * onSurfaceTextureUpdated whenever the preview gets stopped and
- * started after each capture. This also takes care of the
- * case where the mode options might be unclickable when we
- * switch modes
- *
- * For modules using camera 2 api, they're required to call this
- * method when a capture is "completed". Unfortunately this differs
- * per module implementation.
- */
- mModeOptionsOverlay.setToggleClickable(true);
- }
-
@Override
public void onShutterButtonClick() {
/*
* can clearly see when the toggle becomes clickable again,
* keep all of that logic at this level.
*/
- mModeOptionsOverlay.setToggleClickable(false);
+ disableModeOptions();
}
@Override
}
/**
+ * Set the mode options toggle clickable.
+ */
+ public void enableModeOptions() {
+ /*
+ * For modules using camera 1 api, this gets called in
+ * onSurfaceTextureUpdated whenever the preview gets stopped and
+ * started after each capture. This also takes care of the
+ * case where the mode options might be unclickable when we
+ * switch modes
+ *
+ * For modules using camera 2 api, they're required to call this
+ * method when a capture is "completed". Unfortunately this differs
+ * per module implementation.
+ */
+ mModeOptionsOverlay.setToggleClickable(true);
+ }
+
+ /**
+ * Set the mode options toggle not clickable.
+ */
+ public void disableModeOptions() {
+ mModeOptionsOverlay.setToggleClickable(false);
+ }
+
+ /**
* Gets called when a mode is selected from {@link com.android.camera.ui.ModeListView}
*
* @param modeIndex mode index of the selected mode