diff options
author | Jeff Sharkey <jsharkey@android.com> | 2012-08-06 11:41:50 -0700 |
---|---|---|
committer | Jeff Sharkey <jsharkey@android.com> | 2012-08-06 11:45:01 -0700 |
commit | 75fbb4bdfde9188081f000506845d852f31362f0 (patch) | |
tree | 567b30e20b9c8ef14ac61d072e22d0faac4236c0 /services/java/com/android/server/ConnectivityService.java | |
parent | 187019c51fb1f8f79d4d5919facbc8d569ff844e (diff) | |
download | frameworks_base-75fbb4bdfde9188081f000506845d852f31362f0.zip frameworks_base-75fbb4bdfde9188081f000506845d852f31362f0.tar.gz frameworks_base-75fbb4bdfde9188081f000506845d852f31362f0.tar.bz2 |
Include network type that caused broadcast.
Network type can be obtained through EXTRA_NETWORK_INFO, but offer
it as first-class extra since the returned NetworkInfo is deprecated.
Bug: 6936247
Change-Id: Ief59577afd2bd930f0f4c5650b413feef86bfbc3
Diffstat (limited to 'services/java/com/android/server/ConnectivityService.java')
-rw-r--r-- | services/java/com/android/server/ConnectivityService.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java index a550f34..22acfbf 100644 --- a/services/java/com/android/server/ConnectivityService.java +++ b/services/java/com/android/server/ConnectivityService.java @@ -1622,6 +1622,7 @@ public class ConnectivityService extends IConnectivityManager.Stub { Intent intent = new Intent(ConnectivityManager.CONNECTIVITY_ACTION); intent.putExtra(ConnectivityManager.EXTRA_NETWORK_INFO, info); + intent.putExtra(ConnectivityManager.EXTRA_NETWORK_TYPE, info.getType()); if (info.isFailover()) { intent.putExtra(ConnectivityManager.EXTRA_IS_FAILOVER, true); info.setFailover(false); @@ -1748,6 +1749,7 @@ public class ConnectivityService extends IConnectivityManager.Stub { private Intent makeGeneralIntent(NetworkInfo info, String bcastType) { Intent intent = new Intent(bcastType); intent.putExtra(ConnectivityManager.EXTRA_NETWORK_INFO, info); + intent.putExtra(ConnectivityManager.EXTRA_NETWORK_TYPE, info.getType()); if (info.isFailover()) { intent.putExtra(ConnectivityManager.EXTRA_IS_FAILOVER, true); info.setFailover(false); @@ -1798,6 +1800,7 @@ public class ConnectivityService extends IConnectivityManager.Stub { Intent intent = new Intent(ConnectivityManager.CONNECTIVITY_ACTION); intent.putExtra(ConnectivityManager.EXTRA_NETWORK_INFO, info); + intent.putExtra(ConnectivityManager.EXTRA_NETWORK_TYPE, info.getType()); if (getActiveNetworkInfo() == null) { intent.putExtra(ConnectivityManager.EXTRA_NO_CONNECTIVITY, true); } |