diff options
author | Etan Cohen <etancohen@google.com> | 2015-07-13 18:04:38 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-07-13 18:04:43 +0000 |
commit | c09544bb88ada53494d4a955d0450a22985b4799 (patch) | |
tree | 784db0c9f4b4cd4381f3fdef82272c2c124de1da /services | |
parent | 1578357df737296aa151c6934fe7dd749a43ae15 (diff) | |
parent | 3ac71b7f870e6b0a2bb03fceeba8d330830a7412 (diff) | |
download | frameworks_base-c09544bb88ada53494d4a955d0450a22985b4799.zip frameworks_base-c09544bb88ada53494d4a955d0450a22985b4799.tar.gz frameworks_base-c09544bb88ada53494d4a955d0450a22985b4799.tar.bz2 |
Merge "Fix filter on CONNECTIVITY_ACTION updates" into mnc-dev
Diffstat (limited to 'services')
-rw-r--r-- | services/core/java/com/android/server/ConnectivityService.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java index 39c2891..daac521 100644 --- a/services/core/java/com/android/server/ConnectivityService.java +++ b/services/core/java/com/android/server/ConnectivityService.java @@ -559,8 +559,9 @@ public class ConnectivityService extends IConnectivityManager.Stub final DetailedState state = nai.networkInfo.getDetailedState(); for (int type = 0; type < mTypeLists.length; type++) { final ArrayList<NetworkAgentInfo> list = mTypeLists[type]; + final boolean contains = (list != null && list.contains(nai)); final boolean isFirst = (list != null && list.size() > 0 && nai == list.get(0)); - if (isFirst || isDefault) { + if (isFirst || (contains && isDefault)) { maybeLogBroadcast(nai, state, type, isDefault); sendLegacyNetworkBroadcast(nai, state, type); } |