diff options
author | Nate Jiang <qiangjiang@google.com> | 2020-04-09 16:45:41 -0700 |
---|---|---|
committer | Nate Jiang <qiangjiang@google.com> | 2020-04-09 18:53:25 -0700 |
commit | 572313da69d7f254af378bebff33030b9803ab7f (patch) | |
tree | 9e4430b01a35ab2d7699c5fd516f0e0eb7fdd360 /service | |
parent | b9e042d647ff9f0249151d774db05d1c44c026f9 (diff) |
When user approve IMSI protection exemption restore auto join.
Restore passpoint provider auto join when user approved.
Bug: 153683491
Test: atest com.android.server.wifi
Change-Id: I566105bb5291f8de02f87a8f4f6de151e0385cc3
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java b/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java index 894a8bc0f..28cf627b5 100644 --- a/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java +++ b/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java @@ -1168,9 +1168,19 @@ public class WifiNetworkSuggestionsManager { private void restoreInitialAutojoinForCarrierId(int carrierId) { for (PerAppInfo appInfo : mActiveNetworkSuggestionsPerApp.values()) { for (ExtendedWifiNetworkSuggestion ewns : appInfo.extNetworkSuggestions) { - if (isSimBasedSuggestion(ewns) - && getCarrierIdFromSuggestion(ewns) == carrierId) { - ewns.isAutojoinEnabled |= ewns.wns.isInitialAutoJoinEnabled; + if (!(isSimBasedSuggestion(ewns) + && getCarrierIdFromSuggestion(ewns) == carrierId)) { + continue; + } + if (mVerboseLoggingEnabled) { + Log.v(TAG, "Restore auto-join for suggestion: " + ewns); + } + ewns.isAutojoinEnabled |= ewns.wns.isInitialAutoJoinEnabled; + // Restore passpoint provider auto join. + if (ewns.wns.passpointConfiguration != null) { + mWifiInjector.getPasspointManager() + .enableAutojoin(ewns.wns.passpointConfiguration.getUniqueId(), + null, ewns.isAutojoinEnabled); } } } |