summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIrfan Sheriff <isheriff@google.com>2010-03-22 11:34:48 -0700
committerIrfan Sheriff <isheriff@google.com>2010-03-22 14:50:46 -0700
commit3e5cfe8f0ac32b932fe3b93cc784cd9b849dc118 (patch)
tree515c86161b11a77c8e06a781c6c00426b349305f
parent38925c0b964b7aef23c8a03af4d1a9499474f1b2 (diff)
downloadpackages_apps_settings-3e5cfe8f0ac32b932fe3b93cc784cd9b849dc118.zip
packages_apps_settings-3e5cfe8f0ac32b932fe3b93cc784cd9b849dc118.tar.gz
packages_apps_settings-3e5cfe8f0ac32b932fe3b93cc784cd9b849dc118.tar.bz2
Update AP config status
Bug: 2533950 Change-Id: Idac1213b9dc44c073fa5cf8da00b8599161565f2
-rw-r--r--src/com/android/settings/wifi/WifiApEnabler.java16
-rw-r--r--src/com/android/settings/wifi/WifiApSettings.java5
2 files changed, 15 insertions, 6 deletions
diff --git a/src/com/android/settings/wifi/WifiApEnabler.java b/src/com/android/settings/wifi/WifiApEnabler.java
index 6049623..3d8d282 100644
--- a/src/com/android/settings/wifi/WifiApEnabler.java
+++ b/src/com/android/settings/wifi/WifiApEnabler.java
@@ -107,6 +107,14 @@ public class WifiApEnabler implements Preference.OnPreferenceChangeListener {
return false;
}
+ void updateConfigSummary(WifiConfiguration wifiConfig) {
+ String s = mContext.getString(
+ com.android.internal.R.string.wifi_tether_configure_ssid_default);
+ mCheckBox.setSummary(String.format(
+ mContext.getString(R.string.wifi_tether_enabled_subtext),
+ (wifiConfig == null) ? s : wifiConfig.SSID));
+ }
+
private void updateTetherState(Object[] available, Object[] tethered, Object[] errored) {
boolean wifiTethered = false;
boolean wifiErrored = false;
@@ -125,12 +133,8 @@ public class WifiApEnabler implements Preference.OnPreferenceChangeListener {
}
if (wifiTethered) {
- WifiConfiguration mWifiConfig = mWifiManager.getWifiApConfiguration();
- String s = mContext.getString(
- com.android.internal.R.string.wifi_tether_configure_ssid_default);
- mCheckBox.setSummary(String.format(
- mContext.getString(R.string.wifi_tether_enabled_subtext),
- (mWifiConfig == null) ? s : mWifiConfig.SSID));
+ WifiConfiguration wifiConfig = mWifiManager.getWifiApConfiguration();
+ updateConfigSummary(wifiConfig);
} else if (wifiErrored) {
mCheckBox.setSummary(R.string.wifi_error);
}
diff --git a/src/com/android/settings/wifi/WifiApSettings.java b/src/com/android/settings/wifi/WifiApSettings.java
index b8fb904..ec1016e 100644
--- a/src/com/android/settings/wifi/WifiApSettings.java
+++ b/src/com/android/settings/wifi/WifiApSettings.java
@@ -122,6 +122,11 @@ public class WifiApSettings extends PreferenceActivity
mWifiConfig.SSID,
mWifiConfig.allowedKeyManagement.get(KeyMgmt.WPA_PSK) ?
mSecurityType[WPA_INDEX] : mSecurityType[OPEN_INDEX]));
+ /**
+ * There is no tether notification on changing AP
+ * configuration. Update status with new config.
+ */
+ mWifiApEnabler.updateConfigSummary(mWifiConfig);
}
}
}