Cleanup softap interface to netd
Change-Id: I01e6c5b5a5a8ddaf05b979f9cc6d1293c86e8773
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user