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

Commit 88e1e454 authored by Remi NGUYEN VAN's avatar Remi NGUYEN VAN Committed by Automerger Merge Worker
Browse files

Merge changes from topic "netstack_constant_cherrypick" am: 341fa568

Change-Id: I4fa3f771fe93e9b6024828d9c725502629c1ccff
parents 6fc7f6e3 341fa568
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -33,6 +33,7 @@ import android.net.ITetheringConnector;
import android.net.ITetheringEventCallback;
import android.net.ITetheringEventCallback;
import android.net.NetworkCapabilities;
import android.net.NetworkCapabilities;
import android.net.NetworkRequest;
import android.net.NetworkRequest;
import android.net.NetworkStack;
import android.net.TetheringRequestParcel;
import android.net.TetheringRequestParcel;
import android.net.dhcp.DhcpServerCallbacks;
import android.net.dhcp.DhcpServerCallbacks;
import android.net.dhcp.DhcpServingParamsParcel;
import android.net.dhcp.DhcpServingParamsParcel;
@@ -364,8 +365,7 @@ public class TetheringService extends Service {
                    IBinder connector;
                    IBinder connector;
                    try {
                    try {
                        final long before = System.currentTimeMillis();
                        final long before = System.currentTimeMillis();
                        while ((connector = (IBinder) mContext.getSystemService(
                        while ((connector = NetworkStack.getService()) == null) {
                                Context.NETWORK_STACK_SERVICE)) == null) {
                            if (System.currentTimeMillis() - before > NETWORKSTACK_TIMEOUT_MS) {
                            if (System.currentTimeMillis() - before > NETWORKSTACK_TIMEOUT_MS) {
                                Log.wtf(TAG, "Timeout, fail to get INetworkStackConnector");
                                Log.wtf(TAG, "Timeout, fail to get INetworkStackConnector");
                                return null;
                                return null;
+0 −1
Original line number Original line Diff line number Diff line
@@ -429,7 +429,6 @@ public class ConnectivityServiceTest {
        public Object getSystemService(String name) {
        public Object getSystemService(String name) {
            if (Context.CONNECTIVITY_SERVICE.equals(name)) return mCm;
            if (Context.CONNECTIVITY_SERVICE.equals(name)) return mCm;
            if (Context.NOTIFICATION_SERVICE.equals(name)) return mNotificationManager;
            if (Context.NOTIFICATION_SERVICE.equals(name)) return mNotificationManager;
            if (Context.NETWORK_STACK_SERVICE.equals(name)) return mNetworkStack;
            if (Context.USER_SERVICE.equals(name)) return mUserManager;
            if (Context.USER_SERVICE.equals(name)) return mUserManager;
            if (Context.ALARM_SERVICE.equals(name)) return mAlarmManager;
            if (Context.ALARM_SERVICE.equals(name)) return mAlarmManager;
            if (Context.LOCATION_SERVICE.equals(name)) return mLocationManager;
            if (Context.LOCATION_SERVICE.equals(name)) return mLocationManager;