summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2019-11-28 23:40:42 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2019-11-28 23:40:42 -0800
commit0dd76f52e0ca95f759a6082aa69cb968ad1f4b13 (patch)
tree850f135e62384e030b212cdc26253fb5d5e007c5
parent971b5050362f40eb131ecf8a3519600672a86d6b (diff)
parent6bb719c84f7bc359bae05905aaffc571bdf6f056 (diff)
downloadandroid_packages_apps_Snap-0dd76f52e0ca95f759a6082aa69cb968ad1f4b13.zip
android_packages_apps_Snap-0dd76f52e0ca95f759a6082aa69cb968ad1f4b13.tar.gz
android_packages_apps_Snap-0dd76f52e0ca95f759a6082aa69cb968ad1f4b13.tar.bz2
Merge "SnapdraongCamera:Fix recording pause" into camera-SnapdragonCamera.lnx.2.0
-rwxr-xr-xsrc/com/android/camera/CaptureModule.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index 741b952..d16f9ca 100755
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -3121,7 +3121,7 @@ public class CaptureModule implements CameraModule, PhotoController,
} catch (InterruptedException e) {
mCameraOpenCloseLock.release();
throw new RuntimeException("Interrupted while trying to lock camera closing.", e);
- } catch (CameraAccessException e) {
+ } catch (CameraAccessException | IllegalStateException e) {
e.printStackTrace();
} finally {
mCameraOpenCloseLock.release();
@@ -5183,7 +5183,13 @@ public class CaptureModule implements CameraModule, PhotoController,
boolean noNeedEndOfStreamInHFR = mHighSpeedCapture &&
((int)mHighSpeedFPSRange.getUpper() >= HIGH_SESSION_MAX_FPS);
if (noNeedEndofStreamWhenPause || noNeedEndOfStreamInHFR) {
- mMediaRecorder.pause();
+ try{
+ mMediaRecorder.pause();
+ } catch (IllegalStateException e){
+ e.printStackTrace();
+ mMediaRecorderPausing = false;
+ }
+
} else {
setEndOfStream(false, false);
}