Clean up and add some Network logging.

Dumps the netid for the Network and adds that to the NetworkAgentInfo.

Change-Id: Id9fbcc55ca55bf1a020f747f0c44902efb1b5f87
This commit is contained in:
Robert Greenwalt
2014-06-23 16:07:43 -07:00
parent 7ee7824678
commit 52228dd7cf
2 changed files with 8 additions and 1 deletions

View File

@@ -190,13 +190,20 @@ public class Network implements Parcelable {
}
};
@Override
public boolean equals(Object obj) {
if (obj instanceof Network == false) return false;
Network other = (Network)obj;
return this.netId == other.netId;
}
@Override
public int hashCode() {
return netId * 11;
}
@Override
public String toString() {
return Integer.toString(netId);
}
}

View File

@@ -78,6 +78,6 @@ public class NetworkAgentInfo {
public String name() {
return "NetworkAgentInfo [" + networkInfo.getTypeName() + " (" +
networkInfo.getSubtypeName() + ")]";
networkInfo.getSubtypeName() + ") - " + network.toString() + "]";
}
}