summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/VideoModule.java
diff options
context:
space:
mode:
authorAngus Kong <shkong@google.com>2013-03-25 23:11:43 -0700
committerAngus Kong <shkong@google.com>2013-03-27 12:58:38 -0700
commitdcb0ef1d6eacdd7d18a6881ae75f67c9851a858c (patch)
treee38c8b746075db3293bfc2340bfb6f5a9e7ac372 /src/com/android/camera/VideoModule.java
parent0d00a8907096b9970ac64f52abbd2bfc1ed751b6 (diff)
downloadandroid_packages_apps_Snap-dcb0ef1d6eacdd7d18a6881ae75f67c9851a858c.tar.gz
android_packages_apps_Snap-dcb0ef1d6eacdd7d18a6881ae75f67c9851a858c.tar.bz2
android_packages_apps_Snap-dcb0ef1d6eacdd7d18a6881ae75f67c9851a858c.zip
Make camera calls asynchronous
bug:8438047 Change-Id: I151d5ff85f0fb3646432a64b5841256a1448f101
Diffstat (limited to 'src/com/android/camera/VideoModule.java')
-rw-r--r--src/com/android/camera/VideoModule.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java
index 94c862502..ea50033fc 100644
--- a/src/com/android/camera/VideoModule.java
+++ b/src/com/android/camera/VideoModule.java
@@ -1123,6 +1123,7 @@ public class VideoModule implements CameraModule,
setupMediaRecorderPreviewDisplay();
// Unlock the camera object before passing it to media recorder.
mActivity.mCameraDevice.unlock();
+ mActivity.mCameraDevice.waitDone();
mMediaRecorder.setCamera(mActivity.mCameraDevice.getCamera());
if (!mCaptureTimeLapse) {
mMediaRecorder.setAudioSource(MediaRecorder.AudioSource.CAMCORDER);
@@ -1647,6 +1648,7 @@ public class VideoModule implements CameraModule,
releaseMediaRecorder();
if (!mPaused) {
mActivity.mCameraDevice.lock();
+ mActivity.mCameraDevice.waitDone();
if (ApiHelper.HAS_SURFACE_TEXTURE &&
!ApiHelper.HAS_SURFACE_TEXTURE_RECORDING) {
stopPreview();