Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b0215934 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Camera: Add PRIVATE format to the default supported sizes" into main

parents 132d277f f23316eb
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -229,9 +229,10 @@ public final class CameraExtensionCharacteristics {
                                                     StreamConfigurationMap streamMap) {
        ArrayList<Size> ret = getSupportedSizes(sizesList, format);

        if (format == ImageFormat.JPEG || format == ImageFormat.YUV_420_888) {
        if (format == ImageFormat.JPEG || format == ImageFormat.YUV_420_888 ||
                format == ImageFormat.PRIVATE) {
            // Per API contract it is assumed that the extension is able to support all
            // camera advertised sizes for JPEG and YUV_420_888 in case it doesn't return
            // camera advertised sizes for JPEG, YUV_420_888 and PRIVATE in case it doesn't return
            // a valid non-empty size list.
            Size[] supportedSizes = streamMap.getOutputSizes(format);
            if ((ret.isEmpty()) && (supportedSizes != null)) {