Merge "Add reconnect flow when updateIPConfiguration" am: 08998cf4d1 am: 571f7a6b67
am: aaff25b1ec
Change-Id: I612033b0dec43c1b911e00e5d42d2e34bc2d23f7
This commit is contained in:
@@ -376,7 +376,14 @@ public class EthernetNetworkFactory extends NetworkFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void setIpConfig(IpConfiguration ipConfig) {
|
void setIpConfig(IpConfiguration ipConfig) {
|
||||||
|
if (this.mIpConfig.equals(ipConfig)) {
|
||||||
|
if (DBG) Log.d(TAG, "ipConfig have not changed,so ignore setIpConfig");
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.mIpConfig = ipConfig;
|
this.mIpConfig = ipConfig;
|
||||||
|
if (mNetworkInfo.getDetailedState() != DetailedState.DISCONNECTED) {
|
||||||
|
restart();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean statisified(NetworkCapabilities requestedCapabilities) {
|
boolean statisified(NetworkCapabilities requestedCapabilities) {
|
||||||
@@ -587,6 +594,12 @@ public class EthernetNetworkFactory extends NetworkFactory {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void restart(){
|
||||||
|
if (DBG) Log.d(TAG, "reconnecting Etherent");
|
||||||
|
stop();
|
||||||
|
start();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return getClass().getSimpleName() + "{ "
|
return getClass().getSimpleName() + "{ "
|
||||||
|
|||||||
Reference in New Issue
Block a user