diff options
author | Robert Greenwalt <rgreenwalt@google.com> | 2014-06-04 11:52:08 -0700 |
---|---|---|
committer | Robert Greenwalt <rgreenwalt@google.com> | 2014-06-04 11:52:08 -0700 |
commit | ff0bf8dcf33f32eee17a6af5f688f6b5fef13aac (patch) | |
tree | 40e65bacf4e3ee4e1b05ea4a48f24a5116e4ddae | |
parent | 0d1b1749dad71372d9baeb0f852d3d91fccac73d (diff) | |
download | android_frameworks_opt_net_ethernet-ff0bf8dcf33f32eee17a6af5f688f6b5fef13aac.tar.gz android_frameworks_opt_net_ethernet-ff0bf8dcf33f32eee17a6af5f688f6b5fef13aac.tar.bz2 android_frameworks_opt_net_ethernet-ff0bf8dcf33f32eee17a6af5f688f6b5fef13aac.zip |
Fix ethernet.
It was attempting to update the NetworkAgent before the NetworkAgent
was created, causing NullPointerExceptions.
bug:15407938
Change-Id: Ie36b906df4b12f095a16d1b30c847a55b074d60c
-rw-r--r-- | java/com/android/server/ethernet/EthernetNetworkFactory.java | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/java/com/android/server/ethernet/EthernetNetworkFactory.java b/java/com/android/server/ethernet/EthernetNetworkFactory.java index bbbdaca..820e16b 100644 --- a/java/com/android/server/ethernet/EthernetNetworkFactory.java +++ b/java/com/android/server/ethernet/EthernetNetworkFactory.java @@ -136,7 +136,6 @@ class EthernetNetworkFactory { // Tell the agent we're disconnected. It will call disconnect(). mNetworkInfo.setDetailedState(DetailedState.DISCONNECTED, null, mHwAddr); } - mNetworkAgent.sendNetworkScore(mLinkUp? NETWORK_SCORE : -1); updateAgent(); mFactory.setScoreFilter(up ? NETWORK_SCORE : -1); } @@ -264,9 +263,6 @@ class EthernetNetworkFactory { setStaticIpAddress(linkProperties); } else { mNetworkInfo.setDetailedState(DetailedState.OBTAINING_IPADDR, null, mHwAddr); - synchronized (EthernetNetworkFactory.this) { - mNetworkAgent.sendNetworkInfo(mNetworkInfo); - } DhcpResults dhcpResults = new DhcpResults(); // TODO: Handle DHCP renewals better. @@ -276,13 +272,6 @@ class EthernetNetworkFactory { // noticing. if (!NetworkUtils.runDhcp(mIface, dhcpResults)) { Log.e(TAG, "DHCP request error:" + NetworkUtils.getDhcpError()); - synchronized(EthernetNetworkFactory.this) { - // DHCP failed. Tell the agent we now have a score - // of 0, and it will call disconnect for us. We'll - // attempt to reconnect when we next see a link up - // event, which resets the score to NETWORK_SCORE. - mNetworkAgent.sendNetworkScore(-1); - } mFactory.setScoreFilter(-1); return; } |