Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8b560611 authored by Joel Scherpelz's avatar Joel Scherpelz Committed by Gerrit Code Review
Browse files

Merge "Partially revert "Add blocking and retrying wrappers for INetd uses.""

parents e0f0f6ca d8ea68dd
Loading
Loading
Loading
Loading
+6 −11
Original line number Diff line number Diff line
@@ -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;
@@ -1030,16 +1027,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;
        }