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

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

Camera: Expect physical results in the last partial notification

Per API specification the physical device capture results will only
be part of the last/final partial result notification.

Bug: 165476824
Test: adb shell
/data/nativetest64/VtsHalCameraProviderV2_4TargetTest/VtsHalCameraProviderV2_4TargetTest

Change-Id: I0aa860b10ed2bd30c46f58ad0ee530c740f1f5d6
parent 51dc008b
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1209,7 +1209,12 @@ bool CameraHidlTest::DeviceCb::processCaptureResultLocked(const CaptureResult& r
            return notify;
        }

        if (physicalCameraMetadata.size() != request->expectedPhysicalResults.size()) {
        // Physical device results are only expected in the last/final
        // partial result notification.
        bool expectPhysicalResults = !(request->usePartialResult &&
                (results.partialResult < request->numPartialResults));
        if (expectPhysicalResults &&
                (physicalCameraMetadata.size() != request->expectedPhysicalResults.size())) {
            ALOGE("%s: Frame %d: Returned physical metadata count %zu "
                    "must be equal to expected count %zu", __func__, frameNumber,
                    physicalCameraMetadata.size(), request->expectedPhysicalResults.size());