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

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

Launch NetD in a different thread

Calling run() launches in the current thread;
we want to call start() to launch in a separate
thread to unblock system initialization.

Bug: none
Test: compilation
Change-Id: Ia85059100add6a44a5e3262500b00ba8ca21e125
parent 4ff3cf1e
Loading
Loading
Loading
Loading
+8 −11
Original line number Diff line number Diff line
@@ -402,17 +402,14 @@ public class IpSecService extends IIpSecService.Stub {

    private void connectNativeNetdService() {
        // Avoid blocking the system server to do this
        Thread t =
                new Thread(
                        new Runnable() {
        new Thread() {
            @Override
            public void run() {
                synchronized (IpSecService.this) {
                    NetdService.get(NETD_FETCH_TIMEOUT);
                }
            }
                        });
        t.run();
        }.start();
    }

    INetd getNetdInstance() throws RemoteException {