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
This commit is contained in:
@@ -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();
|
private LegacyTypeTracker mLegacyTypeTracker = new LegacyTypeTracker();
|
||||||
|
|
||||||
@@ -1680,6 +1693,13 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
|||||||
pw.println();
|
pw.println();
|
||||||
pw.decreaseIndent();
|
pw.decreaseIndent();
|
||||||
|
|
||||||
|
pw.println("mActiveDefaultNetwork:" + mActiveDefaultNetwork);
|
||||||
|
pw.println("mLegacyTypeTracker:");
|
||||||
|
pw.increaseIndent();
|
||||||
|
mLegacyTypeTracker.dump(pw);
|
||||||
|
pw.decreaseIndent();
|
||||||
|
pw.println();
|
||||||
|
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
pw.println("NetworkTranstionWakeLock is currently " +
|
pw.println("NetworkTranstionWakeLock is currently " +
|
||||||
(mNetTransitionWakeLock.isHeld() ? "" : "not ") + "held.");
|
(mNetTransitionWakeLock.isHeld() ? "" : "not ") + "held.");
|
||||||
|
|||||||
Reference in New Issue
Block a user