Enable/disable WifiConnectivityManager at runtime

Add support to turn on and off WifiConnectivityManager at
runtime.

Bug: 27968625
Change-Id: I57d3604bfb2a4e816fb16f6389f7cbaa2460c24b
This commit is contained in:
Randy Pan
2016-04-01 14:02:35 -07:00
parent 467400a23b
commit 74638cdb31
2 changed files with 14 additions and 0 deletions

View File

@@ -152,6 +152,8 @@ interface IWifiManager
boolean enableAutoJoinWhenAssociated(boolean enabled);
boolean getEnableAutoJoinWhenAssociated();
void enableWifiConnectivityManager(boolean enabled);
WifiConnectionStatistics getConnectionStatistics();
void disableEphemeralNetwork(String SSID);

View File

@@ -2719,4 +2719,16 @@ public class WifiManager {
throw e.rethrowFromSystemServer();
}
}
/**
* Enable/disable WifiConnectivityManager
* @hide
*/
public void enableWifiConnectivityManager(boolean enabled) {
try {
mService.enableWifiConnectivityManager(enabled);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
}