diff options
author | Robert Greenwalt <rgreenwalt@google.com> | 2014-04-08 17:34:00 -0700 |
---|---|---|
committer | Robert Greenwalt <rgreenwalt@google.com> | 2014-05-12 16:52:56 -0700 |
commit | f9cb86aebe9647e0fe0137fc198ba16c017445c6 (patch) | |
tree | 5f7d1e0ab2f48cb39092881266f21f7e11ea33b3 /wifi | |
parent | 6681e32fff77174b1b93557c08d1fd00375422c0 (diff) | |
download | frameworks_base-f9cb86aebe9647e0fe0137fc198ba16c017445c6.zip frameworks_base-f9cb86aebe9647e0fe0137fc198ba16c017445c6.tar.gz frameworks_base-f9cb86aebe9647e0fe0137fc198ba16c017445c6.tar.bz2 |
Replace LinkCapabilities with NetworkCapabilities
Also remove unused LinkSocket and LinkSocketNotifier.
bug:13885501
Change-Id: Id426e31b201fa4f29109b5fea485d8efb34519d3
Diffstat (limited to 'wifi')
-rw-r--r-- | wifi/java/android/net/wifi/WifiManager.java | 4 | ||||
-rw-r--r-- | wifi/java/android/net/wifi/WifiStateTracker.java | 24 |
2 files changed, 8 insertions, 20 deletions
diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java index 5af1e4e..15b65c1 100644 --- a/wifi/java/android/net/wifi/WifiManager.java +++ b/wifi/java/android/net/wifi/WifiManager.java @@ -402,12 +402,12 @@ public class WifiManager { public static final String EXTRA_LINK_PROPERTIES = "linkProperties"; /** - * The lookup key for a {@link android.net.LinkCapabilities} object associated with the + * The lookup key for a {@link android.net.NetworkCapabilities} object associated with the * Wi-Fi network. Retrieve with * {@link android.content.Intent#getParcelableExtra(String)}. * @hide */ - public static final String EXTRA_LINK_CAPABILITIES = "linkCapabilities"; + public static final String EXTRA_NETWORK_CAPABILITIES = "networkCapabilities"; /** * The network IDs of the configured networks could have changed. diff --git a/wifi/java/android/net/wifi/WifiStateTracker.java b/wifi/java/android/net/wifi/WifiStateTracker.java index 7ded171..40e6649 100644 --- a/wifi/java/android/net/wifi/WifiStateTracker.java +++ b/wifi/java/android/net/wifi/WifiStateTracker.java @@ -21,7 +21,7 @@ import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.net.BaseNetworkStateTracker; -import android.net.LinkCapabilities; +import android.net.NetworkCapabilities; import android.net.LinkQualityInfo; import android.net.LinkProperties; import android.net.NetworkInfo; @@ -65,7 +65,7 @@ public class WifiStateTracker extends BaseNetworkStateTracker { public WifiStateTracker(int netType, String networkName) { mNetworkInfo = new NetworkInfo(netType, 0, networkName, ""); mLinkProperties = new LinkProperties(); - mLinkCapabilities = new LinkCapabilities(); + mNetworkCapabilities = new NetworkCapabilities(); mNetworkInfo.setIsAvailable(false); setTeardownRequested(false); @@ -183,17 +183,6 @@ public class WifiStateTracker extends BaseNetworkStateTracker { } /** - * A capability is an Integer/String pair, the capabilities - * are defined in the class LinkSocket#Key. - * - * @return a copy of this connections capabilities, may be empty but never null. - */ - @Override - public LinkCapabilities getLinkCapabilities() { - return new LinkCapabilities(mLinkCapabilities); - } - - /** * Return link info * @return an object of type WifiLinkQualityInfo */ @@ -264,10 +253,10 @@ public class WifiStateTracker extends BaseNetworkStateTracker { if (mLinkProperties == null) { mLinkProperties = new LinkProperties(); } - mLinkCapabilities = intent.getParcelableExtra( - WifiManager.EXTRA_LINK_CAPABILITIES); - if (mLinkCapabilities == null) { - mLinkCapabilities = new LinkCapabilities(); + mNetworkCapabilities = intent.getParcelableExtra( + WifiManager.EXTRA_NETWORK_CAPABILITIES); + if (mNetworkCapabilities == null) { + mNetworkCapabilities = new NetworkCapabilities(); } mWifiInfo = intent.getParcelableExtra(WifiManager.EXTRA_WIFI_INFO); @@ -323,4 +312,3 @@ public class WifiStateTracker extends BaseNetworkStateTracker { mSamplingDataTracker.stopSampling(s); } } - |