summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Joel Scherpelz <jscherpelz@google.com> 2017-03-30 01:13:03 +0000
committer Joel Scherpelz <jscherpelz@google.com> 2017-03-30 01:18:44 +0000
commitd8ea68ddc91c9033083a4a508547ef90a76e1fdf (patch)
treeb2c01956d660f5b2de9fbe7957eb2a61cfe755b3
parentaf39244a34f4449c12a5f925222c9bc8d8049320 (diff)
Partially revert "Add blocking and retrying wrappers for INetd uses."
Direct access to Netd from the bluetooth process is disallowed by SELinux policy. This change reverts to the old behavior where IpManager interacts with NetdService indirectly via NetworkManagementService. Bug: 36492299 This partially reverts commit af39244a34f4449c12a5f925222c9bc8d8049320. Change-Id: Icf20b1e24abf7dd3123760f8637928bde7afe06b
-rw-r--r--services/net/java/android/net/ip/IpManager.java17
1 files changed, 6 insertions, 11 deletions
diff --git a/services/net/java/android/net/ip/IpManager.java b/services/net/java/android/net/ip/IpManager.java
index 2805898450e2..76b1c90642ec 100644
--- a/services/net/java/android/net/ip/IpManager.java
+++ b/services/net/java/android/net/ip/IpManager.java
@@ -23,7 +23,6 @@ import android.content.Context;
import android.net.apf.ApfCapabilities;
import android.net.apf.ApfFilter;
import android.net.DhcpResults;
-import android.net.INetd;
import android.net.InterfaceConfiguration;
import android.net.LinkAddress;
import android.net.LinkProperties;
@@ -35,12 +34,10 @@ import android.net.dhcp.DhcpClient;
import android.net.metrics.IpConnectivityLog;
import android.net.metrics.IpManagerEvent;
import android.net.util.MultinetworkPolicyTracker;
-import android.net.util.NetdService;
import android.os.INetworkManagementService;
import android.os.Message;
import android.os.RemoteException;
import android.os.ServiceManager;
-import android.os.ServiceSpecificException;
import android.os.SystemClock;
import android.text.TextUtils;
import android.util.LocalLog;
@@ -1023,16 +1020,14 @@ public class IpManager extends StateMachine {
private boolean startIPv6() {
// Set privacy extensions.
- final String PREFER_TEMPADDRS = "2";
try {
- NetdService.run((INetd netd) -> {
- netd.setProcSysNet(
- INetd.IPV6, INetd.CONF, mInterfaceName, "use_tempaddr",
- PREFER_TEMPADDRS);
- });
+ mNwService.setInterfaceIpv6PrivacyExtensions(mInterfaceName, true);
mNwService.enableIpv6(mInterfaceName);
- } catch (IllegalStateException|RemoteException|ServiceSpecificException e) {
- logError("Unable to change interface settings: %s", e);
+ } catch (RemoteException re) {
+ logError("Unable to change interface settings: %s", re);
+ return false;
+ } catch (IllegalStateException ie) {
+ logError("Unable to change interface settings: %s", ie);
return false;
}