Loading camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp +17 −10 Original line number Diff line number Diff line Loading @@ -7155,18 +7155,25 @@ void CameraHidlTest::castDevice(const sp<device::V3_2::ICameraDevice>& device, sp<device::V3_5::ICameraDevice>* device3_5 /*out*/, sp<device::V3_7::ICameraDevice>* device3_7 /*out*/) { ASSERT_NE(nullptr, device3_5); if (deviceVersion == CAMERA_DEVICE_API_VERSION_3_5) { auto castResult = device::V3_5::ICameraDevice::castFrom(device); ASSERT_TRUE(castResult.isOk()); *device3_5 = castResult; } ASSERT_NE(nullptr, device3_7); if (deviceVersion == CAMERA_DEVICE_API_VERSION_3_7) { switch (deviceVersion) { case CAMERA_DEVICE_API_VERSION_3_7: { auto castResult = device::V3_7::ICameraDevice::castFrom(device); ASSERT_TRUE(castResult.isOk()); *device3_7 = castResult; } [[fallthrough]]; case CAMERA_DEVICE_API_VERSION_3_5: { auto castResult = device::V3_5::ICameraDevice::castFrom(device); ASSERT_TRUE(castResult.isOk()); *device3_5 = castResult; break; } default: // no-op return; } } //Cast camera provider to corresponding version if available Loading Loading
camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp +17 −10 Original line number Diff line number Diff line Loading @@ -7155,18 +7155,25 @@ void CameraHidlTest::castDevice(const sp<device::V3_2::ICameraDevice>& device, sp<device::V3_5::ICameraDevice>* device3_5 /*out*/, sp<device::V3_7::ICameraDevice>* device3_7 /*out*/) { ASSERT_NE(nullptr, device3_5); if (deviceVersion == CAMERA_DEVICE_API_VERSION_3_5) { auto castResult = device::V3_5::ICameraDevice::castFrom(device); ASSERT_TRUE(castResult.isOk()); *device3_5 = castResult; } ASSERT_NE(nullptr, device3_7); if (deviceVersion == CAMERA_DEVICE_API_VERSION_3_7) { switch (deviceVersion) { case CAMERA_DEVICE_API_VERSION_3_7: { auto castResult = device::V3_7::ICameraDevice::castFrom(device); ASSERT_TRUE(castResult.isOk()); *device3_7 = castResult; } [[fallthrough]]; case CAMERA_DEVICE_API_VERSION_3_5: { auto castResult = device::V3_5::ICameraDevice::castFrom(device); ASSERT_TRUE(castResult.isOk()); *device3_5 = castResult; break; } default: // no-op return; } } //Cast camera provider to corresponding version if available Loading