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

Commit f23316eb authored by Emilian Peev's avatar Emilian Peev
Browse files

Camera: Add PRIVATE format to the default supported sizes

Suface class size queries always default to PRIVATE image format.
We should also include this format as part of the default
SDR supported outputs.

Bug: 329521982
Test: Camera CTS
Change-Id: I2cc9aa39f6760d130f5b68ad5ef3956eae561322
parent 783ed50c
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)) {