diff options
author | Robert Greenwalt <rgreenwalt@google.com> | 2011-04-07 14:22:03 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-04-07 14:22:03 -0700 |
commit | 80f7c594fae3f1b19e3ea78938de450418fe183c (patch) | |
tree | cd17f77bf1022f1dd132aecd6d13aa604b89e3c6 /wifi/java/android | |
parent | 567882e1f9a31d78cba8ea7f1112d0a9e42d137a (diff) | |
parent | f4a29403ae5b6d3e8e754a025d33f0c33adecb21 (diff) | |
download | frameworks_base-80f7c594fae3f1b19e3ea78938de450418fe183c.zip frameworks_base-80f7c594fae3f1b19e3ea78938de450418fe183c.tar.gz frameworks_base-80f7c594fae3f1b19e3ea78938de450418fe183c.tar.bz2 |
am f4a29403: resolved conflicts for merge of 70c3d1c2 to honeycomb-plus-aosp
* commit 'f4a29403ae5b6d3e8e754a025d33f0c33adecb21':
Add external dependency API.
Diffstat (limited to 'wifi/java/android')
-rw-r--r-- | wifi/java/android/net/wifi/WifiStateTracker.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/wifi/java/android/net/wifi/WifiStateTracker.java b/wifi/java/android/net/wifi/WifiStateTracker.java index 07900ae..338cb4d 100644 --- a/wifi/java/android/net/wifi/WifiStateTracker.java +++ b/wifi/java/android/net/wifi/WifiStateTracker.java @@ -50,6 +50,7 @@ public class WifiStateTracker implements NetworkStateTracker { private LinkProperties mLinkProperties; private LinkCapabilities mLinkCapabilities; private NetworkInfo mNetworkInfo; + private NetworkInfo.State mLastState = NetworkInfo.State.UNKNOWN; /* For sending events to connectivity service handler */ private Handler mCsHandler; @@ -217,6 +218,14 @@ public class WifiStateTracker implements NetworkStateTracker { if (mLinkCapabilities == null) { mLinkCapabilities = new LinkCapabilities(); } + // don't want to send redundent state messages + // TODO can this be fixed in WifiStateMachine? + NetworkInfo.State state = mNetworkInfo.getState(); + if (mLastState == state) { + return; + } else { + mLastState = state; + } Message msg = mCsHandler.obtainMessage(EVENT_STATE_CHANGED, mNetworkInfo); msg.sendToTarget(); } else if (intent.getAction().equals(WifiManager.LINK_CONFIGURATION_CHANGED_ACTION)) { @@ -228,4 +237,7 @@ public class WifiStateTracker implements NetworkStateTracker { } } + public void setDependencyMet(boolean met) { + // not supported on this network + } } |