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 66972d468..3f6ef8601 100644
--- a/service/java/com/android/server/wifi/ClientModeImpl.java
+++ b/service/java/com/android/server/wifi/ClientModeImpl.java
@@ -3681,9 +3681,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 cf1c4f97a..42a465ecc 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,