summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawit Pornkitprasan <p.pawit@gmail.com>2013-12-25 13:50:51 +0700
committerMichael Bestas <mikeioannina@gmail.com>2015-09-17 23:26:02 +0300
commit94aff93adaaef84da82dfe46ac92a91c3b3fe2c8 (patch)
tree9af507c25280840b3bdafe09cbe413b2c455a81b
parent56a2f2a36a0f809dd277aa14ec75ca37e6f033db (diff)
downloadandroid_packages_apps_Snap-94aff93adaaef84da82dfe46ac92a91c3b3fe2c8.zip
android_packages_apps_Snap-94aff93adaaef84da82dfe46ac92a91c3b3fe2c8.tar.gz
android_packages_apps_Snap-94aff93adaaef84da82dfe46ac92a91c3b3fe2c8.tar.bz2
Camera2: Preview needs to be stopped when changing resolution
This was done in startPreview as a hack, but was removed in f729b85e12cfa2674048d8cce2f724014b8fc910. Specifically add it back when the resolution is changed. Change-Id: I306abd788bafdff4e6fba7eec4e6ff05bb3cc47c
-rw-r--r--src/com/android/camera/PhotoModule.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java
index 89dd346..616b629 100644
--- a/src/com/android/camera/PhotoModule.java
+++ b/src/com/android/camera/PhotoModule.java
@@ -2593,6 +2593,12 @@ public class PhotoModule
mErrorCallback.setActivity(mActivity);
mCameraDevice.setErrorCallback(mErrorCallback);
+ // Preview needs to be stopped when changing resolution
+ if (mRestartPreview && mCameraState != PREVIEW_STOPPED && mCameraState != INIT) {
+ stopPreview();
+ mRestartPreview = false;
+ }
+
if (mFocusManager == null) initializeFocusManager();
if (!mSnapshotOnIdle) {