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

Commit 517b7453 authored by Igor Murashkin's avatar Igor Murashkin
Browse files

camera2: Fix StreamConfigurationMap#getOutputSizes for ImageReader

Return empty array since no implementation-defined sizes are supported

Bug: 17007153
Change-Id: I178e89ef6b2640896f8657765beb458022d66ae5
parent 49e057d7
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -339,6 +339,11 @@ public final class StreamConfigurationMap {
     * @see #isOutputSupportedFor(Class)
     */
    public <T> Size[] getOutputSizes(Class<T> klass) {
        // Image reader is "supported", but never for implementation-defined formats; return empty
        if (android.media.ImageReader.class.isAssignableFrom(klass)) {
            return new Size[0];
        }

        if (isOutputSupportedFor(klass) == false) {
            return null;
        }