Catch exception for unsupported configuration(HDR10 + 120FPS)
Change-Id: If9059bd4ee54dde9a0b4ffd8aa86b4c61b9f1196
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index a71eaea..06ba448 100755
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -7237,7 +7237,11 @@
@Override
public void onError(MediaRecorder mr, int what, int extra) {
Log.e(TAG, "MediaRecorder error. what=" + what + ". extra=" + extra);
- stopRecordingVideo(getMainCameraId());
+ try {
+ stopRecordingVideo(getMainCameraId());
+ } catch (UnsupportedOperationException e) {
+ Log.w(TAG, "stop recording failed: " + e);
+ }
mUI.showUIafterRecording();
if (what == MediaRecorder.MEDIA_RECORDER_ERROR_UNKNOWN) {
// We may have run out of space on the sdcard.