summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/CaptureModule.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/camera/CaptureModule.java')
-rwxr-xr-xsrc/com/android/camera/CaptureModule.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index d9625a5ee..129497d7e 100755
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -3196,6 +3196,7 @@ public class CaptureModule implements CameraModule, PhotoController,
mIsRecordingVideo = true;
mMediaRecorderPausing = false;
+ checkAndPlayRecordSound(cameraId, true);
mActivity.updateStorageSpaceAndHint();
if (mActivity.getStorageSpaceBytes() <= Storage.LOW_STORAGE_THRESHOLD_BYTES) {
Log.w(TAG, "Storage issue, ignore the start request");
@@ -3571,6 +3572,7 @@ public class CaptureModule implements CameraModule, PhotoController,
mStopRecPending = true;
boolean shouldAddToMediaStoreNow = false;
// Stop recording
+ checkAndPlayRecordSound(cameraId, false);
mFrameProcessor.setVideoOutputSurface(null);
mFrameProcessor.onClose();
closePreviewSession();
@@ -4524,6 +4526,16 @@ public class CaptureModule implements CameraModule, PhotoController,
}
}
+ private void checkAndPlayRecordSound(int id, boolean isStarted) {
+ if (id == getMainCameraId()) {
+ String value = mSettingsManager.getValue(SettingsManager.KEY_SHUTTER_SOUND);
+ if (value != null && value.equals("on") && mSound != null) {
+ mSound.play(isStarted? MediaActionSound.START_VIDEO_RECORDING
+ : MediaActionSound.STOP_VIDEO_RECORDING);
+ }
+ }
+ }
+
public void checkAndPlayShutterSound(int id) {
if (id == getMainCameraId()) {
String value = mSettingsManager.getValue(SettingsManager.KEY_SHUTTER_SOUND);