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

Commit 67430df4 authored by markchien's avatar markchien
Browse files

Use Context#getSystemService to get network stack binder

Bug: 143195885
Test: -build, flash, boot
      -atest TetheringTests

Change-Id: Ic5fabeae27677344d691449c31ad9337c0e6d92c
parent 9f48bdc3
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -42,7 +42,6 @@ import android.os.IBinder;
import android.os.Looper;
import android.os.RemoteException;
import android.os.ResultReceiver;
import android.os.ServiceManager;
import android.os.SystemProperties;
import android.os.UserManager;
import android.provider.Settings;
@@ -363,7 +362,7 @@ public class TetheringService extends Service {
                    IBinder connector;
                    try {
                        final long before = System.currentTimeMillis();
                        while ((connector = ServiceManager.getService(
                        while ((connector = (IBinder) mContext.getSystemService(
                                Context.NETWORK_STACK_SERVICE)) == null) {
                            if (System.currentTimeMillis() - before > NETWORKSTACK_TIMEOUT_MS) {
                                Log.wtf(TAG, "Timeout, fail to get INetworkStackConnector");