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

Commit 151d3032 authored by Ken Mixter's avatar Ken Mixter
Browse files

Fix NPE in ConnectivityService

Could occur when requestRouteToHostAddress is called on a network
with no associated tracker.  Code later in the method handles
this case gracefully but code introduced in JB throws an exception.

Change-Id: I6c8a0e313ecbcca120aeb5dd0802a72114749aa1
parent 0b807d2e
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1432,9 +1432,12 @@ public class ConnectivityService extends IConnectivityManager.Stub {
            return false;
        }
        NetworkStateTracker tracker = mNetTrackers[networkType];
        DetailedState netState = tracker.getNetworkInfo().getDetailedState();
        DetailedState netState = DetailedState.DISCONNECTED;
        if (tracker != null) {
            netState = tracker.getNetworkInfo().getDetailedState();
        }

        if (tracker == null || (netState != DetailedState.CONNECTED &&
        if ((netState != DetailedState.CONNECTED &&
                netState != DetailedState.CAPTIVE_PORTAL_CHECK) ||
                tracker.isTeardownRequested()) {
            if (VDBG) {