Merge "Add NetworkProperties to DataConnection."
This commit is contained in:
@@ -99,19 +99,20 @@ public class NetworkProperties implements Parcelable {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public synchronized String toString() {
|
public synchronized String toString() {
|
||||||
String ifaceName = (mIface == null ? "" : "InterfaceName: " + mIface.getName() + " ");
|
String ifaceName = (mIface == null ? "" : "InterfaceName: " + mIface.getName() + " ");
|
||||||
|
|
||||||
String ip = "IpAddresses: [";
|
String ip = "IpAddresses: [";
|
||||||
for (InetAddress addr : mAddresses) ip += addr.toString() + ",";
|
for (InetAddress addr : mAddresses) ip += addr.getHostAddress() + ",";
|
||||||
ip += "] ";
|
ip += "] ";
|
||||||
|
|
||||||
String dns = "DnsAddresses: [";
|
String dns = "DnsAddresses: [";
|
||||||
for (InetAddress addr : mDnses) dns += addr.toString() + ",";
|
for (InetAddress addr : mDnses) dns += addr.getHostAddress() + ",";
|
||||||
dns += "] ";
|
dns += "] ";
|
||||||
|
|
||||||
String proxy = (mHttpProxy == null ? "" : "HttpProxy: " + mHttpProxy.toString() + " ");
|
String proxy = (mHttpProxy == null ? "" : "HttpProxy: " + mHttpProxy.toString() + " ");
|
||||||
String gateway = (mGateway == null ? "" : "Gateway: " + mGateway.toString() + " ");
|
String gateway = (mGateway == null ? "" : "Gateway: " + mGateway.getHostAddress() + " ");
|
||||||
|
|
||||||
return ifaceName + ip + gateway + dns + proxy;
|
return ifaceName + ip + gateway + dns + proxy;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,6 +57,14 @@ public class ProxyProperties implements Parcelable {
|
|||||||
mExclusionList = exclusionList;
|
mExclusionList = exclusionList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append(mProxy.getHostAddress()).append(":").append(mPort)
|
||||||
|
.append(" xl=").append(mExclusionList);
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implement the Parcelable interface
|
* Implement the Parcelable interface
|
||||||
* @hide
|
* @hide
|
||||||
|
|||||||
Reference in New Issue
Block a user