summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/CaptureUI.java
diff options
context:
space:
mode:
authorjunjiez <junjiez@codeaurora.org>2017-01-04 11:16:27 +0800
committerjunjiez <junjiez@codeaurora.org>2017-01-09 19:37:37 +0800
commit0da1f396d042562cbda92f4ccca27ee94374a34f (patch)
tree7f3a894841d5d61b1ef5793c86d40b169774914d /src/com/android/camera/CaptureUI.java
parent15f6d966c807c371a12f68bf9f5f4e7447a9ba8e (diff)
downloadandroid_packages_apps_Snap-0da1f396d042562cbda92f4ccca27ee94374a34f.tar.gz
android_packages_apps_Snap-0da1f396d042562cbda92f4ccca27ee94374a34f.tar.bz2
android_packages_apps_Snap-0da1f396d042562cbda92f4ccca27ee94374a34f.zip
SnapdragonCamera: Fix preview in wrong size
After setPreviewSize() is called, the size of the preview is not changed, need to invoke showSurfaceView to make it update. Change-Id: I67215bcce77c1016a0dfd66d100dcd251597af78 CRs-Fixed: 1105422
Diffstat (limited to 'src/com/android/camera/CaptureUI.java')
-rwxr-xr-xsrc/com/android/camera/CaptureUI.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/camera/CaptureUI.java b/src/com/android/camera/CaptureUI.java
index 8bbbf1753..e8c3c6b07 100755
--- a/src/com/android/camera/CaptureUI.java
+++ b/src/com/android/camera/CaptureUI.java
@@ -624,7 +624,7 @@ public class CaptureUI implements FocusOverlayManager.FocusUI,
}
public void openSettingsMenu() {
- if (mPreviewLayout.getVisibility() == View.VISIBLE) {
+ if (mPreviewLayout != null && mPreviewLayout.getVisibility() == View.VISIBLE) {
return;
}
clearFocus();
@@ -1665,6 +1665,9 @@ public class CaptureUI implements FocusOverlayManager.FocusUI,
boolean changed = (width != mPreviewWidth) || (height != mPreviewHeight);
mPreviewWidth = width;
mPreviewHeight = height;
+ if (changed) {
+ showSurfaceView();
+ }
return changed;
}