diff --git a/camera/provider/aidl/vts/VtsAidlHalCameraProvider_TargetTest.cpp b/camera/provider/aidl/vts/VtsAidlHalCameraProvider_TargetTest.cpp index 31e8014a84..7447d124e9 100644 --- a/camera/provider/aidl/vts/VtsAidlHalCameraProvider_TargetTest.cpp +++ b/camera/provider/aidl/vts/VtsAidlHalCameraProvider_TargetTest.cpp @@ -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*/);