DO NOT MERGE Revert "DO NOT MERGE CTS: Ensure CONFIGURED_NETWORKS_CHANGED_ACTION broadcast is received"

This reverts commit 91f3eb4ce7e405f381371fbab531f57d7b6c7f18.

Reason for revert: b/171022033

Change-Id: Iefb0edbca0254a9d7ee03175196152278e19a7d2
diff --git a/tests/tests/net/src/android/net/wifi/cts/WifiManagerTest.java b/tests/tests/net/src/android/net/wifi/cts/WifiManagerTest.java
index 7edb235..2ed0124 100644
--- a/tests/tests/net/src/android/net/wifi/cts/WifiManagerTest.java
+++ b/tests/tests/net/src/android/net/wifi/cts/WifiManagerTest.java
@@ -37,7 +37,6 @@
 import android.test.AndroidTestCase;
 import android.util.Log;
 
-import com.android.compatibility.common.util.PollingCheck;
 import com.android.compatibility.common.util.WifiConfigCreator;
 
 import java.net.HttpURLConnection;
@@ -457,34 +456,12 @@
             assertFalse(existSSID(SSID1));
             assertTrue(existSSID(SSID2));
 
-            // Need an effectively-final holder because we need to modify inner Intent in callback.
-            class IntentHolder {
-                Intent intent;
-            }
-            IntentHolder intentHolder = new IntentHolder();
-            mContext.registerReceiver(new BroadcastReceiver() {
-                @Override
-                public void onReceive(Context context, Intent intent) {
-                    Log.i(TAG, "Received CONFIGURED_NETWORKS_CHANGED_ACTION broadcast: " + intent);
-                    intentHolder.intent = intent;
-                }
-            }, new IntentFilter(WifiManager.CONFIGURED_NETWORKS_CHANGED_ACTION));
-
             // Remove a WifiConfig
             assertTrue(mWifiManager.removeNetwork(netId));
             assertFalse(mWifiManager.removeNetwork(notExist));
             assertFalse(existSSID(SSID1));
             assertFalse(existSSID(SSID2));
 
-            // Should receive CONFIGURED_NETWORKS_CHANGED_ACTION broadcast because CtsNetTestCases'
-            // AndroidManifest.xml has both ACCESS_WIFI_STATE & ACCESS_FINE_LOCATION permissions.
-            PollingCheck.check(
-                    "Didn't receive CONFIGURED_NETWORKS_CHANGED_ACTION broadcast!",
-                    DURATION,
-                    () -> intentHolder.intent != null);
-            Intent intent = intentHolder.intent;
-            assertEquals(WifiManager.CONFIGURED_NETWORKS_CHANGED_ACTION, intent.getAction());
-
             assertTrue(mWifiManager.saveConfiguration());
         } finally {
             reEnableNetworks(enabledSsids, mWifiManager.getConfiguredNetworks());