diff options
author | Kumar Anand <kumaranand@google.com> | 2018-05-25 15:55:14 -0700 |
---|---|---|
committer | Kumar Anand <kumaranand@google.com> | 2018-05-31 23:26:42 +0000 |
commit | 6a4ab81c8842bc1115c7078c8798899e3a2e217c (patch) | |
tree | beac8c88c01e6e4204ce4828dbaa132f577919dd /service | |
parent | 7321b5dc86ba9f9de31588bf726008bf8a13138a (diff) |
wifi: do not reset country code on SIM removal
Telephony will set country code even in no sim case
based on emergency cell information. Hence Wifi
framework should not reset the country code set by
telephony blindly upon sim removal event.
Bug: 79955190
Test: ./frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Iebf7ce88d3d19ce1e00e3170e9809eb938201648
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/WifiCountryCode.java | 14 | ||||
-rw-r--r-- | service/java/com/android/server/wifi/WifiServiceImpl.java | 2 |
2 files changed, 0 insertions, 16 deletions
diff --git a/service/java/com/android/server/wifi/WifiCountryCode.java b/service/java/com/android/server/wifi/WifiCountryCode.java index 6f61d474a..ff9ff0200 100644 --- a/service/java/com/android/server/wifi/WifiCountryCode.java +++ b/service/java/com/android/server/wifi/WifiCountryCode.java @@ -79,20 +79,6 @@ public class WifiCountryCode { } /** - * This is called when sim card is removed. - * In this case we should invalid all other country codes except the - * phone default one. - */ - public synchronized void simCardRemoved() { - if (DBG) Log.d(TAG, "SIM Card Removed"); - // SIM card is removed, we need to reset the country code to phone default. - mTelephonyCountryCode = null; - if (mReady) { - updateCountryCode(); - } - } - - /** * This is called when airplane mode is enabled. * In this case we should invalidate all other country code except the * phone default one. diff --git a/service/java/com/android/server/wifi/WifiServiceImpl.java b/service/java/com/android/server/wifi/WifiServiceImpl.java index ad5f133dc..e01266f2c 100644 --- a/service/java/com/android/server/wifi/WifiServiceImpl.java +++ b/service/java/com/android/server/wifi/WifiServiceImpl.java @@ -538,8 +538,6 @@ public class WifiServiceImpl extends IWifiManager.Stub { if (IccCardConstants.INTENT_VALUE_ICC_ABSENT.equals(state)) { Log.d(TAG, "resetting networks because SIM was removed"); mWifiStateMachine.resetSimAuthNetworks(false); - Log.d(TAG, "resetting country code because SIM is removed"); - mCountryCode.simCardRemoved(); } else if (IccCardConstants.INTENT_VALUE_ICC_LOADED.equals(state)) { Log.d(TAG, "resetting networks because SIM was loaded"); mWifiStateMachine.resetSimAuthNetworks(true); |