diff options
author | Robert Greenwalt <rgreenwalt@google.com> | 2014-05-14 13:44:26 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-05-14 13:44:26 +0000 |
commit | 54b6fd0cbe48fc0980da0617352785c973c60c86 (patch) | |
tree | f269f4895bd609738fb01a8cca4cbd5ef4e88253 /services | |
parent | 9258c64bef1a01fe89bc7c1fa402c44c0e6a1255 (diff) | |
parent | c9c90c771c9cd1381a49b714df9a2bc392959fcc (diff) | |
download | frameworks_base-54b6fd0cbe48fc0980da0617352785c973c60c86.zip frameworks_base-54b6fd0cbe48fc0980da0617352785c973c60c86.tar.gz frameworks_base-54b6fd0cbe48fc0980da0617352785c973c60c86.tar.bz2 |
Merge "Add networks and requests to CS.dump"
Diffstat (limited to 'services')
-rw-r--r-- | services/core/java/com/android/server/ConnectivityService.java | 53 |
1 files changed, 24 insertions, 29 deletions
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java index c8fa7ae..0708e55 100644 --- a/services/core/java/com/android/server/ConnectivityService.java +++ b/services/core/java/com/android/server/ConnectivityService.java @@ -2878,44 +2878,39 @@ public class ConnectivityService extends IConnectivityManager.Stub { return; } - // TODO: add locking to get atomic snapshot - pw.println(); - for (int i = 0; i < mNetTrackers.length; i++) { - final NetworkStateTracker nst = mNetTrackers[i]; - if (nst != null) { - pw.println("NetworkStateTracker for " + getNetworkTypeName(i) + ":"); - pw.increaseIndent(); - if (nst.getNetworkInfo().isConnected()) { - pw.println("Active network: " + nst.getNetworkInfo(). - getTypeName()); - } - pw.println(nst.getNetworkInfo()); - pw.println(nst.getLinkProperties()); - pw.println(nst); - pw.println(); - pw.decreaseIndent(); - } + NetworkAgentInfo defaultNai = mNetworkForRequestId.get(mDefaultRequest.requestId); + pw.print("Active default network: "); + if (defaultNai == null) { + pw.println("none"); + } else { + pw.println(defaultNai.network.netId); } - - pw.print("Active default network: "); pw.println(getNetworkTypeName(mActiveDefaultNetwork)); pw.println(); - pw.println("Network Requester Pids:"); + pw.println("Current Networks:"); pw.increaseIndent(); - for (int net : mPriorityList) { - String pidString = net + ": "; - for (Integer pid : mNetRequestersPids[net]) { - pidString = pidString + pid.toString() + ", "; + for (NetworkAgentInfo nai : mNetworkAgentInfos.values()) { + pw.println(nai.toString()); + pw.increaseIndent(); + pw.println("Requests:"); + pw.increaseIndent(); + for (int i = 0; i < nai.networkRequests.size(); i++) { + pw.println(nai.networkRequests.valueAt(i).toString()); } - pw.println(pidString); + pw.decreaseIndent(); + pw.println("Lingered:"); + pw.increaseIndent(); + for (NetworkRequest nr : nai.networkLingered) pw.println(nr.toString()); + pw.decreaseIndent(); + pw.decreaseIndent(); } - pw.println(); pw.decreaseIndent(); + pw.println(); - pw.println("FeatureUsers:"); + pw.println("Network Requests:"); pw.increaseIndent(); - for (Object requester : mFeatureUsers) { - pw.println(requester.toString()); + for (NetworkRequestInfo nri : mNetworkRequests.values()) { + pw.println(nri.toString()); } pw.println(); pw.decreaseIndent(); |