summaryrefslogtreecommitdiffstats
path: root/services/java
diff options
context:
space:
mode:
authorrepo sync <isheriff@google.com>2011-09-29 12:40:02 -0700
committerrepo sync <isheriff@google.com>2011-09-29 16:59:01 -0700
commit7960d9f888e31602e17b8856c77a3826bf8c841e (patch)
tree25449b839753fd26da7e6bcb4bfcb67fda6054e3 /services/java
parent3d0d7b41728277380d2e07f8de97c7bdf6840122 (diff)
downloadframeworks_base-7960d9f888e31602e17b8856c77a3826bf8c841e.zip
frameworks_base-7960d9f888e31602e17b8856c77a3826bf8c841e.tar.gz
frameworks_base-7960d9f888e31602e17b8856c77a3826bf8c841e.tar.bz2
Fix IPv6 on wifi
Bug: 5388757 Change-Id: I3c8c776c26dad1daa9801d0455fde749c0206401
Diffstat (limited to 'services/java')
-rw-r--r--services/java/com/android/server/NetworkManagementService.java22
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);
}