diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2018-09-24 19:52:28 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-09-24 19:52:27 -0700 |
commit | 05239cd620c1594d5a04de75082baf78d646b403 (patch) | |
tree | 79de8af87c030ace8c966f0bc003f1d34942743e | |
parent | 677b578500318352ceadc7c22336c93b20db643c (diff) | |
parent | 3b1cc30253e93f10458e5312a788de90710cac36 (diff) | |
download | android_packages_apps_Snap-05239cd620c1594d5a04de75082baf78d646b403.tar.gz android_packages_apps_Snap-05239cd620c1594d5a04de75082baf78d646b403.tar.bz2 android_packages_apps_Snap-05239cd620c1594d5a04de75082baf78d646b403.zip |
Merge "SnapdragonCamera:ZSL size" into camera-SnapdragonCamera.lnx.2.0
-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 31f85787c..057b17790 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; @@ -3785,7 +3787,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); if (rawSize == null || rawSize.length == 0) { |