Restart soft Ap on a running config change

Bug: 5079339
Change-Id: I083548ef5ab3ce177e7fa3e7375a68b52bb576d7
This commit is contained in:
Irfan Sheriff
2011-07-26 14:01:22 -07:00
parent a7c32ad749
commit 233577cc25

View File

@@ -516,16 +516,13 @@ public class TetherSettings extends SettingsPreferenceFragment
mWifiConfig = mDialog.getConfig();
if (mWifiConfig != null) {
/**
* if soft AP is running, bring up with new config
* else update the configuration alone
* if soft AP is stopped, bring up
* else restart with new config
* TODO: update config on a running access point when framework support is added
*/
if (mWifiManager.getWifiApState() == WifiManager.WIFI_AP_STATE_ENABLED) {
mWifiManager.setWifiApEnabled(null, false);
mWifiManager.setWifiApEnabled(mWifiConfig, true);
/**
* There is no tether notification on changing AP
* configuration. Update status with new config.
*/
mWifiApEnabler.updateConfigSummary(mWifiConfig);
} else {
mWifiManager.setWifiApConfiguration(mWifiConfig);
}