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

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

Merge "Camera: Handle abandoned output surface in encodeSessionConfiguration" into main

parents 1c9d2a59 5df04fca
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -268,6 +268,12 @@ int64_t CameraServiceProxyWrapper::encodeSessionConfiguration(
            const auto& gbps = config.getGraphicBufferProducers();
            int32_t width = 0, height = 0;
            if (gbps.size() > 0) {
                if (gbps[0] == nullptr) {
                    ALOGE("%s: Failed to query size due to abandoned surface.",
                            __FUNCTION__);
                    return CameraFeatureCombinationStats::CAMERA_FEATURE_UNKNOWN;
                }

                sp<Surface> surface = new Surface(gbps[0], /*useAsync*/false);
                ANativeWindow *anw = surface.get();