diff options
author | repo sync <isheriff@google.com> | 2011-09-30 09:57:36 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-09-30 09:57:36 -0700 |
commit | 82afa6e61e6e8df57b71096a9f07eda956442fec (patch) | |
tree | 6b78c0aaeb42d985442371b70c67661bed36fdb3 /services | |
parent | ff1ea0dc5326aa2f1027a145763b05d6f5db0af2 (diff) | |
parent | 7960d9f888e31602e17b8856c77a3826bf8c841e (diff) | |
download | frameworks_base-82afa6e61e6e8df57b71096a9f07eda956442fec.zip frameworks_base-82afa6e61e6e8df57b71096a9f07eda956442fec.tar.gz frameworks_base-82afa6e61e6e8df57b71096a9f07eda956442fec.tar.bz2 |
Merge "Fix IPv6 on wifi"
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/NetworkManagementService.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/services/java/com/android/server/NetworkManagementService.java b/services/java/com/android/server/NetworkManagementService.java index 6fcf399..aacaa6a 100644 --- a/services/java/com/android/server/NetworkManagementService.java +++ b/services/java/com/android/server/NetworkManagementService.java @@ -508,6 +508,28 @@ public class NetworkManagementService extends INetworkManagementService.Stub } } + public void enableIpv6(String iface) throws IllegalStateException { + mContext.enforceCallingOrSelfPermission( + android.Manifest.permission.CHANGE_NETWORK_STATE, "NetworkManagementService"); + try { + mConnector.doCommand(String.format("interface ipv6 %s enable", iface)); + } catch (NativeDaemonConnectorException e) { + throw new IllegalStateException( + "Unable to communicate to native daemon for enabling ipv6"); + } + } + + public void disableIpv6(String iface) throws IllegalStateException { + mContext.enforceCallingOrSelfPermission( + android.Manifest.permission.CHANGE_NETWORK_STATE, "NetworkManagementService"); + try { + mConnector.doCommand(String.format("interface ipv6 %s disable", iface)); + } catch (NativeDaemonConnectorException e) { + throw new IllegalStateException( + "Unable to communicate to native daemon for disabling ipv6"); + } + } + public void addRoute(String interfaceName, RouteInfo route) { modifyRoute(interfaceName, ADD, route); } |