/frameworks/opt/net/wifi/service/java/com/android/server/wifi/util/ |
D | ScanResultUtil.java | 43 public static ScanDetail toScanDetail(ScanResult scanResult) { in toScanDetail() argument 44 NetworkDetail networkDetail = new NetworkDetail(scanResult.BSSID, in toScanDetail() 45 scanResult.informationElements, scanResult.anqpLines, scanResult.frequency); in toScanDetail() 46 return new ScanDetail(scanResult, networkDetail); in toScanDetail() 53 public static boolean isScanResultForPskNetwork(ScanResult scanResult) { in isScanResultForPskNetwork() argument 54 return scanResult.capabilities.contains("PSK"); in isScanResultForPskNetwork() 61 public static boolean isScanResultForEapNetwork(ScanResult scanResult) { in isScanResultForEapNetwork() argument 62 return scanResult.capabilities.contains("EAP"); in isScanResultForEapNetwork() 69 public static boolean isScanResultForEapSuiteBNetwork(ScanResult scanResult) { in isScanResultForEapSuiteBNetwork() argument 70 return scanResult.capabilities.contains("SUITE-B-192"); in isScanResultForEapSuiteBNetwork() [all …]
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/wificond/ |
D | NativeScanResultTest.java | 60 NativeScanResult scanResult = new NativeScanResult(); in canSerializeAndDeserialize() local 61 scanResult.ssid = TEST_SSID; in canSerializeAndDeserialize() 62 scanResult.bssid = TEST_BSSID; in canSerializeAndDeserialize() 63 scanResult.infoElement = TEST_INFO_ELEMENT; in canSerializeAndDeserialize() 64 scanResult.frequency = TEST_FREQUENCY; in canSerializeAndDeserialize() 65 scanResult.signalMbm = TEST_SIGNAL_MBM; in canSerializeAndDeserialize() 66 scanResult.tsf = TEST_TSF; in canSerializeAndDeserialize() 67 scanResult.capability = TEST_CAPABILITY; in canSerializeAndDeserialize() 68 scanResult.associated = TEST_ASSOCIATED; in canSerializeAndDeserialize() 69 scanResult.radioChainInfos = new ArrayList<>(Arrays.asList( in canSerializeAndDeserialize() [all …]
|
/frameworks/base/core/tests/coretests/src/android/net/ |
D | NetworkKeyTest.java | 110 ScanResult scanResult = new ScanResult(); in createFromScanResult_nullWifiSsid() local 111 scanResult.BSSID = VALID_BSSID; in createFromScanResult_nullWifiSsid() 113 assertNull(NetworkKey.createFromScanResult(scanResult)); in createFromScanResult_nullWifiSsid() 118 ScanResult scanResult = new ScanResult(); in createFromScanResult_emptyWifiSsid() local 119 scanResult.wifiSsid = WifiSsid.createFromAsciiEncoded(""); in createFromScanResult_emptyWifiSsid() 120 scanResult.BSSID = VALID_BSSID; in createFromScanResult_emptyWifiSsid() 122 assertNull(NetworkKey.createFromScanResult(scanResult)); in createFromScanResult_emptyWifiSsid() 127 ScanResult scanResult = new ScanResult(); in createFromScanResult_noneWifiSsid() local 128 scanResult.wifiSsid = WifiSsid.createFromAsciiEncoded(WifiSsid.NONE); in createFromScanResult_noneWifiSsid() 129 scanResult.BSSID = VALID_BSSID; in createFromScanResult_noneWifiSsid() [all …]
|
/frameworks/base/wifi/tests/src/android/net/wifi/ |
D | ScanResultTest.java | 104 ScanResult scanResult = createScanResult(); in verifyScanResultCopyWithoutRadioChainInfo() local 105 ScanResult copyScanResult = new ScanResult(scanResult); in verifyScanResultCopyWithoutRadioChainInfo() 106 assertScanResultEquals(scanResult, copyScanResult); in verifyScanResultCopyWithoutRadioChainInfo() 114 ScanResult scanResult = createScanResult(); in verifyScanResultCopyWithRadioChainInfo() local 115 scanResult.radioChainInfos = new ScanResult.RadioChainInfo[2]; in verifyScanResultCopyWithRadioChainInfo() 116 scanResult.radioChainInfos[0] = new ScanResult.RadioChainInfo(); in verifyScanResultCopyWithRadioChainInfo() 117 scanResult.radioChainInfos[0].id = 0; in verifyScanResultCopyWithRadioChainInfo() 118 scanResult.radioChainInfos[0].level = -45; in verifyScanResultCopyWithRadioChainInfo() 119 scanResult.radioChainInfos[1] = new ScanResult.RadioChainInfo(); in verifyScanResultCopyWithRadioChainInfo() 120 scanResult.radioChainInfos[1].id = 1; in verifyScanResultCopyWithRadioChainInfo() [all …]
|
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/ |
D | ScoredNetworkEvaluator.java | 95 ScanResult scanResult = scanDetails.get(i).getScanResult(); in updateNetworkScoreCache() local 96 NetworkKey networkKey = NetworkKey.createFromScanResult(scanResult); in updateNetworkScoreCache() 139 ScanResult scanResult = scanDetail.getScanResult(); in evaluateNetworks() local 140 if (scanResult == null) continue; in evaluateNetworks() 142 ScanResultUtil.createQuotedSSID(scanResult.SSID))) { in evaluateNetworks() 143 debugLog("Ignoring disabled ephemeral SSID: " + scanResult.SSID); in evaluateNetworks() 156 if (ScanResultUtil.isScanResultForOpenNetwork(scanResult)) { in evaluateNetworks() 176 && TextUtils.equals(currentBssid, scanResult.BSSID); in evaluateNetworks() 179 scanResult, configuredNetwork, isCurrentNetwork); in evaluateNetworks() 182 scanResult, configuredNetwork, isCurrentNetwork); in evaluateNetworks() [all …]
|
D | ScanResultMatchInfo.java | 81 public static @WifiConfiguration.SecurityType int getNetworkType(ScanResult scanResult) { in getNetworkType() argument 82 if (ScanResultUtil.isScanResultForSaeNetwork(scanResult)) { in getNetworkType() 84 } else if (ScanResultUtil.isScanResultForPskNetwork(scanResult)) { in getNetworkType() 86 } else if (ScanResultUtil.isScanResultForEapSuiteBNetwork(scanResult)) { in getNetworkType() 88 } else if (ScanResultUtil.isScanResultForEapNetwork(scanResult)) { in getNetworkType() 90 } else if (ScanResultUtil.isScanResultForWepNetwork(scanResult)) { in getNetworkType() 92 } else if (ScanResultUtil.isScanResultForOweNetwork(scanResult)) { in getNetworkType() 94 } else if (ScanResultUtil.isScanResultForOpenNetwork(scanResult)) { in getNetworkType() 97 throw new IllegalArgumentException("Invalid ScanResult: " + scanResult); in getNetworkType() 104 public static ScanResultMatchInfo fromScanResult(ScanResult scanResult) { in fromScanResult() argument [all …]
|
D | WakeupEvaluator.java | 50 for (ScanResult scanResult : scanResults) { in findViableNetwork() 51 if (isBelowThreshold(scanResult)) { in findViableNetwork() 54 if (networks.contains(ScanResultMatchInfo.fromScanResult(scanResult))) { in findViableNetwork() 55 if (selectedScanResult == null || selectedScanResult.level < scanResult.level) { in findViableNetwork() 56 selectedScanResult = scanResult; in findViableNetwork() 67 public boolean isBelowThreshold(ScanResult scanResult) { in isBelowThreshold() argument 68 return scanResult.level < mScoringParams.getEntryRssi(scanResult.frequency); in isBelowThreshold()
|
D | SavedNetworkEvaluator.java | 112 private int calculateBssidScore(ScanResult scanResult, WifiConfiguration network, in calculateBssidScore() argument 116 boolean is5GHz = scanResult.is5GHz(); in calculateBssidScore() 118 sbuf.append("[ ").append(scanResult.SSID).append(" ").append(scanResult.BSSID) in calculateBssidScore() 119 .append(" RSSI:").append(scanResult.level).append(" ] "); in calculateBssidScore() 121 int rssiSaturationThreshold = mScoringParams.getGoodRssi(scanResult.frequency); in calculateBssidScore() 122 int rssi = Math.min(scanResult.level, rssiSaturationThreshold); in calculateBssidScore() 155 && currentBssid != null && !currentBssid.equals(scanResult.BSSID)) { in calculateBssidScore() 162 if (currentBssid != null && currentBssid.equals(scanResult.BSSID)) { in calculateBssidScore() 196 ScanResult scanResult = scanDetail.getScanResult(); in evaluateNetworks() local 226 && !network.BSSID.equals(scanResult.BSSID)) { in evaluateNetworks() [all …]
|
D | CarrierNetworkEvaluator.java | 99 ScanResult scanResult = scanDetail.getScanResult(); in evaluateNetworks() local 101 if (!ScanResultUtil.isScanResultForEapNetwork(scanResult) in evaluateNetworks() 102 || !mCarrierNetworkConfig.isCarrierNetwork(scanResult.SSID)) { in evaluateNetworks() 105 int eapType = mCarrierNetworkConfig.getNetworkEapType(scanResult.SSID); in evaluateNetworks() 112 ScanResultUtil.createQuotedSSID(scanResult.SSID))) { in evaluateNetworks() 114 + WifiNetworkSelector.toScanId(scanResult)); in evaluateNetworks() 118 WifiConfiguration config = ScanResultUtil.createNetworkFromScanResult(scanResult); in evaluateNetworks() 148 if (!mWifiConfigManager.setNetworkCandidateScanResult(result.getNetworkId(), scanResult, in evaluateNetworks() 166 if (nss.getCandidate() != null && nss.getCandidate().level < scanResult.level) { in evaluateNetworks() 171 if (scanResult.level > currentMaxRssi) { in evaluateNetworks() [all …]
|
D | WifiNetworkSelector.java | 350 public static String toScanId(@Nullable ScanResult scanResult) { in toScanId() argument 351 return scanResult == null ? "NULL" in toScanId() 352 : String.format("%s:%s", scanResult.SSID, scanResult.BSSID); in toScanId() 369 public boolean isSignalTooWeak(ScanResult scanResult) { in isSignalTooWeak() argument 370 return (scanResult.level < mScoringParams.getEntryRssi(scanResult.frequency)); in isSignalTooWeak() 383 ScanResult scanResult = scanDetail.getScanResult(); in filterScanResults() local 385 if (TextUtils.isEmpty(scanResult.SSID)) { in filterScanResults() 386 noValidSsid.append(scanResult.BSSID).append(" / "); in filterScanResults() 391 if (scanResult.BSSID.equals(currentBssid)) { in filterScanResults() 395 final String scanId = toScanId(scanResult); in filterScanResults() [all …]
|
D | WifiNetworkFactory.java | 1068 WifiNetworkSpecifier wns, ScanResult scanResult) { in doesScanResultMatchWifiNetworkSpecifier() argument 1069 if (!wns.ssidPatternMatcher.match(scanResult.SSID)) { in doesScanResultMatchWifiNetworkSpecifier() 1072 MacAddress bssid = MacAddress.fromString(scanResult.BSSID); in doesScanResultMatchWifiNetworkSpecifier() 1079 != ScanResultMatchInfo.getNetworkType(scanResult)) { in doesScanResultMatchWifiNetworkSpecifier() 1096 for (ScanResult scanResult : scanResults) { in getNetworksMatchingActiveNetworkRequest() 1097 if (doesScanResultMatchWifiNetworkSpecifier(wns, scanResult)) { in getNetworksMatchingActiveNetworkRequest() 1098 matchedScanResults.add(scanResult); in getNetworksMatchingActiveNetworkRequest() 1209 .filter(scanResult -> Objects.equals( in findBestBssidFromActiveMatchedScanResultsForNetwork() 1210 ScanResultMatchInfo.fromScanResult(scanResult), in findBestBssidFromActiveMatchedScanResultsForNetwork() 1212 .max(Comparator.comparing(scanResult -> scanResult.level)) in findBestBssidFromActiveMatchedScanResultsForNetwork() [all …]
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/ |
D | WakeupEvaluatorTest.java | 59 ScanResult scanResult = new ScanResult(); in makeScanResult() local 60 scanResult.SSID = ssid; in makeScanResult() 61 scanResult.frequency = frequency; in makeScanResult() 62 scanResult.level = level; in makeScanResult() 63 scanResult.capabilities = "[]"; in makeScanResult() 65 return scanResult; in makeScanResult() 120 ScanResult scanResult = mWakeupEvaluator.findViableNetwork(scanResults, getSavedNetworks()); in findViableNetwork_returnsNullWhenScanResultIsNotInSavedNetworks() local 122 assertNull(scanResult); in findViableNetwork_returnsNullWhenScanResultIsNotInSavedNetworks() 133 ScanResult scanResult = mWakeupEvaluator.findViableNetwork(scanResults, getSavedNetworks()); in findViableNetwork_returnsNullWhenScanResultIsBelowThreshold() local 134 assertNull(scanResult); in findViableNetwork_returnsNullWhenScanResultIsBelowThreshold() [all …]
|
D | ConfigurationMapTest.java | 196 ScanResult scanResult = createScanResultForNetwork(config); in verifyScanResultMatchWithNetwork() local 198 mConfigs.getByScanResultForCurrentUser(scanResult); in verifyScanResultMatchWithNetwork() 288 ScanResult scanResult = createScanResultForNetwork(config); in testScanResultDoesNotMatchWithOtherNetworks() local 293 assertNull(mConfigs.getByScanResultForCurrentUser(scanResult)); in testScanResultDoesNotMatchWithOtherNetworks() 303 ScanResult scanResult = createScanResultForNetwork(config); in testScanResultDoesNotMatchAfterNetworkRemove() local 308 assertNotNull(mConfigs.getByScanResultForCurrentUser(scanResult)); in testScanResultDoesNotMatchAfterNetworkRemove() 311 assertNull(mConfigs.getByScanResultForCurrentUser(scanResult)); in testScanResultDoesNotMatchAfterNetworkRemove() 321 ScanResult scanResult = createScanResultForNetwork(config); in testScanResultDoesNotMatchAfterClear() local 326 assertNotNull(mConfigs.getByScanResultForCurrentUser(scanResult)); in testScanResultDoesNotMatchAfterClear() 329 assertNull(mConfigs.getByScanResultForCurrentUser(scanResult)); in testScanResultDoesNotMatchAfterClear()
|
D | WifiNetworkSelectorTestUtil.java | 101 ScanResult scanResult = scanDetails.get(i).getScanResult(); in checkConsistencyOfScanDetailsAndWifiConfigs() local 104 ScanResultMatchInfo.fromScanResult(scanResult), in checkConsistencyOfScanDetailsAndWifiConfigs() 249 public boolean answer(int netId, ScanResult scanResult, int score) { in prepareConfigStore() 251 configs[netId].getNetworkSelectionStatus().setCandidate(scanResult); in prepareConfigStore() 345 ScanResult scanResult = scanDetail.getScanResult(); in configureScoreCache() local 346 WifiKey wifiKey = new WifiKey("\"" + scanResult.SSID + "\"", scanResult.BSSID); in configureScoreCache() 402 public boolean answer(int netId, ScanResult scanResult, int score) { in setupEphemeralNetwork() 403 config.getNetworkSelectionStatus().setCandidate(scanResult); in setupEphemeralNetwork()
|
D | WakeupControllerTest.java | 159 ScanResult scanResult = new ScanResult(); in createOpenScanResult() local 160 scanResult.SSID = ssid; in createOpenScanResult() 161 scanResult.capabilities = ""; in createOpenScanResult() 162 scanResult.frequency = frequency; in createOpenScanResult() 163 return scanResult; in createOpenScanResult() 167 ScanResult scanResult = new ScanResult(); in createOweScanResult() local 168 scanResult.SSID = ssid; in createOweScanResult() 169 scanResult.capabilities = "OWE"; in createOweScanResult() 170 scanResult.frequency = frequency; in createOweScanResult() 171 return scanResult; in createOweScanResult()
|
/frameworks/base/core/java/android/bluetooth/le/ |
D | PeriodicAdvertisingManager.java | 92 public void registerSync(ScanResult scanResult, int skip, int timeout, in registerSync() argument 94 registerSync(scanResult, skip, timeout, callback, null); in registerSync() 116 public void registerSync(ScanResult scanResult, int skip, int timeout, in registerSync() argument 122 if (scanResult == null) { in registerSync() 126 if (scanResult.getAdvertisingSid() == ScanResult.SID_NOT_PRESENT) { in registerSync() 145 callback.onSyncEstablished(0, scanResult.getDevice(), scanResult.getAdvertisingSid(), in registerSync() 159 gatt.registerSync(scanResult, skip, timeout, wrapped); in registerSync()
|
D | BluetoothLeScanner.java | 475 public void onScanResult(final ScanResult scanResult) { in onScanResult() argument 476 if (VDBG) Log.d(TAG, "onScanResult() - " + scanResult.toString()); in onScanResult() 486 mScanCallback.onScanResult(ScanSettings.CALLBACK_TYPE_ALL_MATCHES, scanResult); in onScanResult() 503 public void onFoundOrLost(final boolean onFound, final ScanResult scanResult) { in onFoundOrLost() argument 505 Log.d(TAG, "onFoundOrLost() - onFound = " + onFound + " " + scanResult.toString()); in onFoundOrLost() 520 scanResult); in onFoundOrLost() 523 scanResult); in onFoundOrLost()
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/util/ |
D | ScanResultUtilTest.java | 91 ScanResult scanResult = new ScanResult(ssid, "ab:cd:01:ef:45:89", 1245, 0, "", in testNetworkCreationFromScanResult() local 95 scanResult.capabilities = ""; in testNetworkCreationFromScanResult() 96 config = ScanResultUtil.createNetworkFromScanResult(scanResult); in testNetworkCreationFromScanResult() 100 scanResult.capabilities = "WEP"; in testNetworkCreationFromScanResult() 101 config = ScanResultUtil.createNetworkFromScanResult(scanResult); in testNetworkCreationFromScanResult() 107 scanResult.capabilities = "PSK"; in testNetworkCreationFromScanResult() 108 config = ScanResultUtil.createNetworkFromScanResult(scanResult); in testNetworkCreationFromScanResult() 112 scanResult.capabilities = "EAP"; in testNetworkCreationFromScanResult() 113 config = ScanResultUtil.createNetworkFromScanResult(scanResult); in testNetworkCreationFromScanResult()
|
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/hotspot2/ |
D | PasspointManager.java | 442 ScanResult scanResult = scanDetail.getScanResult(); in findEapMethodFromNAIRealmMatchedWithCarrier() local 444 InformationElementUtil.getRoamingConsortiumIE(scanResult.informationElements); in findEapMethodFromNAIRealmMatchedWithCarrier() 446 scanResult.informationElements); in findEapMethodFromNAIRealmMatchedWithCarrier() 448 bssid = Utils.parseMac(scanResult.BSSID); in findEapMethodFromNAIRealmMatchedWithCarrier() 450 Log.e(TAG, "Invalid BSSID provided in the scan result: " + scanResult.BSSID); in findEapMethodFromNAIRealmMatchedWithCarrier() 453 ANQPNetworkKey anqpKey = ANQPNetworkKey.buildKey(scanResult.SSID, bssid, in findEapMethodFromNAIRealmMatchedWithCarrier() 454 scanResult.hessid, in findEapMethodFromNAIRealmMatchedWithCarrier() 689 public Pair<PasspointProvider, PasspointMatch> matchProvider(ScanResult scanResult) { in matchProvider() argument 691 scanResult); in matchProvider() 706 Log.d(TAG, String.format("Matched %s to %s as %s", scanResult.SSID, in matchProvider() [all …]
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/wifi/ |
D | WifiUtilsTest.java | 154 ScanResult scanResult = createScanResult(TEST_SSID, "bssid-" + i, i); in buildScanResultCache() local 155 scanResults.add(scanResult); in buildScanResultCache() 161 ScanResult scanResult = new ScanResult(); in createScanResult() local 162 scanResult.SSID = ssid; in createScanResult() 163 scanResult.level = rssi; in createScanResult() 164 scanResult.BSSID = bssid; in createScanResult() 165 scanResult.timestamp = SystemClock.elapsedRealtime() * 1000; in createScanResult() 166 scanResult.capabilities = ""; in createScanResult() 167 return scanResult; in createScanResult()
|
/frameworks/base/wifi/java/android/net/wifi/rtt/ |
D | ResponderConfig.java | 296 public static ResponderConfig fromScanResult(ScanResult scanResult) { in fromScanResult() argument 297 MacAddress macAddress = MacAddress.fromString(scanResult.BSSID); in fromScanResult() 299 boolean supports80211mc = scanResult.is80211mcResponder(); in fromScanResult() 300 int channelWidth = translateScanResultChannelWidth(scanResult.channelWidth); in fromScanResult() 301 int frequency = scanResult.frequency; in fromScanResult() 302 int centerFreq0 = scanResult.centerFreq0; in fromScanResult() 303 int centerFreq1 = scanResult.centerFreq1; in fromScanResult() 306 if (scanResult.informationElements != null && scanResult.informationElements.length != 0) { in fromScanResult() 309 for (ScanResult.InformationElement ie : scanResult.informationElements) { in fromScanResult()
|
/frameworks/base/wifi/tests/src/android/net/wifi/rtt/ |
D | WifiRttManagerTest.java | 168 ScanResult scanResult = new ScanResult(); in testRangingRequestAtLimit() local 169 scanResult.BSSID = "AA:BB:CC:DD:EE:FF"; in testRangingRequestAtLimit() 172 scanResultList.add(scanResult); in testRangingRequestAtLimit() 178 builder.addAccessPoint(scanResult); in testRangingRequestAtLimit() 180 builder.addAccessPoint(scanResult); in testRangingRequestAtLimit() 193 ScanResult scanResult = new ScanResult(); in testRangingRequestPastLimit() local 194 scanResult.BSSID = "00:01:02:03:04:05"; in testRangingRequestPastLimit() 197 scanResultList.add(scanResult); in testRangingRequestPastLimit() 203 builder.addAccessPoint(scanResult); in testRangingRequestPastLimit() 205 builder.addAccessPoint(scanResult); in testRangingRequestPastLimit()
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/hotspot2/ |
D | PasspointManagerTest.java | 347 ScanResult scanResult = new ScanResult(); in createTestScanResult() local 348 scanResult.SSID = TEST_SSID; in createTestScanResult() 349 scanResult.BSSID = TEST_BSSID_STRING; in createTestScanResult() 350 scanResult.hessid = TEST_HESSID; in createTestScanResult() 351 scanResult.anqpDomainId = TEST_ANQP_DOMAIN_ID; in createTestScanResult() 352 scanResult.flags = ScanResult.FLAG_PASSPOINT_NETWORK; in createTestScanResult() 353 return scanResult; in createTestScanResult() 365 ScanResult scanResult = new ScanResult(); in createTestScanResults() local 366 scanResult.SSID = TEST_SSID; in createTestScanResults() 367 scanResult.BSSID = TEST_BSSID_STRING; in createTestScanResults() [all …]
|
/frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/ |
D | AccessPointTest.java | 111 ScanResult scanResult = new ScanResult(); in createScanResult() local 112 scanResult.SSID = ssid; in createScanResult() 113 scanResult.level = rssi; in createScanResult() 114 scanResult.BSSID = bssid; in createScanResult() 115 scanResult.timestamp = SystemClock.elapsedRealtime() * 1000; in createScanResult() 116 scanResult.capabilities = ""; in createScanResult() 117 return scanResult; in createScanResult() 276 ScanResult scanResult = new ScanResult(); 277 scanResult.SSID = ssid; 278 scanResult.level = newRssi; [all …]
|
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/scanner/ |
D | ScanScheduleUtil.java | 160 for (ScanResult scanResult : scanData.getResults()) { in filterResultsForSettings() 161 if (channelHelper.settingsContainChannel(settings, scanResult.frequency)) { in filterResultsForSettings() 162 filteredResults.add(scanResult); in filterResultsForSettings()
|