Home
last modified time | relevance | path

Searched refs:scanResult (Results 1 – 25 of 70) sorted by relevance

123

/frameworks/opt/net/wifi/service/java/com/android/server/wifi/util/
DScanResultUtil.java42 public static ScanDetail toScanDetail(ScanResult scanResult) { in toScanDetail() argument
43 NetworkDetail networkDetail = new NetworkDetail(scanResult.BSSID, in toScanDetail()
44 scanResult.informationElements, scanResult.anqpLines, scanResult.frequency); in toScanDetail()
45 return new ScanDetail(scanResult, networkDetail); in toScanDetail()
52 public static boolean isScanResultForPskNetwork(ScanResult scanResult) { in isScanResultForPskNetwork() argument
53 return scanResult.capabilities.contains("PSK"); in isScanResultForPskNetwork()
60 public static boolean isScanResultForWapiPskNetwork(ScanResult scanResult) { in isScanResultForWapiPskNetwork() argument
61 return scanResult.capabilities.contains("WAPI-PSK"); in isScanResultForWapiPskNetwork()
69 public static boolean isScanResultForWapiCertNetwork(ScanResult scanResult) { in isScanResultForWapiCertNetwork() argument
70 return scanResult.capabilities.contains("WAPI-CERT"); in isScanResultForWapiCertNetwork()
[all …]
/frameworks/base/wifi/tests/src/android/net/wifi/nl80211/
DNativeScanResultTest.java59 NativeScanResult scanResult = new NativeScanResult(); in canSerializeAndDeserialize() local
60 scanResult.ssid = TEST_SSID; in canSerializeAndDeserialize()
61 scanResult.bssid = TEST_BSSID; in canSerializeAndDeserialize()
62 scanResult.infoElement = TEST_INFO_ELEMENT; in canSerializeAndDeserialize()
63 scanResult.frequency = TEST_FREQUENCY; in canSerializeAndDeserialize()
64 scanResult.signalMbm = TEST_SIGNAL_MBM; in canSerializeAndDeserialize()
65 scanResult.tsf = TEST_TSF; in canSerializeAndDeserialize()
66 scanResult.capability = TEST_CAPABILITY; in canSerializeAndDeserialize()
67 scanResult.associated = TEST_ASSOCIATED; in canSerializeAndDeserialize()
68 scanResult.radioChainInfos = new ArrayList<>(Arrays.asList( in canSerializeAndDeserialize()
[all …]
/frameworks/base/core/tests/coretests/src/android/net/
DNetworkKeyTest.java111 ScanResult scanResult = mock(ScanResult.class); in createFromScanResult_nullSsid() local
112 scanResult.BSSID = VALID_BSSID; in createFromScanResult_nullSsid()
114 assertNull(NetworkKey.createFromScanResult(scanResult)); in createFromScanResult_nullSsid()
119 ScanResult scanResult = mock(ScanResult.class); in createFromScanResult_emptySsid() local
120 scanResult.SSID = ""; in createFromScanResult_emptySsid()
121 scanResult.BSSID = VALID_BSSID; in createFromScanResult_emptySsid()
123 assertNull(NetworkKey.createFromScanResult(scanResult)); in createFromScanResult_emptySsid()
128 ScanResult scanResult = mock(ScanResult.class); in createFromScanResult_noneSsid() local
129 scanResult.SSID = WifiManager.UNKNOWN_SSID; in createFromScanResult_noneSsid()
130 scanResult.BSSID = VALID_BSSID; in createFromScanResult_noneSsid()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
DScanTests.java128 final PackageManagerService.ScanResult scanResult = executeScan(scanRequest); in newInstallSimpleAllNominal() local
130 assertBasicPackageScanResult(scanResult, DUMMY_PACKAGE_NAME, false /*isInstant*/); in newInstallSimpleAllNominal()
131 assertThat(scanResult.existingSettingCopied, is(false)); in newInstallSimpleAllNominal()
132 assertPathsNotDerived(scanResult); in newInstallSimpleAllNominal()
146 final PackageManagerService.ScanResult scanResult = executeScan(scanRequest); in newInstallForAllUsers() local
149 assertThat(scanResult.pkgSetting.readUserState(uid).installed, is(true)); in newInstallForAllUsers()
160 final PackageManagerService.ScanResult scanResult = executeScan(scanRequest); in installRealPackageName() local
162 assertThat(scanResult.pkgSetting.realName, is("com.package.real")); in installRealPackageName()
189 final PackageManagerService.ScanResult scanResult = executeScan(scanRequest); in updateSimpleNominal() local
191 assertThat(scanResult.existingSettingCopied, is(true)); in updateSimpleNominal()
[all …]
/frameworks/base/wifi/tests/src/android/net/wifi/
DScanResultTest.java169 ScanResult scanResult = createScanResult(); in verifyScanResultCopyWithoutRadioChainInfo() local
170 ScanResult copyScanResult = new ScanResult(scanResult); in verifyScanResultCopyWithoutRadioChainInfo()
171 assertScanResultEquals(scanResult, copyScanResult); in verifyScanResultCopyWithoutRadioChainInfo()
179 ScanResult scanResult = createScanResult(); in verifyScanResultCopyWithRadioChainInfo() local
180 scanResult.radioChainInfos = new ScanResult.RadioChainInfo[2]; in verifyScanResultCopyWithRadioChainInfo()
181 scanResult.radioChainInfos[0] = new ScanResult.RadioChainInfo(); in verifyScanResultCopyWithRadioChainInfo()
182 scanResult.radioChainInfos[0].id = 0; in verifyScanResultCopyWithRadioChainInfo()
183 scanResult.radioChainInfos[0].level = -45; in verifyScanResultCopyWithRadioChainInfo()
184 scanResult.radioChainInfos[1] = new ScanResult.RadioChainInfo(); in verifyScanResultCopyWithRadioChainInfo()
185 scanResult.radioChainInfos[1].id = 1; in verifyScanResultCopyWithRadioChainInfo()
[all …]
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/
DScoredNetworkNominator.java100 ScanResult scanResult = scanDetails.get(i).getScanResult(); in updateNetworkScoreCache() local
101 NetworkKey networkKey = NetworkKey.createFromScanResult(scanResult); in updateNetworkScoreCache()
155 ScanResult scanResult = scanDetail.getScanResult(); in nominateNetworks() local
156 if (scanResult == null) continue; in nominateNetworks()
158 ScanResultUtil.createQuotedSSID(scanResult.SSID))) { in nominateNetworks()
159 debugLog("Ignoring user disabled SSID: " + scanResult.SSID); in nominateNetworks()
172 if (ScanResultUtil.isScanResultForOpenNetwork(scanResult)) { in nominateNetworks()
192 && TextUtils.equals(currentBssid, scanResult.BSSID); in nominateNetworks()
195 scanResult, configuredNetwork, isCurrentNetwork); in nominateNetworks()
198 scanResult, configuredNetwork, isCurrentNetwork); in nominateNetworks()
[all …]
DScanResultMatchInfo.java90 private static @WifiConfiguration.SecurityType int getNetworkType(ScanResult scanResult) { in getNetworkType() argument
91 if (ScanResultUtil.isScanResultForSaeNetwork(scanResult)) { in getNetworkType()
93 } else if (ScanResultUtil.isScanResultForWapiPskNetwork(scanResult)) { in getNetworkType()
95 } else if (ScanResultUtil.isScanResultForWapiCertNetwork(scanResult)) { in getNetworkType()
97 } else if (ScanResultUtil.isScanResultForPskNetwork(scanResult)) { in getNetworkType()
99 } else if (ScanResultUtil.isScanResultForEapSuiteBNetwork(scanResult)) { in getNetworkType()
101 } else if (ScanResultUtil.isScanResultForEapNetwork(scanResult)) { in getNetworkType()
103 } else if (ScanResultUtil.isScanResultForWepNetwork(scanResult)) { in getNetworkType()
105 } else if (ScanResultUtil.isScanResultForOweNetwork(scanResult)) { in getNetworkType()
107 } else if (ScanResultUtil.isScanResultForOpenNetwork(scanResult)) { in getNetworkType()
[all …]
DWakeupEvaluator.java50 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()
DWifiNetworkSelector.java345 public static String toScanId(@Nullable ScanResult scanResult) { in toScanId() argument
346 return scanResult == null ? "NULL" in toScanId()
347 : String.format("%s:%s", scanResult.SSID, scanResult.BSSID); in toScanId()
364 public boolean isSignalTooWeak(ScanResult scanResult) { in isSignalTooWeak() argument
365 return (scanResult.level < mScoringParams.getEntryRssi(scanResult.frequency)); in isSignalTooWeak()
379 ScanResult scanResult = scanDetail.getScanResult(); in filterScanResults() local
381 if (TextUtils.isEmpty(scanResult.SSID)) { in filterScanResults()
382 noValidSsid.append(scanResult.BSSID).append(" / "); in filterScanResults()
387 if (scanResult.BSSID.equals(currentBssid)) { in filterScanResults()
393 final String scanId = toScanId(scanResult); in filterScanResults()
[all …]
DWifiCandidates.java471 ScanResult scanResult = scanDetail.getScanResult(); in keyFromScanDetailAndConfig()
472 MacAddress bssid = MacAddress.fromString(scanResult.BSSID); in keyFromScanDetailAndConfig()
473 return new Key(ScanResultMatchInfo.fromScanResult(scanResult), bssid, config.networkId); in keyFromScanDetailAndConfig()
526 ScanResult scanResult = scanDetail.getScanResult(); in validConfigAndScanDetail()
527 if (scanResult == null) return failure(); in validConfigAndScanDetail()
530 bssid = MacAddress.fromString(scanResult.BSSID); in validConfigAndScanDetail()
534 ScanResultMatchInfo key1 = ScanResultMatchInfo.fromScanResult(scanResult); in validConfigAndScanDetail()
DWifiNetworkFactory.java1126 WifiNetworkSpecifier wns, ScanResult scanResult) { in doesScanResultMatchWifiNetworkSpecifier() argument
1127 if (!wns.ssidPatternMatcher.match(scanResult.SSID)) { in doesScanResultMatchWifiNetworkSpecifier()
1130 MacAddress bssid = MacAddress.fromString(scanResult.BSSID); in doesScanResultMatchWifiNetworkSpecifier()
1136 ScanResultMatchInfo fromScanResult = ScanResultMatchInfo.fromScanResult(scanResult); in doesScanResultMatchWifiNetworkSpecifier()
1153 for (ScanResult scanResult : scanResults) { in getNetworksMatchingActiveNetworkRequest()
1154 if (doesScanResultMatchWifiNetworkSpecifier(wns, scanResult)) { in getNetworksMatchingActiveNetworkRequest()
1155 matchedScanResults.add(scanResult); in getNetworksMatchingActiveNetworkRequest()
1269 .filter(scanResult -> Objects.equals( in findBestBssidFromActiveMatchedScanResultsForNetwork()
1270 ScanResultMatchInfo.fromScanResult(scanResult), in findBestBssidFromActiveMatchedScanResultsForNetwork()
1272 .max(Comparator.comparing(scanResult -> scanResult.level)) in findBestBssidFromActiveMatchedScanResultsForNetwork()
[all …]
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
DWakeupEvaluatorTest.java59 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 …]
DConfigurationMapTest.java201 ScanResult scanResult = createScanResultForNetwork(config); in verifyScanResultMatchWithNetwork() local
203 mConfigs.getByScanResultForCurrentUser(scanResult); in verifyScanResultMatchWithNetwork()
293 ScanResult scanResult = createScanResultForNetwork(config); in testScanResultDoesNotMatchWithOtherNetworks() local
298 assertNull(mConfigs.getByScanResultForCurrentUser(scanResult)); in testScanResultDoesNotMatchWithOtherNetworks()
308 ScanResult scanResult = createScanResultForNetwork(config); in testScanResultDoesNotMatchAfterNetworkRemove() local
313 assertNotNull(mConfigs.getByScanResultForCurrentUser(scanResult)); in testScanResultDoesNotMatchAfterNetworkRemove()
316 assertNull(mConfigs.getByScanResultForCurrentUser(scanResult)); in testScanResultDoesNotMatchAfterNetworkRemove()
326 ScanResult scanResult = createScanResultForNetwork(config); in testScanResultDoesNotMatchAfterClear() local
331 assertNotNull(mConfigs.getByScanResultForCurrentUser(scanResult)); in testScanResultDoesNotMatchAfterClear()
334 assertNull(mConfigs.getByScanResultForCurrentUser(scanResult)); in testScanResultDoesNotMatchAfterClear()
[all …]
DWifiNetworkSelectorTestUtil.java172 ScanResult scanResult = scanDetails.get(i).getScanResult(); in checkConsistencyOfScanDetailsAndWifiConfigs() local
175 ScanResultMatchInfo.fromScanResult(scanResult), in checkConsistencyOfScanDetailsAndWifiConfigs()
355 public boolean answer(int netId, ScanResult scanResult, int score) { in prepareConfigStore()
357 configs[netId].getNetworkSelectionStatus().setCandidate(scanResult); in prepareConfigStore()
445 ScanResult scanResult = scanDetail.getScanResult(); in configureScoreCache() local
446 WifiKey wifiKey = new WifiKey("\"" + scanResult.SSID + "\"", scanResult.BSSID); in configureScoreCache()
502 public boolean answer(int netId, ScanResult scanResult, int score) { in setupEphemeralNetwork()
503 config.getNetworkSelectionStatus().setCandidate(scanResult); in setupEphemeralNetwork()
DWakeupControllerTest.java169 ScanResult scanResult = new ScanResult(); in createOpenScanResult() local
170 scanResult.SSID = ssid; in createOpenScanResult()
171 scanResult.capabilities = ""; in createOpenScanResult()
172 scanResult.frequency = frequency; in createOpenScanResult()
173 return scanResult; in createOpenScanResult()
177 ScanResult scanResult = new ScanResult(); in createOweScanResult() local
178 scanResult.SSID = ssid; in createOweScanResult()
179 scanResult.capabilities = "OWE"; in createOweScanResult()
180 scanResult.frequency = frequency; in createOweScanResult()
181 return scanResult; in createOweScanResult()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/util/
DScanResultUtilTest.java94 ScanResult scanResult = new ScanResult(ssid, "ab:cd:01:ef:45:89", 1245, 0, "", in testNetworkCreationFromScanResult() local
98 scanResult.capabilities = ""; in testNetworkCreationFromScanResult()
99 config = ScanResultUtil.createNetworkFromScanResult(scanResult); in testNetworkCreationFromScanResult()
103 scanResult.capabilities = "WEP"; in testNetworkCreationFromScanResult()
104 config = ScanResultUtil.createNetworkFromScanResult(scanResult); in testNetworkCreationFromScanResult()
110 scanResult.capabilities = "PSK"; in testNetworkCreationFromScanResult()
111 config = ScanResultUtil.createNetworkFromScanResult(scanResult); in testNetworkCreationFromScanResult()
115 scanResult.capabilities = "EAP"; in testNetworkCreationFromScanResult()
116 config = ScanResultUtil.createNetworkFromScanResult(scanResult); in testNetworkCreationFromScanResult()
121 scanResult.capabilities = "WAPI-PSK"; in testNetworkCreationFromScanResult()
[all …]
/frameworks/base/core/java/android/bluetooth/le/
DPeriodicAdvertisingManager.java92 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()
DBluetoothLeScanner.java481 public void onScanResult(final ScanResult scanResult) { in onScanResult() argument
482 if (VDBG) Log.d(TAG, "onScanResult() - " + scanResult.toString()); in onScanResult()
492 mScanCallback.onScanResult(ScanSettings.CALLBACK_TYPE_ALL_MATCHES, scanResult); in onScanResult()
509 public void onFoundOrLost(final boolean onFound, final ScanResult scanResult) { in onFoundOrLost() argument
511 Log.d(TAG, "onFoundOrLost() - onFound = " + onFound + " " + scanResult.toString()); in onFoundOrLost()
526 scanResult); in onFoundOrLost()
529 scanResult); in onFoundOrLost()
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/wifi/
DWifiUtilsTest.java154 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/opt/net/wifi/service/java/com/android/server/wifi/hotspot2/
DPasspointManager.java720 ScanResult scanResult) { in matchProvider() argument
721 return matchProvider(scanResult, true); in matchProvider()
738 ScanResult scanResult, boolean anqpRequestAllowed) { in matchProvider() argument
740 scanResult, anqpRequestAllowed); in matchProvider()
758 Log.d(TAG, String.format("Matched %s to %s providers as %s", scanResult.SSID, in matchProvider()
764 Log.d(TAG, String.format("Matched %s to %s providers as %s", scanResult.SSID, in matchProvider()
770 Log.d(TAG, "No service provider found for " + scanResult.SSID); in matchProvider()
782 ScanResult scanResult) { in getAllMatchedProviders() argument
783 return getAllMatchedProviders(scanResult, true); in getAllMatchedProviders()
794 ScanResult scanResult, boolean anqpRequestAllowed) { in getAllMatchedProviders() argument
[all …]
/frameworks/base/wifi/java/android/net/wifi/rtt/
DResponderConfig.java303 public static ResponderConfig fromScanResult(ScanResult scanResult) { in fromScanResult() argument
304 MacAddress macAddress = MacAddress.fromString(scanResult.BSSID); in fromScanResult()
306 boolean supports80211mc = scanResult.is80211mcResponder(); in fromScanResult()
307 int channelWidth = translateScanResultChannelWidth(scanResult.channelWidth); in fromScanResult()
308 int frequency = scanResult.frequency; in fromScanResult()
309 int centerFreq0 = scanResult.centerFreq0; in fromScanResult()
310 int centerFreq1 = scanResult.centerFreq1; in fromScanResult()
313 if (scanResult.informationElements != null && scanResult.informationElements.length != 0) { in fromScanResult()
318 for (ScanResult.InformationElement ie : scanResult.informationElements) { in fromScanResult()
/frameworks/base/wifi/tests/src/android/net/wifi/rtt/
DWifiRttManagerTest.java170 ScanResult scanResult = new ScanResult(); in testRangingRequestAtLimit() local
171 scanResult.BSSID = "AA:BB:CC:DD:EE:FF"; in testRangingRequestAtLimit()
174 scanResultList.add(scanResult); in testRangingRequestAtLimit()
180 builder.addAccessPoint(scanResult); in testRangingRequestAtLimit()
182 builder.addAccessPoint(scanResult); in testRangingRequestAtLimit()
195 ScanResult scanResult = new ScanResult(); in testRangingRequestPastLimit() local
196 scanResult.BSSID = "00:01:02:03:04:05"; in testRangingRequestPastLimit()
199 scanResultList.add(scanResult); in testRangingRequestPastLimit()
205 builder.addAccessPoint(scanResult); in testRangingRequestPastLimit()
207 builder.addAccessPoint(scanResult); in testRangingRequestPastLimit()
/frameworks/opt/net/wifi/libs/WifiTrackerLib/src/com/android/wifitrackerlib/
DStandardWifiEntry.java855 .filter(scanResult -> scanResult.frequency >= minFrequency in getScanResultDescription()
856 && scanResult.frequency <= maxFrequency) in getScanResultDescription()
857 .sorted(Comparator.comparingInt(scanResult -> -1 * scanResult.level)) in getScanResultDescription()
870 .mapToInt(scanResult -> scanResult.level).max().getAsInt(); in getScanResultDescription()
874 scanResults.forEach(scanResult -> in getScanResultDescription()
875 description.append(getScanResultDescription(scanResult, nowMs))); in getScanResultDescription()
879 private String getScanResultDescription(ScanResult scanResult, long nowMs) { in getScanResultDescription() argument
882 description.append(scanResult.BSSID); in getScanResultDescription()
883 if (mWifiInfo != null && scanResult.BSSID.equals(mWifiInfo.getBSSID())) { in getScanResultDescription()
886 description.append("=").append(scanResult.frequency); in getScanResultDescription()
[all …]
/frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/
DAccessPointTest.java112 ScanResult scanResult = new ScanResult(); in createScanResult() local
113 scanResult.SSID = ssid; in createScanResult()
114 scanResult.level = rssi; in createScanResult()
115 scanResult.BSSID = bssid; in createScanResult()
116 scanResult.timestamp = SystemClock.elapsedRealtime() * 1000; in createScanResult()
117 scanResult.capabilities = ""; in createScanResult()
118 return scanResult; in createScanResult()
278 ScanResult scanResult = new ScanResult();
279 scanResult.SSID = ssid;
280 scanResult.level = newRssi;
[all …]
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/scanner/
DScanScheduleUtil.java160 for (ScanResult scanResult : scanData.getResults()) { in filterResultsForSettings()
161 if (channelHelper.settingsContainChannel(settings, scanResult.frequency)) { in filterResultsForSettings()
162 filteredResults.add(scanResult); in filterResultsForSettings()

123