diff options
author | jinwu <jinwu@codeaurora.org> | 2018-10-31 14:51:28 +0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-11-01 19:45:56 -0700 |
commit | 66be79fe2c10a06c441bd5126ea1871e61c7b0b4 (patch) | |
tree | e5b7feea5ce93a1f345260b028a96e4edab34baf /src | |
parent | ec52aba26e10c070ff2064adebe5bacbbeea2b89 (diff) | |
download | android_packages_apps_Snap-66be79fe2c10a06c441bd5126ea1871e61c7b0b4.tar.gz android_packages_apps_Snap-66be79fe2c10a06c441bd5126ea1871e61c7b0b4.tar.bz2 android_packages_apps_Snap-66be79fe2c10a06c441bd5126ea1871e61c7b0b4.zip |
Preview screen error after record video many times
Add judgement to avoid this issue.
Change-Id: I4f3c543baec27a61bd91cf7d89d348230abb669a
Diffstat (limited to 'src')
-rwxr-xr-x | src/com/android/camera/CaptureModule.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java index 82f4b4c1c..055914962 100755 --- a/src/com/android/camera/CaptureModule.java +++ b/src/com/android/camera/CaptureModule.java @@ -4166,7 +4166,7 @@ public class CaptureModule implements CameraModule, PhotoController, } catch (IllegalStateException e) { e.printStackTrace(); } - if (!mFrameProcessor.isFrameListnerEnabled() && !startMediaRecorder()) { + if ((!mFrameProcessor.isFrameListnerEnabled() && !startMediaRecorder()) || !mIsRecordingVideo) { mUI.showUIafterRecording(); releaseMediaRecorder(); mFrameProcessor.setVideoOutputSurface(null); @@ -4887,6 +4887,7 @@ public class CaptureModule implements CameraModule, PhotoController, mFrameProcessor.setVideoOutputSurface(null); mFrameProcessor.onClose(); closePreviewSession(); + mIsRecordingVideo = false; try { mMediaRecorder.setOnErrorListener(null); mMediaRecorder.setOnInfoListener(null); @@ -4910,7 +4911,6 @@ public class CaptureModule implements CameraModule, PhotoController, mUI.showRecordingUI(false, false); mUI.enableShutter(true); - mIsRecordingVideo = false; if (mIntentMode == INTENT_MODE_VIDEO) { if (isQuickCapture()) { onRecordingDone(true); |