diff options
author | Erik Kline <ek@google.com> | 2017-04-28 01:56:57 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2017-04-28 01:57:03 +0000 |
commit | 42b563da5849270ba76275390ad00739ca927a35 (patch) | |
tree | 0ffeef3e5a01d15c57ab90dd2be31255e0626063 /service | |
parent | 5ff70c1e7439427f3ab79d80158b65eb4dd5ccee (diff) | |
parent | c9aab08c8e0eb78f8da4e1ffe962b09a9cf0a8a1 (diff) |
Merge "WifiServiceImpl: add updateInterfaceIpState" into oc-dev
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/WifiServiceImpl.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/WifiServiceImpl.java b/service/java/com/android/server/wifi/WifiServiceImpl.java index 7b0502915..ed1b49314 100644 --- a/service/java/com/android/server/wifi/WifiServiceImpl.java +++ b/service/java/com/android/server/wifi/WifiServiceImpl.java @@ -773,6 +773,29 @@ public class WifiServiceImpl extends IWifiManager.Stub { } /** + * see {@link android.net.wifi.WifiManager#updateInterfaceIpState(String, int)} + * + * The possible modes include: {@link WifiManager#IFACE_IP_MODE_TETHERED}, + * {@link WifiManager#IFACE_IP_MODE_LOCAL_ONLY}, + * {@link WifiManager#IFACE_IP_MODE_CONFIGURATION_ERROR} + * + * @param ifaceName String name of the updated interface + * @param mode new operating mode of the interface + * + * @throws SecurityException if the caller does not have permission to call update + */ + @Override + public void updateInterfaceIpState(String ifaceName, int mode) { + // NETWORK_STACK is a signature only permission. + enforceNetworkStackPermission(); + + Slog.d(TAG, "updateInterfaceIpState: ifaceName=" + ifaceName + " mode=" + mode); + // TODO: keep track of modes in a datastructure - protect it with a lock of some sort. + // TODO: check the mode when startLOHS comes in in case it is already active + // TODO: if mode == LOCAL_ONLY, trigger onStarted callbacks + } + + /** * see {@link android.net.wifi.WifiManager#startSoftAp(WifiConfiguration)} * @param wifiConfig SSID, security and channel details as * part of WifiConfiguration |