summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWu-cheng Li <wuchengli@google.com>2011-06-29 17:09:29 +0800
committerWu-cheng Li <wuchengli@google.com>2011-06-29 17:09:29 +0800
commit25c0a6c44f32788cb4e14095c48f1452b14530a6 (patch)
tree46aba0c21ba428025657ce482c501558c3fae564 /src
parent3f63a2d895c50ae1c3a7a47ee6ead070b5bbd7fc (diff)
downloadLegacyCamera-25c0a6c44f32788cb4e14095c48f1452b14530a6.zip
LegacyCamera-25c0a6c44f32788cb4e14095c48f1452b14530a6.tar.gz
LegacyCamera-25c0a6c44f32788cb4e14095c48f1452b14530a6.tar.bz2
Lock the camera if starting recording fails.
bug:4965716 Change-Id: I271ceb3790bd2d13d597c77cd26659d47298bb3a
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/VideoCamera.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java
index f53daa3..6dcb42d 100644
--- a/src/com/android/camera/VideoCamera.java
+++ b/src/com/android/camera/VideoCamera.java
@@ -1444,6 +1444,8 @@ public class VideoCamera extends ActivityBase
} catch (RuntimeException e) {
Log.e(TAG, "Could not start media recorder. ", e);
releaseMediaRecorder();
+ // If start fails, frameworks will not lock the camera for us.
+ mCameraDevice.lock();
return;
}
enableCameraControls(false);