Merge "Restore the null behavior of buildWifiTemplate"
diff --git a/tests/cts/net/src/android/net/cts/ConnectivityManagerTest.java b/tests/cts/net/src/android/net/cts/ConnectivityManagerTest.java
index e90e15a..d6d384b 100644
--- a/tests/cts/net/src/android/net/cts/ConnectivityManagerTest.java
+++ b/tests/cts/net/src/android/net/cts/ConnectivityManagerTest.java
@@ -2556,15 +2556,14 @@
try {
tetherEventCallback.assumeWifiTetheringSupported(mContext);
- final TestableNetworkCallback wifiCb = new TestableNetworkCallback();
- mCtsNetUtils.ensureWifiConnected();
- registerCallbackAndWaitForAvailable(makeWifiNetworkRequest(), wifiCb);
+ tetherUtils.startWifiTethering(tetherEventCallback);
// Update setting to verify the behavior.
setAirplaneMode(true);
- // Verify wifi lost to make sure airplane mode takes effect. This could
+ // Verify softap lost to make sure airplane mode takes effect. This could
// prevent the race condition between airplane mode enabled and the followed
// up wifi tethering enabled.
- waitForLost(wifiCb);
+ tetherEventCallback.expectNoTetheringActive();
+
// start wifi tethering
tetherUtils.startWifiTethering(tetherEventCallback);