summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShuzhen Wang <shuzhenwang@google.com>2023-04-05 03:22:33 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-04-05 03:22:33 +0000
commitd826beaf601fad310723344b7c356f1e56c7c8d6 (patch)
tree6fd2aba5b40ea783bd95d2c9bd142b35af5e8f4c
parentd00b8598bb9f5b993a2b80b5525cde1cb535369f (diff)
parentd7e13ac229f9395c42a584f07d1b1e1b76347409 (diff)
Camera: Fix VTS failure for depth only camera am: 72f97643fb am: e5489ab299 am: d7e13ac229
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2523160 Change-Id: I8e45b2faf0813c423cdf06bcc167fff056953c60 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);
}