diff --git a/sensors/common/vts/2_X/VtsHalSensorsV2_XTargetTest.h b/sensors/common/vts/2_X/VtsHalSensorsV2_XTargetTest.h index 7e22b1902f..aa6e8814a2 100644 --- a/sensors/common/vts/2_X/VtsHalSensorsV2_XTargetTest.h +++ b/sensors/common/vts/2_X/VtsHalSensorsV2_XTargetTest.h @@ -559,6 +559,11 @@ TEST_P(SensorsHidlTest, CallInitializeTwice) { } TEST_P(SensorsHidlTest, CleanupConnectionsOnInitialize) { + if (getSensorsList().size() == 0) { + // No sensors + return; + } + activateAllSensors(true); // Verify that events are received