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

Commit d49ac33b authored by Robert Greenwalt's avatar Robert Greenwalt
Browse files

Add logging of Legacy Type info.

There are some bugs where getActiveNetworkInfo gives bad data (seemingly)
and this will give the backing data in logs.

bug:16610051
Change-Id: Iad867485ad78daeb3e88665dcd0fdb0af756a3bf
parent 63e646ee
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -556,6 +556,19 @@ public class ConnectivityService extends IConnectivityManager.Stub {
                }
            }
        }

        public void dump(IndentingPrintWriter pw) {
            for (int type = 0; type < mTypeLists.length; type++) {
                if (mTypeLists[type] == null) continue;
                pw.print(type + " ");
                pw.increaseIndent();
                if (mTypeLists[type].size() == 0) pw.println("none");
                for (NetworkAgentInfo nai : mTypeLists[type]) {
                    pw.println(nai.name());
                }
                pw.decreaseIndent();
            }
        }
    }
    private LegacyTypeTracker mLegacyTypeTracker = new LegacyTypeTracker();

@@ -1680,6 +1693,13 @@ public class ConnectivityService extends IConnectivityManager.Stub {
        pw.println();
        pw.decreaseIndent();

        pw.println("mActiveDefaultNetwork:" + mActiveDefaultNetwork);
        pw.println("mLegacyTypeTracker:");
        pw.increaseIndent();
        mLegacyTypeTracker.dump(pw);
        pw.decreaseIndent();
        pw.println();

        synchronized (this) {
            pw.println("NetworkTranstionWakeLock is currently " +
                    (mNetTransitionWakeLock.isHeld() ? "" : "not ") + "held.");