summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/CaptureModule.java
diff options
context:
space:
mode:
authorjunjiez <junjiez@codeaurora.org>2017-05-02 15:08:57 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2017-05-02 02:13:05 -0700
commit840e159f9a9971aa20c5b8a7c0b2a5a9663dd456 (patch)
tree11d265fcf2602f9dec9419f7fee9e9469ad5808c /src/com/android/camera/CaptureModule.java
parentd35d20015170337d5b6092e852b2f54fde487ce3 (diff)
downloadandroid_packages_apps_Snap-840e159f9a9971aa20c5b8a7c0b2a5a9663dd456.tar.gz
android_packages_apps_Snap-840e159f9a9971aa20c5b8a7c0b2a5a9663dd456.tar.bz2
android_packages_apps_Snap-840e159f9a9971aa20c5b8a7c0b2a5a9663dd456.zip
SnapdragonCamera: fix crash in HFR
ConstrainedHighSpeedCaptureSession only supports some particular sizes, unsupported sizes will cause crash. When HFR is enabled, using video siez as preivew size to avoid crash. Change-Id: I9dad9690c2fc5a3fd25b758a7c3e0d892d63e35b CRs-Fixed: 2038913
Diffstat (limited to 'src/com/android/camera/CaptureModule.java')
-rwxr-xr-xsrc/com/android/camera/CaptureModule.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index c4f56f2a6..0f6e8ed62 100755
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -3131,8 +3131,13 @@ public class CaptureModule implements CameraModule, PhotoController,
mControlAFMode = CaptureRequest.CONTROL_AF_MODE_CONTINUOUS_PICTURE;
closePreviewSession();
mFrameProcessor.onClose();
- boolean changed = mUI.setPreviewSize(mVideoPreviewSize.getWidth(),
- mVideoPreviewSize.getHeight());
+
+ Size preview = mVideoPreviewSize;
+ if (mHighSpeedCapture) {
+ preview = mVideoSize;
+ }
+ boolean changed = mUI.setPreviewSize(preview.getWidth(),
+ preview.getHeight());
if (changed) {
mUI.hideSurfaceView();
mUI.showSurfaceView();