diff options
author | Rebecca Silberstein <silberst@google.com> | 2017-04-26 21:24:58 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-04-26 21:24:58 +0000 |
commit | b7517c9cbe0093c59c68c163551016f82e13a82d (patch) | |
tree | 067efc937388eee458bb0beaba9bc2c9a0faf1e0 /service | |
parent | 6390486a62185ef03df9d73db33faa11b0d64908 (diff) | |
parent | 34f59c4004c9afd39e257396c3c98bcbde026d49 (diff) |
WifiServiceImpl: add updateInterfaceIpState am: 455cc203f0 am: f3eb07b0fd am: f83c516ab1
am: 34f59c4004
Change-Id: I61af09409d9b5308116a956b8899c304a198489c
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 a738ff026..b1569c17d 100644 --- a/service/java/com/android/server/wifi/WifiServiceImpl.java +++ b/service/java/com/android/server/wifi/WifiServiceImpl.java @@ -706,6 +706,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 |