am 272be52c: Clear all Ethernet state when our interface goes away.
* commit '272be52cb7c1d61a40ac5f03084c43059bc6476e': Clear all Ethernet state when our interface goes away.
This commit is contained in:
@@ -208,13 +208,18 @@ class EthernetNetworkFactory {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
Log.d(TAG, "Stopped tracking interface " + iface);
|
Log.d(TAG, "Stopped tracking interface " + iface);
|
||||||
|
// TODO: Unify this codepath with stop().
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
|
NetworkUtils.stopDhcp(mIface);
|
||||||
mIface = "";
|
mIface = "";
|
||||||
mHwAddr = null;
|
mHwAddr = null;
|
||||||
mNetworkInfo.setExtraInfo(null);
|
mNetworkInfo.setExtraInfo(null);
|
||||||
|
mLinkUp = false;
|
||||||
|
mNetworkInfo.setDetailedState(DetailedState.DISCONNECTED, null, mHwAddr);
|
||||||
|
updateAgent();
|
||||||
|
mNetworkAgent = null;
|
||||||
mNetworkInfo = new NetworkInfo(ConnectivityManager.TYPE_ETHERNET, 0, NETWORK_TYPE, "");
|
mNetworkInfo = new NetworkInfo(ConnectivityManager.TYPE_ETHERNET, 0, NETWORK_TYPE, "");
|
||||||
mLinkProperties = new LinkProperties();
|
mLinkProperties = new LinkProperties();
|
||||||
updateAgent();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user