Wifi AP framework changes first pass

Bug: 2421638
Change-Id: Ic5ea8f7560a7fe5e1b0769daa5d92cc33eefc692
This commit is contained in:
Irfan Sheriff
2010-02-12 12:35:59 -08:00
parent 23b7aa45fb
commit 5321aef4a2
6 changed files with 434 additions and 5 deletions

View File

@@ -456,4 +456,23 @@ class NetworkManagementService extends INetworkManagementService.Stub {
}
throw new IllegalStateException("Got an empty response");
}
public void startAccessPoint()
throws IllegalStateException {
mContext.enforceCallingOrSelfPermission(
android.Manifest.permission.CHANGE_NETWORK_STATE, "NetworkManagementService");
mContext.enforceCallingOrSelfPermission(
android.Manifest.permission.CHANGE_WIFI_STATE, "NetworkManagementService");
mConnector.doCommand(String.format("softap set"));
mConnector.doCommand(String.format("softap start"));
}
public void stopAccessPoint() throws IllegalStateException {
mContext.enforceCallingOrSelfPermission(
android.Manifest.permission.CHANGE_NETWORK_STATE, "NetworkManagementService");
mContext.enforceCallingOrSelfPermission(
android.Manifest.permission.CHANGE_WIFI_STATE, "NetworkManagementService");
mConnector.doCommand("softap stop");
}
}