summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShuzhen Wang <shuzhenwang@google.com>2023-04-05 02:52:08 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-04-05 02:52:08 +0000
commitd7e13ac229f9395c42a584f07d1b1e1b76347409 (patch)
treece1454f42258b91042581ae0628a20a07e6f956b
parent1e591051f843fa1ea38ba0ad06246eac6a71256a (diff)
parente5489ab299138d65b57507234b1c4157f74727ab (diff)
downloadinterfaces-d7e13ac229f9395c42a584f07d1b1e1b76347409.tar.gz
Camera: Fix VTS failure for depth only camera am: 72f97643fb am: e5489ab299
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2523160 Change-Id: Ie7635f706dd8b9d13997700532f286ec56d32958 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp2
-rw-r--r--camera/provider/aidl/vts/camera_aidl_test.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp b/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
index 5ea6ae238e..317f02ea1a 100644
--- a/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
+++ b/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
@@ -6346,7 +6346,7 @@ Status CameraHidlTest::getAvailableOutputStreams(const camera_metadata_t* static
AvailableStream depthPreviewThreshold = {kMaxPreviewWidth, kMaxPreviewHeight,
static_cast<int32_t>(PixelFormat::Y16)};
const AvailableStream* depthThreshold =
- (threshold != nullptr) ? threshold : &depthPreviewThreshold;
+ isDepthOnly(staticMeta) ? &depthPreviewThreshold : threshold;
fillOutputStreams(&depthEntry, outputStreams, depthThreshold,
ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_OUTPUT);
}
diff --git a/camera/provider/aidl/vts/camera_aidl_test.cpp b/camera/provider/aidl/vts/camera_aidl_test.cpp
index 573b8f1f02..dc106a173f 100644
--- a/camera/provider/aidl/vts/camera_aidl_test.cpp
+++ b/camera/provider/aidl/vts/camera_aidl_test.cpp
@@ -779,7 +779,7 @@ Status CameraAidlTest::getAvailableOutputStreams(const camera_metadata_t* static
AvailableStream depthPreviewThreshold = {kMaxPreviewWidth, kMaxPreviewHeight,
static_cast<int32_t>(PixelFormat::Y16)};
const AvailableStream* depthThreshold =
- (threshold != nullptr) ? threshold : &depthPreviewThreshold;
+ isDepthOnly(staticMeta) ? &depthPreviewThreshold : threshold;
fillOutputStreams(&depthEntry, outputStreams, depthThreshold,
ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_OUTPUT);
}