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
Change-Id: I3ba614e3b4e1b63973510d687459f822cb441bd7
This commit is contained in:
chayemme 2024-07-29 14:13:25 +05:30
commit eeed24cd54

View file

@ -2266,8 +2266,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) {
telephonyCb.eventuallyExpect(
CallbackEntry.AVAILABLE, CELL_DATA_AVAILABLE_TIMEOUT_MS);