summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorKumar Anand <kumaranand@google.com>2018-05-25 15:55:14 -0700
committerKumar Anand <kumaranand@google.com>2018-05-31 23:26:42 +0000
commit6a4ab81c8842bc1115c7078c8798899e3a2e217c (patch)
treebeac8c88c01e6e4204ce4828dbaa132f577919dd /service
parent7321b5dc86ba9f9de31588bf726008bf8a13138a (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.java14
-rw-r--r--service/java/com/android/server/wifi/WifiServiceImpl.java2
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);