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

Commit b7282174 authored by Nathan Harold's avatar Nathan Harold
Browse files

Re-Enable Starting of the IpSecService

This reverts commit 41004ff4.

Bug: 64800246
Test: compilation
Change-Id: I4f5e3cd23001b9d94b3f6dc9fcfe731a90650e6e
parent 7b625191
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -19,7 +19,9 @@ import android.annotation.StringDef;
import android.os.Build;
import android.os.Parcel;
import android.os.Parcelable;

import com.android.internal.util.HexDump;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

+2 −0
Original line number Diff line number Diff line
@@ -25,7 +25,9 @@ import android.os.ParcelFileDescriptor;
import android.os.RemoteException;
import android.util.AndroidException;
import android.util.Log;

import dalvik.system.CloseGuard;

import java.io.FileDescriptor;
import java.io.IOException;
import java.net.DatagramSocket;
+18 −0
Original line number Diff line number Diff line
@@ -660,6 +660,7 @@ public final class SystemServer {
        VibratorService vibrator = null;
        IStorageManager storageManager = null;
        NetworkManagementService networkManagement = null;
        IpSecService ipSecService = null;
        NetworkStatsService networkStats = null;
        NetworkPolicyManagerService networkPolicy = null;
        ConnectivityService connectivity = null;
@@ -1010,6 +1011,15 @@ public final class SystemServer {
                    reportWtf("starting NetworkManagement Service", e);
                }
                traceEnd();

                traceBeginAndSlog("StartIpSecService");
                try {
                    ipSecService = IpSecService.create(context);
                    ServiceManager.addService(Context.IPSEC_SERVICE, ipSecService);
                } catch (Throwable e) {
                    reportWtf("starting IpSec Service", e);
                }
                traceEnd();
            }

            if (!disableNonCoreServices && !disableTextServices) {
@@ -1617,6 +1627,7 @@ public final class SystemServer {
        final TelephonyRegistry telephonyRegistryF = telephonyRegistry;
        final MediaRouterService mediaRouterF = mediaRouter;
        final MmsServiceBroker mmsServiceF = mmsService;
        final IpSecService ipSecServiceF = ipSecService;
        final WindowManagerService windowManagerF = wm;

        // We now tell the activity manager it is okay to run third party
@@ -1681,6 +1692,13 @@ public final class SystemServer {
                        .networkScoreAndNetworkManagementServiceReady();
            }
            traceEnd();
            traceBeginAndSlog("MakeIpSecServiceReady");
            try {
                if (ipSecServiceF != null) ipSecServiceF.systemReady();
            } catch (Throwable e) {
                reportWtf("making IpSec Service ready", e);
            }
            traceEnd();
            traceBeginAndSlog("MakeNetworkStatsServiceReady");
            try {
                if (networkStatsF != null) networkStatsF.systemReady();