Audio VTS: Simplify sequential #if
Test: compile
Change-Id: Ie30b0df64d122a8cac0a5fc8b2ebc5255fccbc24
Signed-off-by: Kevin Rocard <krocard@google.com>
diff --git a/audio/core/all-versions/vts/functional/AudioPrimaryHidlHalTest.h b/audio/core/all-versions/vts/functional/AudioPrimaryHidlHalTest.h
index 79ccc3c..fd061da 100644
--- a/audio/core/all-versions/vts/functional/AudioPrimaryHidlHalTest.h
+++ b/audio/core/all-versions/vts/functional/AudioPrimaryHidlHalTest.h
@@ -205,14 +205,13 @@
sp<IDevice> baseDevice;
ASSERT_OK(devicesFactory->openDevice(IDevicesFactory::Device::PRIMARY,
returnIn(result, baseDevice)));
-#elif MAJOR_VERSION == 4
- ASSERT_OK(devicesFactory->openPrimaryDevice(returnIn(result, device)));
-#endif
ASSERT_OK(result);
-#if MAJOR_VERSION == 2
ASSERT_TRUE(baseDevice != nullptr);
device = IPrimaryDevice::castFrom(baseDevice);
+#elif MAJOR_VERSION >= 4
+ ASSERT_OK(devicesFactory->openPrimaryDevice(returnIn(result, device)));
+ ASSERT_OK(result);
#endif
}
};