diff options
author | Ningyuan Wang <nywang@google.com> | 2017-03-19 05:54:05 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-03-19 05:54:07 +0000 |
commit | c67240d12b213e732cc9e1358349e7163812d524 (patch) | |
tree | 24e9f2d38c368c87a4bd17e7cbdae8c0c7dda9e3 /service | |
parent | 61e149bc125c753fea54ba59cf70fbaff1772ea5 (diff) | |
parent | 5353a4413684083df0e8ff2fbd6f5f256731bd28 (diff) |
Merge "Reset to default country code when phone is out of service"
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/WifiCountryCode.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/service/java/com/android/server/wifi/WifiCountryCode.java b/service/java/com/android/server/wifi/WifiCountryCode.java index 58bf90fa0..e69fb8e1c 100644 --- a/service/java/com/android/server/wifi/WifiCountryCode.java +++ b/service/java/com/android/server/wifi/WifiCountryCode.java @@ -131,12 +131,13 @@ public class WifiCountryCode { */ public synchronized boolean setCountryCode(String countryCode) { if (DBG) Log.d(TAG, "Receive set country code request: " + countryCode); - // Ignore empty country code. + // Empty country code. if (TextUtils.isEmpty(countryCode)) { - if (DBG) Log.d(TAG, "Ignore empty country code"); - return false; + if (DBG) Log.d(TAG, "Received empty country code, reset to default country code"); + mTelephonyCountryCode = null; + } else { + mTelephonyCountryCode = countryCode.toUpperCase(); } - mTelephonyCountryCode = countryCode.toUpperCase(); // If wpa_supplicant is ready we set the country code now, otherwise it will be // set once wpa_supplicant is ready. if (mReady) { |