summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/CaptureModule.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/camera/CaptureModule.java')
-rwxr-xr-xsrc/com/android/camera/CaptureModule.java6
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];