diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/com/android/camera/CaptureModule.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java index 8a2f046f4..d9e8473c1 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"); @@ -3572,6 +3573,7 @@ public class CaptureModule implements CameraModule, PhotoController, mStopRecPending = true; boolean shouldAddToMediaStoreNow = false; // Stop recording + checkAndPlayRecordSound(cameraId, false); mFrameProcessor.setVideoOutputSurface(null); mFrameProcessor.onClose(); closePreviewSession(); @@ -4525,6 +4527,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); |