Add the network handle to the NetworkAgentInfo#toString() output.
This will make it possible to find nethandles via, e.g.
"dumpsys connectivity --short".
Without this, native multinetwork API debugging requires running
"dumpsys connectivity --diag" in order to see the nethandle values.
Bug: 19537384
Change-Id: Icdd2b112523d4ecf88d5339f229e714a56d248f8
diff --git a/services/core/java/com/android/server/connectivity/NetworkAgentInfo.java b/services/core/java/com/android/server/connectivity/NetworkAgentInfo.java
index 0029279..c5d38cb 100644
--- a/services/core/java/com/android/server/connectivity/NetworkAgentInfo.java
+++ b/services/core/java/com/android/server/connectivity/NetworkAgentInfo.java
@@ -248,10 +248,10 @@
}
public String toString() {
- return "NetworkAgentInfo{ ni{" + networkInfo + "} network{" +
- network + "} lp{" +
- linkProperties + "} nc{" +
- networkCapabilities + "} Score{" + getCurrentScore() + "} " +
+ return "NetworkAgentInfo{ ni{" + networkInfo + "} " +
+ "network{" + network + "} nethandle{" + network.getNetworkHandle() + "} " +
+ "lp{" + linkProperties + "} " +
+ "nc{" + networkCapabilities + "} Score{" + getCurrentScore() + "} " +
"everValidated{" + everValidated + "} lastValidated{" + lastValidated + "} " +
"created{" + created + "} lingering{" + lingering + "} " +
"explicitlySelected{" + networkMisc.explicitlySelected + "} " +