Merge "Dont persist config on failure" into gingerbread
This commit is contained in:
committed by
Android (Google) Code Review
commit
c2bc66d405
@@ -679,9 +679,9 @@ public class WifiService extends IWifiManager.Stub {
|
|||||||
/* Configuration changed on a running access point */
|
/* Configuration changed on a running access point */
|
||||||
if(enable && (wifiConfig != null)) {
|
if(enable && (wifiConfig != null)) {
|
||||||
try {
|
try {
|
||||||
persistApConfiguration(wifiConfig);
|
|
||||||
nwService.setAccessPoint(wifiConfig, mWifiStateTracker.getInterfaceName(),
|
nwService.setAccessPoint(wifiConfig, mWifiStateTracker.getInterfaceName(),
|
||||||
SOFTAP_IFACE);
|
SOFTAP_IFACE);
|
||||||
|
persistApConfiguration(wifiConfig);
|
||||||
return true;
|
return true;
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
Slog.e(TAG, "Exception in nwService during AP restart");
|
Slog.e(TAG, "Exception in nwService during AP restart");
|
||||||
@@ -717,7 +717,6 @@ public class WifiService extends IWifiManager.Stub {
|
|||||||
wifiConfig.SSID = mContext.getString(R.string.wifi_tether_configure_ssid_default);
|
wifiConfig.SSID = mContext.getString(R.string.wifi_tether_configure_ssid_default);
|
||||||
wifiConfig.allowedKeyManagement.set(KeyMgmt.NONE);
|
wifiConfig.allowedKeyManagement.set(KeyMgmt.NONE);
|
||||||
}
|
}
|
||||||
persistApConfiguration(wifiConfig);
|
|
||||||
|
|
||||||
if (!mWifiStateTracker.loadDriver()) {
|
if (!mWifiStateTracker.loadDriver()) {
|
||||||
Slog.e(TAG, "Failed to load Wi-Fi driver for AP mode");
|
Slog.e(TAG, "Failed to load Wi-Fi driver for AP mode");
|
||||||
@@ -734,6 +733,8 @@ public class WifiService extends IWifiManager.Stub {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
persistApConfiguration(wifiConfig);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user