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

Commit 315bc097 authored by Eino-Ville Talvala's avatar Eino-Ville Talvala
Browse files

Camera2: Legacy: Lock down surface sizes before creating EGL surfaces

This ensures that sizes don't change after being initially inspected,
and/or stale size information isn't reused incorrectly.

Bug: 22092273
Change-Id: I5b26ea53977da4c1412e476d06d94aa791846393
parent cb59747d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -338,6 +338,8 @@ public class LegacyCameraDevice implements AutoCloseable {
                    } else {
                        sizedSurfaces.add(new Pair<>(output, s));
                    }
                    // Lock down the size before configuration
                    setSurfaceDimens(output, s.getWidth(), s.getHeight());
                } catch (BufferQueueAbandonedException e) {
                    Log.e(TAG, "Surface bufferqueue is abandoned, cannot configure as output: ", e);
                    return BAD_VALUE;