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

Commit 257ee5fa authored by Robert Greenwalt's avatar Robert Greenwalt
Browse files

Add logging to track down weird ConnectivityManager issue.

bug:15771399
Change-Id: I0a7150286f94262414005298e6f038f278347a7c
parent 2c749d24
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -68,6 +68,7 @@ import java.util.HashMap;
 */
public class ConnectivityManager {
    private static final String TAG = "ConnectivityManager";
    private static final boolean LEGACY_DBG = true; // STOPSHIP

    /**
     * A change in network connectivity has occurred. A default connection has either
@@ -823,6 +824,14 @@ public class ConnectivityManager {

        NetworkRequest request = null;
        synchronized (sLegacyRequests) {
            if (LEGACY_DBG) {
                Log.d(TAG, "Looking for legacyRequest for netCap with hash: " + netCap + " (" +
                        netCap.hashCode() + ")");
                Log.d(TAG, "sLegacyRequests has:");
                for (NetworkCapabilities nc : sLegacyRequests.keySet()) {
                    Log.d(TAG, "  " + nc + " (" + nc.hashCode() + ")");
                }
            }
            LegacyRequest l = sLegacyRequests.get(netCap);
            if (l != null) {
                Log.d(TAG, "renewing startUsingNetworkFeature request " + l.networkRequest);
@@ -837,7 +846,7 @@ public class ConnectivityManager {
            request = requestNetworkForFeatureLocked(netCap);
        }
        if (request != null) {
            Log.d(TAG, "starting startUsingNeworkFeature for request " + request);
            Log.d(TAG, "starting startUsingNetworkFeature for request " + request);
            return PhoneConstants.APN_REQUEST_STARTED;
        } else {
            Log.d(TAG, " request Failed");