Add logging to track down bug
bug:8377625 Change-Id: Ifd0c4081a2f1238dbbc39c6904b993e2fb95455a
This commit is contained in:
@@ -20,6 +20,7 @@ import android.net.ProxyProperties;
|
|||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.net.UnknownHostException;
|
import java.net.UnknownHostException;
|
||||||
@@ -57,6 +58,7 @@ public class LinkProperties implements Parcelable {
|
|||||||
private String mDomains;
|
private String mDomains;
|
||||||
private Collection<RouteInfo> mRoutes = new ArrayList<RouteInfo>();
|
private Collection<RouteInfo> mRoutes = new ArrayList<RouteInfo>();
|
||||||
private ProxyProperties mHttpProxy;
|
private ProxyProperties mHttpProxy;
|
||||||
|
public boolean mLogMe;
|
||||||
|
|
||||||
public static class CompareResult<T> {
|
public static class CompareResult<T> {
|
||||||
public Collection<T> removed = new ArrayList<T>();
|
public Collection<T> removed = new ArrayList<T>();
|
||||||
@@ -75,6 +77,7 @@ public class LinkProperties implements Parcelable {
|
|||||||
|
|
||||||
public LinkProperties() {
|
public LinkProperties() {
|
||||||
clear();
|
clear();
|
||||||
|
mLogMe = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// copy constructor instead of clone
|
// copy constructor instead of clone
|
||||||
@@ -91,6 +94,14 @@ public class LinkProperties implements Parcelable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setInterfaceName(String iface) {
|
public void setInterfaceName(String iface) {
|
||||||
|
if (mLogMe) {
|
||||||
|
Log.d("LinkProperties", "setInterfaceName from " + mIfaceName +
|
||||||
|
" to " + iface);
|
||||||
|
for (StackTraceElement e : Thread.currentThread().getStackTrace()) {
|
||||||
|
Log.d("LinkProperties", " " + e.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
mIfaceName = iface;
|
mIfaceName = iface;
|
||||||
ArrayList<RouteInfo> newRoutes = new ArrayList<RouteInfo>(mRoutes.size());
|
ArrayList<RouteInfo> newRoutes = new ArrayList<RouteInfo>(mRoutes.size());
|
||||||
for (RouteInfo route : mRoutes) {
|
for (RouteInfo route : mRoutes) {
|
||||||
@@ -166,6 +177,13 @@ public class LinkProperties implements Parcelable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void clear() {
|
public void clear() {
|
||||||
|
if (mLogMe) {
|
||||||
|
Log.d("LinkProperties", "clear from " + mIfaceName);
|
||||||
|
for (StackTraceElement e : Thread.currentThread().getStackTrace()) {
|
||||||
|
Log.d("LinkProperties", " " + e.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
mIfaceName = null;
|
mIfaceName = null;
|
||||||
mLinkAddresses.clear();
|
mLinkAddresses.clear();
|
||||||
mDnses.clear();
|
mDnses.clear();
|
||||||
|
|||||||
Reference in New Issue
Block a user