diff options
author | junjiez <junjiez@codeaurora.org> | 2017-05-02 15:08:57 +0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-05-02 00:34:31 -0700 |
commit | 36a419d399f894914dec54dfb93cc7e6005ce175 (patch) | |
tree | 84283de1f72f147b1b5f7c573b1ad53891f6fe16 | |
parent | c66c5555da7d53afdc4f555ff761bb7d66406813 (diff) | |
download | android_packages_apps_Snap-36a419d399f894914dec54dfb93cc7e6005ce175.tar.gz android_packages_apps_Snap-36a419d399f894914dec54dfb93cc7e6005ce175.tar.bz2 android_packages_apps_Snap-36a419d399f894914dec54dfb93cc7e6005ce175.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
-rw-r--r-- | src/com/android/camera/CaptureModule.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java index 346a818d3..3e3807b42 100644 --- a/src/com/android/camera/CaptureModule.java +++ b/src/com/android/camera/CaptureModule.java @@ -3138,8 +3138,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(); |