diff options
author | Robert Greenwalt <rgreenwalt@google.com> | 2013-10-01 18:50:20 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-10-01 18:50:20 -0700 |
commit | d29724c640433b82addbdad3a790b75aed2d9dc4 (patch) | |
tree | db385b74216632259df4b48ef43665a5437f7f17 /wifi | |
parent | 7f5348b0932aabdeb164c294f97f528e5d1df661 (diff) | |
parent | 2b6b3d9c495d3c8332aad6515a1db06e8fde3848 (diff) | |
download | frameworks_base-d29724c640433b82addbdad3a790b75aed2d9dc4.zip frameworks_base-d29724c640433b82addbdad3a790b75aed2d9dc4.tar.gz frameworks_base-d29724c640433b82addbdad3a790b75aed2d9dc4.tar.bz2 |
am 2b6b3d9c: am bad5d694: Merge "Use a build-specific wifi country code" into klp-dev
* commit '2b6b3d9c495d3c8332aad6515a1db06e8fde3848':
Use a build-specific wifi country code
Diffstat (limited to 'wifi')
-rw-r--r-- | wifi/java/android/net/wifi/WifiStateMachine.java | 14 | ||||
-rw-r--r-- | wifi/java/android/net/wifi/p2p/WifiP2pService.java | 6 |
2 files changed, 2 insertions, 18 deletions
diff --git a/wifi/java/android/net/wifi/WifiStateMachine.java b/wifi/java/android/net/wifi/WifiStateMachine.java index 76bd636..798bc2e 100644 --- a/wifi/java/android/net/wifi/WifiStateMachine.java +++ b/wifi/java/android/net/wifi/WifiStateMachine.java @@ -1456,9 +1456,6 @@ public class WifiStateMachine extends StateMachine { public void setCountryCode(String countryCode, boolean persist) { if (persist) { mPersistedCountryCode = countryCode; - Settings.Global.putString(mContext.getContentResolver(), - Settings.Global.WIFI_COUNTRY_CODE, - countryCode); } sendMessage(CMD_SET_COUNTRY_CODE, countryCode); mWifiP2pChannel.sendMessage(WifiP2pService.SET_COUNTRY_CODE, countryCode); @@ -1691,8 +1688,8 @@ public class WifiStateMachine extends StateMachine { * Set the country code from the system setting value, if any. */ private void setCountryCode() { - String countryCode = Settings.Global.getString(mContext.getContentResolver(), - Settings.Global.WIFI_COUNTRY_CODE); + String countryCode = mContext.getResources().getString( + R.string.config_wifi_default_country_code); if (countryCode != null && !countryCode.isEmpty()) { setCountryCode(countryCode, false); } else { @@ -2417,13 +2414,6 @@ public class WifiStateMachine extends StateMachine { case CMD_BOOT_COMPLETED: String countryCode = mPersistedCountryCode; if (TextUtils.isEmpty(countryCode) == false) { - Settings.Global.putString(mContext.getContentResolver(), - Settings.Global.WIFI_COUNTRY_CODE, - countryCode); - // it may be that the state transition that should send this info - // to the driver happened between mPersistedCountryCode getting set - // and now, so simply persisting it here would mean we have sent - // nothing to the driver. Send the cmd so it might be set now. sendMessageAtFrontOfQueue(CMD_SET_COUNTRY_CODE, countryCode); } break; diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pService.java b/wifi/java/android/net/wifi/p2p/WifiP2pService.java index 625ffb8..50e8e3d 100644 --- a/wifi/java/android/net/wifi/p2p/WifiP2pService.java +++ b/wifi/java/android/net/wifi/p2p/WifiP2pService.java @@ -2545,12 +2545,6 @@ public class WifiP2pService extends IWifiP2pManager.Stub { mServiceTransactionId = 0; mServiceDiscReqId = null; - String countryCode = Settings.Global.getString(mContext.getContentResolver(), - Settings.Global.WIFI_COUNTRY_CODE); - if (countryCode != null && !countryCode.isEmpty()) { - mP2pStateMachine.sendMessage(SET_COUNTRY_CODE, countryCode); - } - updatePersistentNetworks(RELOAD); } |