summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--service/java/com/android/server/wifi/ClientModeImpl.java3
-rw-r--r--tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java1
2 files changed, 3 insertions, 1 deletions
diff --git a/service/java/com/android/server/wifi/ClientModeImpl.java b/service/java/com/android/server/wifi/ClientModeImpl.java
index fd79d8258..c1768eca9 100644
--- a/service/java/com/android/server/wifi/ClientModeImpl.java
+++ b/service/java/com/android/server/wifi/ClientModeImpl.java
@@ -3686,9 +3686,10 @@ public class ClientModeImpl extends StateMachine {
// TODO: b/79504296 This broadcast has been deprecated and should be removed
sendSupplicantConnectionChangedBroadcast(false);
- // Let's remove any ephemeral or passpoint networks.
+ // Remove any ephemeral or Passpoint networks, flush ANQP cache
mWifiConfigManager.removeAllEphemeralOrPasspointConfiguredNetworks();
mWifiConfigManager.clearUserTemporarilyDisabledList();
+ mPasspointManager.clearAnqpRequestsAndFlushCache();
}
void registerConnected() {
diff --git a/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java b/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java
index 3048ef3d5..aea141587 100644
--- a/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java
@@ -2364,6 +2364,7 @@ public class ClientModeImplTest extends WifiBaseTest {
inOrderMetrics.verify(mWifiMetrics).logStaEvent(StaEvent.TYPE_WIFI_DISABLED);
assertNull(wifiInfo.getBSSID());
assertEquals(SupplicantState.DISCONNECTED, wifiInfo.getSupplicantState());
+ verify(mPasspointManager).clearAnqpRequestsAndFlushCache();
// Send a SUPPLICANT_STATE_CHANGE_EVENT, verify WifiInfo is not updated
mCmi.sendMessage(WifiMonitor.SUPPLICANT_STATE_CHANGE_EVENT, 0, 0,