Merge "Camera: Expect physical results in the last partial notification"

This commit is contained in:
Treehugger Robot 2020-11-13 20:45:34 +00:00 committed by Gerrit Code Review
commit cecee13161

View file

@ -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());