Camera: VTS: Skip session characterstics test for older HAL

getSessionCharacteristics test needs to be gated by HAL version.

Bug: 339233213
Test: vendor testing
Change-Id: Ib611ec64089eecab99f3b82c6c7c2826cfdb62c5
This commit is contained in:
Shuzhen Wang
2024-05-07 10:15:01 -07:00
parent 63c8f25a19
commit ced09a50dc

View File

@@ -299,6 +299,15 @@ TEST_P(CameraAidlTest, getSessionCharacteristics) {
ASSERT_TRUE(ret.isOk());
ASSERT_NE(device, nullptr);
int32_t interfaceVersion = -1;
ret = device->getInterfaceVersion(&interfaceVersion);
ASSERT_TRUE(ret.isOk());
bool supportSessionCharacteristics =
(interfaceVersion >= CAMERA_DEVICE_API_MINOR_VERSION_3);
if (!supportSessionCharacteristics) {
continue;
}
CameraMetadata meta;
openEmptyDeviceSession(name, mProvider, &mSession /*out*/, &meta /*out*/,
&device /*out*/);