diff options
author | Lorenzo Colitti <lorenzo@google.com> | 2016-04-29 13:39:06 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-04-29 13:39:06 +0000 |
commit | 9c095e1871432ded244a6ade462d82d2e1a8648e (patch) | |
tree | 10e71c54b6c0a6625254d943885352fb7fd04e23 | |
parent | 5b4baf7330e22b93fd32a44824b27f43e4f2a549 (diff) | |
parent | 57aea849a9b02433b459f4f6f1c3d72d8cc430ca (diff) | |
download | ethernet-9c095e1871432ded244a6ade462d82d2e1a8648e.tar.gz |
Disable the IpManager timeout on Ethernet. am: c84dd94998
am: 57aea849a9
* commit '57aea849a9b02433b459f4f6f1c3d72d8cc430ca':
Disable the IpManager timeout on Ethernet.
Change-Id: I46ab6959dce02c5f5da3324d7c4ed59303dcd1cb
-rw-r--r-- | java/com/android/server/ethernet/EthernetNetworkFactory.java | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/java/com/android/server/ethernet/EthernetNetworkFactory.java b/java/com/android/server/ethernet/EthernetNetworkFactory.java index 7186863..0b091f2 100644 --- a/java/com/android/server/ethernet/EthernetNetworkFactory.java +++ b/java/com/android/server/ethernet/EthernetNetworkFactory.java @@ -33,6 +33,7 @@ import android.net.NetworkInfo; import android.net.NetworkInfo.DetailedState; import android.net.StaticIpConfiguration; import android.net.ip.IpManager; +import android.net.ip.IpManager.ProvisioningConfiguration; import android.net.ip.IpManager.WaitForProvisioningCallback; import android.os.Handler; import android.os.IBinder; @@ -283,7 +284,6 @@ class EthernetNetworkFactory { } } - // TODO: Handle DHCP renew. final Thread ipProvisioningThread = new Thread(new Runnable() { public void run() { if (DBG) { @@ -308,6 +308,7 @@ class EthernetNetworkFactory { public void onLinkPropertiesChange(LinkProperties newLp) { synchronized(EthernetNetworkFactory.this) { if (mNetworkAgent != null && mNetworkInfo.isConnected()) { + mLinkProperties = newLp; mNetworkAgent.sendLinkProperties(newLp); } } @@ -329,7 +330,11 @@ class EthernetNetworkFactory { mIpManager.setTcpBufferSizes(tcpBufferSizes); } - mIpManager.startProvisioning(); + final ProvisioningConfiguration provisioningConfiguration = + mIpManager.buildProvisioningConfiguration() + .withProvisioningTimeoutMs(0) + .build(); + mIpManager.startProvisioning(provisioningConfiguration); } linkProperties = ipmCallback.waitForProvisioning(); @@ -526,5 +531,11 @@ class EthernetNetworkFactory { pw.println("NetworkInfo: " + mNetworkInfo); pw.println("LinkProperties: " + mLinkProperties); pw.println("NetworkAgent: " + mNetworkAgent); + if (mIpManager != null) { + pw.println("IpManager:"); + pw.increaseIndent(); + mIpManager.dump(fd, pw, args); + pw.decreaseIndent(); + } } } |