Cleanup softap interface to netd

Change-Id: I01e6c5b5a5a8ddaf05b979f9cc6d1293c86e8773
This commit is contained in:
Irfan Sheriff
2012-06-19 15:44:35 -07:00
parent e87bc5d789
commit 90542758d4
3 changed files with 16 additions and 28 deletions

View File

@@ -923,14 +923,14 @@ public class NetworkManagementService extends INetworkManagementService.Stub
@Override
public void startAccessPoint(
WifiConfiguration wifiConfig, String wlanIface, String softapIface) {
WifiConfiguration wifiConfig, String wlanIface) {
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
try {
wifiFirmwareReload(wlanIface, "AP");
if (wifiConfig == null) {
mConnector.execute("softap", "set", wlanIface, softapIface);
mConnector.execute("softap", "set", wlanIface);
} else {
mConnector.execute("softap", "set", wlanIface, softapIface, wifiConfig.SSID,
mConnector.execute("softap", "set", wlanIface, wifiConfig.SSID,
getSecurityType(wifiConfig), wifiConfig.preSharedKey);
}
mConnector.execute("softap", "startap");
@@ -966,7 +966,6 @@ public class NetworkManagementService extends INetworkManagementService.Stub
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
try {
mConnector.execute("softap", "stopap");
mConnector.execute("softap", "stop", wlanIface);
wifiFirmwareReload(wlanIface, "STA");
} catch (NativeDaemonConnectorException e) {
throw e.rethrowAsParcelableException();
@@ -974,13 +973,13 @@ public class NetworkManagementService extends INetworkManagementService.Stub
}
@Override
public void setAccessPoint(WifiConfiguration wifiConfig, String wlanIface, String softapIface) {
public void setAccessPoint(WifiConfiguration wifiConfig, String wlanIface) {
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
try {
if (wifiConfig == null) {
mConnector.execute("softap", "set", wlanIface, softapIface);
mConnector.execute("softap", "set", wlanIface);
} else {
mConnector.execute("softap", "set", wlanIface, softapIface, wifiConfig.SSID,
mConnector.execute("softap", "set", wlanIface, wifiConfig.SSID,
getSecurityType(wifiConfig), wifiConfig.preSharedKey);
}
} catch (NativeDaemonConnectorException e) {