summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShuzhen Wang <shuzhenwang@google.com>2023-04-04 13:44:16 -0700
committerShuzhen Wang <shuzhenwang@google.com>2023-04-04 20:57:27 +0000
commit72f97643fbcca81e3a800fa8ad2104609a41d4ad (patch)
treeb37ff128c6ce0ede6dd3d1863cb685481e4d1a15
parent86206d71ca3849570d6aa7f6b43fade7fb9f9166 (diff)
Camera: Fix VTS failure for depth only camera
If the device is depth-only, use threshold with Y16 format rather than IMPLEMENTATION_DEFINED. This fixes the regression introduced by the fix for b/265984260. Bug: 276957901 Test: atest VtsAidlHalCameraProvider_TargetTest Change-Id: If9023f1ed17bb761abbb9be36e567264f8bf0689
-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);
}