From 1cc4d564f2e0901c9f44211ff60958ab0471f363 Mon Sep 17 00:00:00 2001 From: Jimmy Chen Date: Tue, 7 Jul 2020 10:04:38 +0800 Subject: wifi: remove cached hal data on updating a network Bug: 160551408 Test: atest FrameworksWifiTests Change-Id: I1369978c9af1bb75ff76edd3b7ba8b22f921884c --- service/java/com/android/server/wifi/ClientModeImpl.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'service') diff --git a/service/java/com/android/server/wifi/ClientModeImpl.java b/service/java/com/android/server/wifi/ClientModeImpl.java index 678defbf2..6c31185da 100644 --- a/service/java/com/android/server/wifi/ClientModeImpl.java +++ b/service/java/com/android/server/wifi/ClientModeImpl.java @@ -1109,6 +1109,9 @@ public class ClientModeImpl extends StateMachine { @Override public void onNetworkUpdated(WifiConfiguration newConfig, WifiConfiguration oldConfig) { + // Clear invalid cached data. + mWifiNative.removeNetworkCachedData(oldConfig.networkId); + // Check if user/app change meteredOverride for connected network. if (newConfig.networkId != mLastNetworkId || newConfig.meteredOverride == oldConfig.meteredOverride) { -- cgit v1.2.3