From 0da1f396d042562cbda92f4ccca27ee94374a34f Mon Sep 17 00:00:00 2001 From: junjiez Date: Wed, 4 Jan 2017 11:16:27 +0800 Subject: 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 --- src/com/android/camera/CaptureUI.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/com/android') 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; } -- cgit v1.2.3