summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsrc/com/android/camera/CaptureModule.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index 62e5bfa13..4fa1de0ea 100755
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -3367,6 +3367,17 @@ public class CaptureModule implements CameraModule, PhotoController,
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
+ } catch (IllegalArgumentException e) {
+ //surface of mediaRecorder is not valid
+ Toast.makeText(mActivity,"Could not start media recorder.\n " +
+ "Can't start video recording.", Toast.LENGTH_LONG).show();
+ releaseMediaRecorder();
+ releaseAudioFocus();
+ mStartRecPending = false;
+ mIsRecordingVideo = false;
+ mUI.showUIafterRecording();
+ mFrameProcessor.setVideoOutputSurface(null);
+ restartSession(true);
}
mStartRecPending = false;
return true;