diff options
author | jinwu <jinwu@codeaurora.org> | 2018-09-21 18:15:19 +0800 |
---|---|---|
committer | jinwu <jinwu@codeaurora.org> | 2018-09-21 18:15:19 +0800 |
commit | 3b1cc30253e93f10458e5312a788de90710cac36 (patch) | |
tree | 6a73ad9f6b84d464c6c750a332c1f2b45d920014 /src | |
parent | a26301351c28e820f6c2346ebd07265cfed14c8b (diff) | |
download | android_packages_apps_Snap-3b1cc30253e93f10458e5312a788de90710cac36.tar.gz android_packages_apps_Snap-3b1cc30253e93f10458e5312a788de90710cac36.tar.bz2 android_packages_apps_Snap-3b1cc30253e93f10458e5312a788de90710cac36.zip |
SnapdragonCamera:ZSL size
Sort the output sizes of ZSl and
set the max size for ZSL to ensure
that the image will not be cropped.
Change-Id: Iba7e924b0ee7819586a7b190f5ffda5703f05ffc
CRs-Fixed: 2290545
Diffstat (limited to 'src')
-rwxr-xr-x | src/com/android/camera/CaptureModule.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java index 7bfee3041..2e70b53e9 100755 --- a/src/com/android/camera/CaptureModule.java +++ b/src/com/android/camera/CaptureModule.java @@ -137,6 +137,8 @@ import java.io.OutputStream; import java.nio.ByteBuffer; import java.text.SimpleDateFormat; import java.util.ArrayList; +import java.util.Arrays; +import java.util.Comparator; import java.util.Date; import java.util.LinkedList; import java.util.List; @@ -3778,7 +3780,9 @@ public class CaptureModule implements CameraModule, PhotoController, mPictureSize = parsePictureSize(pictureSize); Size[] prevSizes = mSettingsManager.getSupportedOutputSize(getMainCameraId(), SurfaceHolder.class); - mSupportedMaxPictureSize = prevSizes[0]; + List<Size> prevSizeList = Arrays.asList(prevSizes); + prevSizeList.sort((o1,o2) -> o2.getWidth()*o2.getHeight() - o1.getWidth()*o1.getHeight()); + mSupportedMaxPictureSize = prevSizeList.get(0); Size[] rawSize = mSettingsManager.getSupportedOutputSize(getMainCameraId(), ImageFormat.RAW10); mSupportedRawPictureSize = rawSize[0]; |