Home
last modified time | relevance | path

Searched refs:NetworkKey (Results 1 – 25 of 28) sorted by relevance

12

/frameworks/base/core/tests/coretests/src/android/net/
DNetworkKeyTest.java50 assertNull(NetworkKey.createFromWifiInfo(null)); in createFromWifi_nullInput()
56 assertNull(NetworkKey.createFromWifiInfo(mWifiInfo)); in createFromWifi_nullSsid()
63 assertNull(NetworkKey.createFromWifiInfo(mWifiInfo)); in createFromWifi_emptySsid()
70 assertNull(NetworkKey.createFromWifiInfo(mWifiInfo)); in createFromWifi_noneSsid()
76 assertNull(NetworkKey.createFromWifiInfo(mWifiInfo)); in createFromWifi_nullBssid()
83 assertNull(NetworkKey.createFromWifiInfo(mWifiInfo)); in createFromWifi_emptyBssid()
90 assertNull(NetworkKey.createFromWifiInfo(mWifiInfo)); in createFromWifi_invalidBssid()
98 NetworkKey expected = new NetworkKey(new WifiKey(VALID_SSID, VALID_BSSID)); in createFromWifi_validWifiInfo()
99 final NetworkKey actual = NetworkKey.createFromWifiInfo(mWifiInfo); in createFromWifi_validWifiInfo()
105 assertNull(NetworkKey.createFromScanResult(null)); in createFromScanResult_nullInput()
[all …]
DNetworkRecommendationProviderTest.java52 private NetworkKey[] mTestNetworkKeys;
62 mTestNetworkKeys = new NetworkKey[2]; in setUp()
63 mTestNetworkKeys[0] = new NetworkKey(new WifiKey("\"ssid_01\"", "00:00:00:00:00:11")); in setUp()
64 mTestNetworkKeys[1] = new NetworkKey(new WifiKey("\"ssid_02\"", "00:00:00:00:00:22")); in setUp()
87 mStub.requestScores(new NetworkKey[0]); in testScoreRequest_emptyInput()
109 NetworkKey[] mCapturedNetworks;
117 public void onRequestScores(NetworkKey[] networks) { in onRequestScores()
DScoredNetworkTest.java54 private static final NetworkKey KEY
55 = new NetworkKey(new WifiKey("\"ssid\"", "00:00:00:00:00:00"));
/frameworks/base/core/java/android/net/
DNetworkKey.java43 public class NetworkKey implements Parcelable { class
70 public static NetworkKey createFromScanResult(@Nullable ScanResult result) { in createFromScanResult()
83 return new NetworkKey(wifiKey); in createFromScanResult()
98 public static NetworkKey createFromWifiInfo(@Nullable WifiInfo wifiInfo) { in createFromWifiInfo()
111 return new NetworkKey(wifiKey); in createFromWifiInfo()
121 public NetworkKey(WifiKey wifiKey) { in NetworkKey() method in NetworkKey
126 private NetworkKey(Parcel in) { in NetworkKey() method in NetworkKey
159 NetworkKey that = (NetworkKey) o; in equals()
181 public static final @android.annotation.NonNull Parcelable.Creator<NetworkKey> CREATOR =
182 new Parcelable.Creator<NetworkKey>() {
[all …]
DINetworkRecommendationProvider.aidl19 import android.net.NetworkKey;
36 void requestScores(in NetworkKey[] networks); in requestScores()
DScoredNetwork.java70 public final NetworkKey networkKey;
112 public ScoredNetwork(NetworkKey networkKey, RssiCurve rssiCurve) { in ScoredNetwork()
129 public ScoredNetwork(NetworkKey networkKey, RssiCurve rssiCurve, boolean meteredHint) { in ScoredNetwork()
147 public ScoredNetwork(NetworkKey networkKey, RssiCurve rssiCurve, boolean meteredHint, in ScoredNetwork()
156 networkKey = NetworkKey.CREATOR.createFromParcel(in); in ScoredNetwork()
DINetworkScoreService.aidl20 import android.net.NetworkKey;
91 boolean requestScores(in NetworkKey[] networks); in requestScores()
DNetworkRecommendationProvider.java74 public abstract void onRequestScores(NetworkKey[] networks); in onRequestScores()
99 public void requestScores(final NetworkKey[] networks) throws RemoteException { in requestScores()
DNetworkKey.aidl19 parcelable NetworkKey;
DNetworkScoreManager.java368 public boolean requestScores(NetworkKey[] networks) throws SecurityException { in requestScores()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/wifi/
DWifiStatusTracker.java23 import android.net.NetworkKey;
91 mNetworkScoreManager.registerNetworkScoreCache(NetworkKey.TYPE_WIFI, in setListening()
97 mNetworkScoreManager.unregisterNetworkScoreCache(NetworkKey.TYPE_WIFI, in setListening()
149 NetworkKey networkKey = NetworkKey.createFromWifiInfo(mWifiInfo); in maybeRequestNetworkScore()
151 mNetworkScoreManager.requestScores(new NetworkKey[]{ networkKey }); in maybeRequestNetworkScore()
172 mWifiNetworkScoreCache.getScoredNetwork(NetworkKey.createFromWifiInfo(mWifiInfo)); in updateStatusLabel()
DWifiTracker.java28 import android.net.NetworkKey;
136 private final Set<NetworkKey> mRequestedScores = new ArraySet<>();
360 NetworkKey.TYPE_WIFI, in registerScoreCache()
365 private void requestScoresForNetworkKeys(Collection<NetworkKey> keys) { in requestScoresForNetworkKeys()
371 mNetworkScoreManager.requestScores(keys.toArray(new NetworkKey[keys.size()])); in requestScoresForNetworkKeys()
402 mNetworkScoreManager.unregisterNetworkScoreCache(NetworkKey.TYPE_WIFI, mScoreCache); in unregisterScoreCache()
576 final List<NetworkKey> scoresToRequest = new ArrayList<>(); in updateAccessPoints()
580 NetworkKey key = NetworkKey.createFromScanResult(result); in updateAccessPoints()
617 scoresToRequest.add(NetworkKey.createFromWifiInfo(mLastInfo)); in updateAccessPoints()
DAccessPoint.java32 import android.net.NetworkKey;
631 NetworkKey key = NetworkKey.createFromWifiInfo(mInfo); in updateMetered()
/frameworks/base/services/tests/servicestests/src/com/android/server/
DNetworkScoreServiceTest.java50 import android.net.NetworkKey;
113 new ScoredNetwork(new NetworkKey(new WifiKey(quote(SSID), "00:00:00:00:00:00")),
116 new ScoredNetwork(new NetworkKey(new WifiKey(quote(SSID_2), "00:00:00:00:00:00")),
242 assertFalse(mNetworkScoreService.requestScores(new NetworkKey[0])); in testRequestScores_providerNotConnected()
249 .requestScores(any(NetworkKey[].class)); in testRequestScores_providerThrowsRemoteException()
252 assertFalse(mNetworkScoreService.requestScores(new NetworkKey[0])); in testRequestScores_providerThrowsRemoteException()
259 final NetworkKey[] networks = new NetworkKey[0]; in testRequestScores_providerAvailable()
305 mNetworkScoreService.registerNetworkScoreCache(NetworkKey.TYPE_WIFI, in testUpdateScores_oneRegisteredCache()
320 mNetworkScoreService.registerNetworkScoreCache(NetworkKey.TYPE_WIFI, in testUpdateScores_twoRegisteredCaches()
323 NetworkKey.TYPE_WIFI, mNetworkScoreCache2, CACHE_FILTER_NONE); in testUpdateScores_twoRegisteredCaches()
[all …]
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/
DScoredNetworkEvaluator.java23 import android.net.NetworkKey;
93 ArrayList<NetworkKey> unscoredNetworks = new ArrayList<NetworkKey>(); in updateNetworkScoreCache()
96 NetworkKey networkKey = NetworkKey.createFromScanResult(scanResult); in updateNetworkScoreCache()
107 NetworkKey[] unscoredNetworkKeys = in updateNetworkScoreCache()
108 unscoredNetworks.toArray(new NetworkKey[unscoredNetworks.size()]); in updateNetworkScoreCache()
DWifiNetworkSelector.java25 import android.net.NetworkKey;
375 ArrayList<NetworkKey> unscoredNetworks = new ArrayList<NetworkKey>(); in filterScanResults()
DWifiInjector.java28 import android.net.NetworkKey;
177 mNetworkScoreManager.registerNetworkScoreCache(NetworkKey.TYPE_WIFI, in WifiInjector()
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/wifi/
DTimestampedScoredNetworkTest.java20 import android.net.NetworkKey;
38 new NetworkKey(new WifiKey("\"" + ssid + "\"", "00:00:00:00:00:00")), null); in createTestScoredNetwork()
DWifiUtilsTest.java26 import android.net.NetworkKey;
174 new NetworkKey(new WifiKey(TEST_SSID, TEST_BSSID)), in buildScoredNetworkWithGivenBadgeCurve()
/frameworks/base/wifi/java/android/net/wifi/
DWifiNetworkScoreCache.java24 import android.net.NetworkKey;
199 public ScoredNetwork getScoredNetwork(NetworkKey networkKey) { in getScoredNetwork()
219 private String buildNetworkKey(NetworkKey networkKey) { in buildNetworkKey()
224 if (networkKey.type == NetworkKey.TYPE_WIFI) { in buildNetworkKey()
/frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/
DWifiTrackerTest.java41 import android.net.NetworkKey;
100 private static final NetworkKey NETWORK_KEY_1 =
101 new NetworkKey(new WifiKey('"' + SSID_1 + '"', BSSID_1));
110 private static final NetworkKey NETWORK_KEY_2 =
111 new NetworkKey(new WifiKey('"' + SSID_2 + '"', BSSID_2));
157 private final List<NetworkKey> mRequestedKeys = new ArrayList<>();
210 NetworkKey[] keys = (NetworkKey[]) input.getArguments()[0]; in setUp()
211 for (NetworkKey key : keys) { in setUp()
216 }).when(mockNetworkScoreManager).requestScores(Matchers.<NetworkKey[]>any()); in setUp()
479 .unregisterNetworkScoreCache(NetworkKey.TYPE_WIFI, scoreCache); in startAndStopTrackingShouldRegisterAndUnregisterScoreCache()
[all …]
DAccessPointTest.java36 import android.net.NetworkKey;
614 new NetworkKey(new WifiKey(TEST_SSID, TEST_BSSID)),
/frameworks/base/wifi/tests/src/android/net/wifi/
DWifiNetworkScoreCacheTest.java25 import android.net.NetworkKey;
90 return new ScoredNetwork(new NetworkKey(key), curve); in buildScoredNetwork()
185 new NetworkKey(VALID_KEY), mockRssiCurve, true /* metered Hint */); in getMeteredHintShouldReturnTrue()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
DScoredNetworkEvaluatorTest.java28 import android.net.NetworkKey;
77 @Captor private ArgumentCaptor<NetworkKey[]> mNetworkKeyArrayCaptor;
177 NetworkKey expectedNetworkKey = NetworkKey.createFromScanResult( in testUpdate_allNetworksUnscored()
180 expectedNetworkKey = NetworkKey.createFromScanResult( in testUpdate_allNetworksUnscored()
208 NetworkKey[] requestedScores = mNetworkKeyArrayCaptor.getValue(); in testUpdate_oneScored_oneUnscored()
210 NetworkKey expectedNetworkKey = NetworkKey.createFromScanResult( in testUpdate_oneScored_oneUnscored()
/frameworks/base/services/core/java/com/android/server/
DNetworkScoreService.java35 import android.net.NetworkKey;
635 private final NetworkKey mCurrentNetwork;
638 mCurrentNetwork = NetworkKey.createFromWifiInfo(wifiInfoSupplier.get()); in CurrentNetworkScoreCacheFilter()
670 private final Set<NetworkKey> mScanResultKeys;
678 NetworkKey key = NetworkKey.createFromScanResult(scanResult); in ScanResultsScoreCacheFilter()
877 public boolean requestScores(NetworkKey[] networks) { in requestScores()

12