diff options
author | Robert Greenwalt <rgreenwalt@google.com> | 2011-09-13 14:25:27 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-09-13 14:25:27 -0700 |
commit | 2367e75beebd44338d67c20270cecedd5ca3cb5c (patch) | |
tree | 5d6cd963b4bb950df0f4001968835552af0fd5d2 | |
parent | 0042330e3b19426447cae0456c57f3ba14c189b6 (diff) | |
parent | 61db35da2b4501dde5646f86f21cf5054c41ea26 (diff) | |
download | frameworks_base-2367e75beebd44338d67c20270cecedd5ca3cb5c.zip frameworks_base-2367e75beebd44338d67c20270cecedd5ca3cb5c.tar.gz frameworks_base-2367e75beebd44338d67c20270cecedd5ca3cb5c.tar.bz2 |
am 61db35da: am 2f835a61: Merge "Make copies of NetworkInfo to give out." into honeycomb-LTE
* commit '61db35da2b4501dde5646f86f21cf5054c41ea26':
Make copies of NetworkInfo to give out.
-rw-r--r-- | core/java/android/net/MobileDataStateTracker.java | 2 | ||||
-rw-r--r-- | wifi/java/android/net/wifi/WifiStateTracker.java | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/core/java/android/net/MobileDataStateTracker.java b/core/java/android/net/MobileDataStateTracker.java index 65c1bd5..bcf6239 100644 --- a/core/java/android/net/MobileDataStateTracker.java +++ b/core/java/android/net/MobileDataStateTracker.java @@ -394,7 +394,7 @@ public class MobileDataStateTracker implements NetworkStateTracker { && lastReason != null) reason = lastReason; mNetworkInfo.setDetailedState(state, reason, extraInfo); - Message msg = mTarget.obtainMessage(EVENT_STATE_CHANGED, mNetworkInfo); + Message msg = mTarget.obtainMessage(EVENT_STATE_CHANGED, new NetworkInfo(mNetworkInfo)); msg.sendToTarget(); } } diff --git a/wifi/java/android/net/wifi/WifiStateTracker.java b/wifi/java/android/net/wifi/WifiStateTracker.java index 956c3f2..c34c464 100644 --- a/wifi/java/android/net/wifi/WifiStateTracker.java +++ b/wifi/java/android/net/wifi/WifiStateTracker.java @@ -162,7 +162,7 @@ public class WifiStateTracker implements NetworkStateTracker { * Fetch NetworkInfo for the network */ public NetworkInfo getNetworkInfo() { - return mNetworkInfo; + return new NetworkInfo(mNetworkInfo); } /** @@ -242,7 +242,8 @@ public class WifiStateTracker implements NetworkStateTracker { } else { mLastState = state; } - Message msg = mCsHandler.obtainMessage(EVENT_STATE_CHANGED, mNetworkInfo); + Message msg = mCsHandler.obtainMessage(EVENT_STATE_CHANGED, + new NetworkInfo(mNetworkInfo)); msg.sendToTarget(); } else if (intent.getAction().equals(WifiManager.LINK_CONFIGURATION_CHANGED_ACTION)) { mLinkProperties = (LinkProperties) intent.getParcelableExtra( |