Skip WiFi test in CtsWifiTestCases and CtsNetTestCases modules if feature not supported

Test cases testSoftApConfigurationGetPersistentRandomizedMacAddress and testSetAirplaneMode
are using the wifi service even wifi feature is disabled.
This change skips the test based on WiFi feature

Bug: 349198732
Test: atest CtsNetTestCases
Change-Id: I1ed6bd9522fac0151c5ac3b20d1b002bab79dd12
Merged-In: I3ba614e3b4e1b63973510d687459f822cb441bd7
This commit is contained in:
chayemme 2024-06-25 13:22:06 +05:30 • committed by Lorenzo Colitti
commit 12dde98325

View file

@ -2202,8 +2202,10 @@ public class ConnectivityManagerTest {
// Verify that turning airplane mode off takes effect as expected.
// connectToCell only registers a request, it cannot / does not need to be called twice
mCtsNetUtils.ensureWifiConnected();
if (verifyWifi) waitForAvailable(wifiCb);
if (verifyWifi) {
mCtsNetUtils.ensureWifiConnected();
waitForAvailable(wifiCb);
}
if (supportTelephony) waitForAvailable(telephonyCb);
} finally {
// Restore the previous state of airplane mode and permissions: