summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-05-13 21:11:18 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-05-13 21:11:18 -0700
commit9a89ef73f7d91180c4f16add7cce53449e3184f5 (patch)
treec207b012c669bc723c5e3afe80c32bcebf46b87f /src
parentdd42edfae98465a19aefba49f558e0b43ceca4c4 (diff)
parentd55a5e92d6065bd36a60925221d8cc9a773572eb (diff)
downloadLegacyCamera-9a89ef73f7d91180c4f16add7cce53449e3184f5.zip
LegacyCamera-9a89ef73f7d91180c4f16add7cce53449e3184f5.tar.gz
LegacyCamera-9a89ef73f7d91180c4f16add7cce53449e3184f5.tar.bz2
Merge change 1635 into donut
* changes: Restart preview after recording to avoid the bug in driver.
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/VideoCamera.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java
index efd465d..034836b 100644
--- a/src/com/android/camera/VideoCamera.java
+++ b/src/com/android/camera/VideoCamera.java
@@ -474,7 +474,12 @@ public class VideoCamera extends Activity implements View.OnClickListener,
private void startPreview() {
Log.v(TAG, "startPreview");
if (mPreviewing) {
- // After recording a video, preview is not stopped. So just return.
+ // We should just return here, but we stop and start again to avoid
+ // the bug in driver.
+ mCameraDevice.lock();
+ mCameraDevice.stopPreview();
+ mCameraDevice.startPreview();
+ mCameraDevice.unlock();
return;
}
@@ -509,8 +514,8 @@ public class VideoCamera extends Activity implements View.OnClickListener,
mCameraDevice.unlock();
}
- private void stopPreview() {
- Log.v(TAG, "stopPreview");
+ private void closeCamera() {
+ Log.v(TAG, "closeCamera");
if (mCameraDevice == null) {
Log.d(TAG, "already stopped.");
return;
@@ -556,7 +561,7 @@ public class VideoCamera extends Activity implements View.OnClickListener,
mStorageHint = null;
}
- stopPreview();
+ closeCamera();
mHandler.removeMessages(UPDATE_LAST_VIDEO);
}