frameworks/base
修訂 | 22fd00fe6bbc3dfc28ca23311fa79a8cb7e5d8c5 (tree) |
---|---|
時間 | 2011-02-25 18:28:55 |
作者 | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
Ethernet: initialize state depends on interfaces
If no interface found, disable Ethernet on initialization.
@@ -243,7 +243,7 @@ public class EthernetStateTracker extends NetworkStateTracker { | ||
243 | 243 | if (state != mEM.ETHERNET_STATE_DISABLED) { |
244 | 244 | if (state == mEM.ETHERNET_STATE_UNKNOWN) { |
245 | 245 | // maybe this is the first time we run, so set it to enabled |
246 | - mEM.setEnabled(true); | |
246 | + mEM.setEnabled(mEM.getDeviceNameList() != null); | |
247 | 247 | } else { |
248 | 248 | try { |
249 | 249 | resetInterface(); |