diff options
author | Robert Greenwalt <robdroid@android.com> | 2010-05-08 15:20:24 -0700 |
---|---|---|
committer | Robert Greenwalt <robdroid@android.com> | 2010-05-08 17:20:26 -0700 |
commit | e434bfb216682a6ca331fa54ce58a2bff7adf8d7 (patch) | |
tree | 1f1520504b0115a0b7beb17649348273529576a5 /src/com | |
parent | d2c81986c236ed680cfae5e420561028ae4cc0d2 (diff) | |
download | packages_apps_Settings-e434bfb216682a6ca331fa54ce58a2bff7adf8d7.zip packages_apps_Settings-e434bfb216682a6ca331fa54ce58a2bff7adf8d7.tar.gz packages_apps_Settings-e434bfb216682a6ca331fa54ce58a2bff7adf8d7.tar.bz2 |
String change - wifi tether = hotspot
bug:2664412
Change-Id: I6ca955e7fcc299ae1d69892c93c9250229610b19
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/settings/TetherSettings.java | 7 | ||||
-rw-r--r-- | src/com/android/settings/WirelessSettings.java | 16 |
2 files changed, 23 insertions, 0 deletions
diff --git a/src/com/android/settings/TetherSettings.java b/src/com/android/settings/TetherSettings.java index 56305d5..9eee4e0 100644 --- a/src/com/android/settings/TetherSettings.java +++ b/src/com/android/settings/TetherSettings.java @@ -88,12 +88,19 @@ public class TetherSettings extends PreferenceActivity { mUsbRegexs = cm.getTetherableUsbRegexs(); if (mUsbRegexs.length == 0) { getPreferenceScreen().removePreference(mUsbTether); + + setTitle(R.string.tether_settings_title_wifi); } mWifiRegexs = cm.getTetherableWifiRegexs(); if (mWifiRegexs.length == 0) { getPreferenceScreen().removePreference(mEnableWifiAp); getPreferenceScreen().removePreference(mWifiApSettings); + + setTitle(R.string.tether_settings_title_usb); + } else if (mUsbRegexs.length != 0) { + // have both + setTitle(R.string.tether_settings_title_both); } mWifiApEnabler = new WifiApEnabler(this, mEnableWifiAp); mView = new WebView(this); diff --git a/src/com/android/settings/WirelessSettings.java b/src/com/android/settings/WirelessSettings.java index 6db2001..78cf8cf 100644 --- a/src/com/android/settings/WirelessSettings.java +++ b/src/com/android/settings/WirelessSettings.java @@ -123,6 +123,22 @@ public class WirelessSettings extends PreferenceActivity { (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE); if (!cm.isTetheringSupported()) { getPreferenceScreen().removePreference(findPreference(KEY_TETHER_SETTINGS)); + } else { + String[] usbRegexs = cm.getTetherableUsbRegexs(); + String[] wifiRegexs = cm.getTetherableWifiRegexs(); + Preference p = findPreference(KEY_TETHER_SETTINGS); + if (wifiRegexs.length == 0) { + p.setTitle(R.string.tether_settings_title_usb); + p.setSummary(R.string.tether_settings_summary_usb); + } else { + if (usbRegexs.length == 0) { + p.setTitle(R.string.tether_settings_title_wifi); + p.setSummary(R.string.tether_settings_summary_wifi); + } else { + p.setTitle(R.string.tether_settings_title_both); + p.setSummary(R.string.tether_settings_summary_both); + } + } } } |