summaryrefslogtreecommitdiffstats
path: root/telephony
diff options
context:
space:
mode:
authorIrfan Sheriff <isheriff@google.com>2010-01-21 07:46:49 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-01-21 07:46:49 -0800
commitdcc14d6a26961a3ba45eaeb7305fdafb2b6694e2 (patch)
treed6215f8aa76eaff4f16487880fc33300c7b96a3a /telephony
parentf6aed0e0a7c96094b66f5426baad78032b794497 (diff)
parent51e2f71f4aeaed56e1e7819685f7ff8cff66d011 (diff)
downloadframeworks_base-dcc14d6a26961a3ba45eaeb7305fdafb2b6694e2.zip
frameworks_base-dcc14d6a26961a3ba45eaeb7305fdafb2b6694e2.tar.gz
frameworks_base-dcc14d6a26961a3ba45eaeb7305fdafb2b6694e2.tar.bz2
Merge "Use MCC value to always override channel count setting" into eclair
Diffstat (limited to 'telephony')
-rw-r--r--telephony/java/com/android/internal/telephony/MccTable.java18
1 files changed, 6 insertions, 12 deletions
diff --git a/telephony/java/com/android/internal/telephony/MccTable.java b/telephony/java/com/android/internal/telephony/MccTable.java
index 1bd6a1a..fc9de96 100644
--- a/telephony/java/com/android/internal/telephony/MccTable.java
+++ b/telephony/java/com/android/internal/telephony/MccTable.java
@@ -587,7 +587,7 @@ public final class MccTable
if (mcc != 0) {
setTimezoneFromMccIfNeeded(phone, mcc);
setLocaleFromMccIfNeeded(phone, mcc);
- setWifiChannelsFromMccIfNeeded(phone, mcc);
+ setWifiChannelsFromMcc(phone, mcc);
}
try {
Configuration config = ActivityManagerNative.getDefault().getConfiguration();
@@ -642,20 +642,14 @@ public final class MccTable
* @param phone PhoneBase to act on (get context from).
* @param mcc Mobile Country Code of the SIM or SIM-like entity (build prop on CDMA)
*/
- private static void setWifiChannelsFromMccIfNeeded(PhoneBase phone, int mcc) {
+ private static void setWifiChannelsFromMcc(PhoneBase phone, int mcc) {
int wifiChannels = MccTable.wifiChannelsForMcc(mcc);
if (wifiChannels != 0) {
Context context = phone.getContext();
- // only set to this default if the user hasn't manually set it
- try {
- Settings.Secure.getInt(context.getContentResolver(),
- Settings.Secure.WIFI_NUM_ALLOWED_CHANNELS);
- } catch (Settings.SettingNotFoundException e) {
- Log.d(LOG_TAG, "WIFI_NUM_ALLOWED_CHANNESL set to " + wifiChannels);
- WifiManager wM = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
- // don't persist
- wM.setNumAllowedChannels(wifiChannels, false);
- }
+ Log.d(LOG_TAG, "WIFI_NUM_ALLOWED_CHANNELS set to " + wifiChannels);
+ WifiManager wM = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
+ //persist
+ wM.setNumAllowedChannels(wifiChannels, true);
}
}
}