summaryrefslogtreecommitdiff
path: root/src/com/android/camera/CaptureModule.java
diff options
context:
space:
mode:
authorjunjiez <junjiez@codeaurora.org>2018-11-27 14:06:26 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2018-12-14 00:19:15 -0800
commitd433dc0bde5bad369abbbab67a61d9cbbea8ae5c (patch)
treed19e26c86cf73baaee5c26115b32dba58f657dbb /src/com/android/camera/CaptureModule.java
parent07d7d91f8e6afca1cda50c6f0d63120518a26a57 (diff)
SnapdraongCamera:Fix IllegalStateException
Catch the IllegalStateException when release mediaRecorder to avoid FC Change-Id: I2d2bab99f4ad91c54770633b03d206be4d34fd4d CRs-Fixed: 2355038
Diffstat (limited to 'src/com/android/camera/CaptureModule.java')
-rwxr-xr-xsrc/com/android/camera/CaptureModule.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index 13e5ee8af..758755646 100755
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -7208,9 +7208,13 @@ public class CaptureModule implements CameraModule, PhotoController,
Log.v(TAG, "Releasing media recorder.");
if (mMediaRecorder != null) {
cleanupEmptyFile();
- mMediaRecorder.reset();
- mMediaRecorder.release();
- mMediaRecorder = null;
+ try{
+ mMediaRecorder.reset();
+ mMediaRecorder.release();
+ mMediaRecorder = null;
+ }catch (IllegalStateException e) {
+ e.printStackTrace();
+ }
}
mVideoFilename = null;
}