Restart soft Ap on a running config change
Bug: 5079339 Change-Id: I083548ef5ab3ce177e7fa3e7375a68b52bb576d7
This commit is contained in:
@@ -516,16 +516,13 @@ public class TetherSettings extends SettingsPreferenceFragment
|
|||||||
mWifiConfig = mDialog.getConfig();
|
mWifiConfig = mDialog.getConfig();
|
||||||
if (mWifiConfig != null) {
|
if (mWifiConfig != null) {
|
||||||
/**
|
/**
|
||||||
* if soft AP is running, bring up with new config
|
* if soft AP is stopped, bring up
|
||||||
* else update the configuration alone
|
* 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) {
|
if (mWifiManager.getWifiApState() == WifiManager.WIFI_AP_STATE_ENABLED) {
|
||||||
|
mWifiManager.setWifiApEnabled(null, false);
|
||||||
mWifiManager.setWifiApEnabled(mWifiConfig, true);
|
mWifiManager.setWifiApEnabled(mWifiConfig, true);
|
||||||
/**
|
|
||||||
* There is no tether notification on changing AP
|
|
||||||
* configuration. Update status with new config.
|
|
||||||
*/
|
|
||||||
mWifiApEnabler.updateConfigSummary(mWifiConfig);
|
|
||||||
} else {
|
} else {
|
||||||
mWifiManager.setWifiApConfiguration(mWifiConfig);
|
mWifiManager.setWifiApConfiguration(mWifiConfig);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user