/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/scanner/ |
D | ChannelHelperTest.java | 29 import android.net.wifi.WifiScanner; 56 WifiScanner.ScanSettings scanSettings = createRequest(WifiScanner.WIFI_BAND_BOTH, in scanSettings_band() 57 10000, 0, 20, WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN); in scanSettings_band() 66 WifiScanner.ScanSettings scanSettings = createRequest(channelsToSpec(5150, 2400), in scanSettings_channels() 67 10000, 0, 20, WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN); in scanSettings_channels() 76 WifiScanner.ScanSettings scanSettings = createRequest(WifiScanner.WIFI_BAND_5_GHZ, in bucketSettings_band() 77 10000, 0, 20, WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN); in bucketSettings_band() 87 WifiScanner.ScanSettings scanSettings = createRequest(channelsToSpec(2400, 5100), in bucketSettings_channels() 88 10000, 0, 20, WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN); in bucketSettings_channels() 100 WifiScanner.WIFI_BAND_UNSPECIFIED)); in bandToString_ShouldReturnApproapriateString() [all …]
|
D | BackgroundScanSchedulerTest.java | 29 import android.net.wifi.WifiScanner; 30 import android.net.wifi.WifiScanner.ScanSettings; 94 WifiScanner.WIFI_BAND_BOTH, 30000, 0, 20, in singleRequest() 95 WifiScanner.REPORT_EVENT_FULL_SCAN_RESULT in singleRequest() 111 WifiScanner.WIFI_BAND_BOTH, 7500, 0, 20, in singleRequestWithoutPredefinedBucket() 112 WifiScanner.REPORT_EVENT_FULL_SCAN_RESULT in singleRequestWithoutPredefinedBucket() 128 requests.add(createRequest(WifiScanner.WIFI_BAND_BOTH, 30000, 0, 20, in fewRequests() 129 WifiScanner.REPORT_EVENT_FULL_SCAN_RESULT)); in fewRequests() 130 requests.add(createRequest(WifiScanner.WIFI_BAND_5_GHZ_DFS_ONLY, 14000, 0, 20, in fewRequests() 131 WifiScanner.REPORT_EVENT_FULL_SCAN_RESULT)); in fewRequests() [all …]
|
D | WifiScanningServiceTest.java | 59 import android.net.wifi.WifiScanner; 171 private WifiScanner.ScanSettings generateValidScanSettings() { in generateValidScanSettings() 172 return createRequest(WifiScanner.WIFI_BAND_BOTH, 30000, 0, 20, in generateValidScanSettings() 173 WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN); in generateValidScanSettings() 225 WifiScanner.ScanData... expected) { in verifyScanResultsReceived() 227 WifiScanner.CMD_SCAN_RESULT); in verifyScanResultsReceived() 231 private static void assertScanResultsMessage(int listenerId, WifiScanner.ScanData[] expected, in assertScanResultsMessage() 233 assertEquals("what", WifiScanner.CMD_SCAN_RESULT, scanResultMessage.what); in assertScanResultsMessage() 236 ((WifiScanner.ParcelableScanData) scanResultMessage.obj).getResults()); in assertScanResultsMessage() 242 WifiScanner.CMD_SINGLE_SCAN_COMPLETED); in verifySingleScanCompletedReceived() [all …]
|
D | ScanScheduleUtilFilterTest.java | 30 import android.net.wifi.WifiScanner; 31 import android.net.wifi.WifiScanner.ScanData; 32 import android.net.wifi.WifiScanner.ScanSettings; 58 WifiScanner.WIFI_BAND_24_GHZ, 30000, 0, 20, in reportFullResultTrueForBandsWithNoBucketInfo() 59 WifiScanner.REPORT_EVENT_FULL_SCAN_RESULT in reportFullResultTrueForBandsWithNoBucketInfo() 69 WifiScanner.WIFI_BAND_24_GHZ, 30000, 0, 20, in reportFullResultFalseForBandsWithNoBucketInfo() 70 WifiScanner.REPORT_EVENT_FULL_SCAN_RESULT in reportFullResultFalseForBandsWithNoBucketInfo() 81 WifiScanner.REPORT_EVENT_FULL_SCAN_RESULT in reportFullResultTrueForChannelsWithNoBucketInfo() 92 WifiScanner.REPORT_EVENT_FULL_SCAN_RESULT in reportFullResultFalseForChannelsWithNoBucketInfo() 103 WifiScanner.REPORT_EVENT_FULL_SCAN_RESULT in reportFullResultTrueForChannelsWithBucketDefinitlyScanned() [all …]
|
D | KnownBandsChannelHelperTest.java | 30 import android.net.wifi.WifiScanner; 79 WifiScanner.ScanSettings testSettings = createRequest(channelsToSpec(2400, 2450, 5100), in fewChannels() 80 10000, 0, 20, WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN); in fewChannels() 91 WifiScanner.ScanSettings testSettings = createRequest(WifiScanner.WIFI_BAND_24_GHZ, in band() 92 10000, 0, 20, WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN); in band() 120 WifiScanner.ChannelSpec[] channels = in testBand() 134 testBand(CHANNELS_24_GHZ, WifiScanner.WIFI_BAND_24_GHZ); in channels24Ghz() 142 testBand(CHANNELS_5_GHZ, WifiScanner.WIFI_BAND_5_GHZ); in channels5Ghz() 150 testBand(CHANNELS_DFS, WifiScanner.WIFI_BAND_5_GHZ_DFS_ONLY); in channelsDfs() 162 testBand(expectedChannels, WifiScanner.WIFI_BAND_BOTH); in channels24GhzAnd5Ghz() [all …]
|
D | BaseWifiScannerImplTest.java | 29 import android.net.wifi.WifiScanner; 30 import android.net.wifi.WifiScanner.ScanData; 119 .addBucketWithBand(10000 /* ms */, WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN, in singleScanSuccess() 120 WifiScanner.WIFI_BAND_24_GHZ) in singleScanSuccess() 124 expectedBandScanFreqs(WifiScanner.WIFI_BAND_24_GHZ), in singleScanSuccess() 126 ScanResults.create(0, isAllChannelsScanned(WifiScanner.WIFI_BAND_24_GHZ), in singleScanSuccess() 135 .addBucketWithChannels(20000, WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN, 5650) in singleScanSuccessWithChannels() 149 .addBucketWithChannels(20000, WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN, 5650) in singleScanSuccessWithChannelsAndHighAccuracyType() 163 WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN in singleScanSuccessWithFullResults() 164 | WifiScanner.REPORT_EVENT_FULL_SCAN_RESULT, in singleScanSuccessWithFullResults() [all …]
|
D | WificondScannerTest.java | 27 import android.net.wifi.WifiScanner; 82 .addBucketWithBand(10000 /* ms */, WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN, in singleScanNotIssuedIfNoAvailableChannels() 83 WifiScanner.WIFI_BAND_5_GHZ) in singleScanNotIssuedIfNoAvailableChannels() 113 .addBucketWithBand(10000 /* ms */, WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN, in externalScanResultsAfterOurScanDoNotCauseSpuriousTimerCancellationOrCrash() 114 WifiScanner.WIFI_BAND_24_GHZ) in externalScanResultsAfterOurScanDoNotCauseSpuriousTimerCancellationOrCrash() 118 expectedBandScanFreqs(WifiScanner.WIFI_BAND_24_GHZ), in externalScanResultsAfterOurScanDoNotCauseSpuriousTimerCancellationOrCrash() 120 ScanResults.create(0, isAllChannelsScanned(WifiScanner.WIFI_BAND_24_GHZ), in externalScanResultsAfterOurScanDoNotCauseSpuriousTimerCancellationOrCrash() 138 .addBucketWithBand(10000 /* ms */, WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN, in lateScanResultsDoNotCauseSpuriousTimerCancellationOrCrash() 139 WifiScanner.WIFI_BAND_24_GHZ) in lateScanResultsDoNotCauseSpuriousTimerCancellationOrCrash()
|
D | WificondPnoScannerTest.java | 27 import android.net.wifi.WifiScanner; 163 WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN, in createDummyScanSettings() 165 ? WifiScanner.WIFI_BAND_BOTH_WITH_DFS : WifiScanner.WIFI_BAND_24_GHZ) in createDummyScanSettings()
|
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/scanner/ |
D | ChannelHelper.java | 19 import android.net.wifi.WifiScanner; 40 protected static final WifiScanner.ChannelSpec[] NO_CHANNELS = new WifiScanner.ChannelSpec[0]; 50 public abstract boolean settingsContainChannel(WifiScanner.ScanSettings settings, int channel); in settingsContainChannel() 56 public abstract WifiScanner.ChannelSpec[] getAvailableScanChannels(int band); in getAvailableScanChannels() 61 public abstract int estimateScanDuration(WifiScanner.ScanSettings settings); in estimateScanDuration() 127 public void addChannels(WifiScanner.ScanSettings scanSettings) { in addChannels() 128 if (scanSettings.band == WifiScanner.WIFI_BAND_UNSPECIFIED) { in addChannels() 141 if (bucketSettings.band == WifiScanner.WIFI_BAND_UNSPECIFIED) { in addChannels() 153 public boolean containsSettings(WifiScanner.ScanSettings scanSettings) { in containsSettings() 154 if (scanSettings.band == WifiScanner.WIFI_BAND_UNSPECIFIED) { in containsSettings() [all …]
|
D | KnownBandsChannelHelper.java | 19 import android.net.wifi.WifiScanner; 32 private WifiScanner.ChannelSpec[][] mBandsToChannels; 35 mBandsToChannels = new WifiScanner.ChannelSpec[8][]; in setBandChannels() 39 mBandsToChannels[1] = new WifiScanner.ChannelSpec[channels2G.length]; in setBandChannels() 42 mBandsToChannels[2] = new WifiScanner.ChannelSpec[channels5G.length]; in setBandChannels() 45 mBandsToChannels[3] = new WifiScanner.ChannelSpec[channels2G.length + channels5G.length]; in setBandChannels() 49 mBandsToChannels[4] = new WifiScanner.ChannelSpec[channelsDfs.length]; in setBandChannels() 52 mBandsToChannels[5] = new WifiScanner.ChannelSpec[channels2G.length + channelsDfs.length]; in setBandChannels() 56 mBandsToChannels[6] = new WifiScanner.ChannelSpec[channels5G.length + channelsDfs.length]; in setBandChannels() 60 mBandsToChannels[7] = new WifiScanner.ChannelSpec[ in setBandChannels() [all …]
|
D | WifiScanningServiceImpl.java | 31 import android.net.wifi.WifiScanner; 32 import android.net.wifi.WifiScanner.ChannelSpec; 33 import android.net.wifi.WifiScanner.PnoSettings; 34 import android.net.wifi.WifiScanner.ScanData; 35 import android.net.wifi.WifiScanner.ScanSettings; 121 b.putIntegerArrayList(WifiScanner.GET_AVAILABLE_CHANNELS_EXTRA, list); in getAvailableChannels() 191 replyFailed(msg, WifiScanner.REASON_NOT_AUTHORIZED, "Not authorized"); in handleMessage() 199 if (msg.what == WifiScanner.CMD_GET_SCAN_RESULTS) { in handleMessage() 203 if (msg.what == WifiScanner.CMD_GET_SINGLE_SCAN_RESULTS) { in handleMessage() 211 replyFailed(msg, WifiScanner.REASON_INVALID_LISTENER, "Could not find listener"); in handleMessage() [all …]
|
D | WificondChannelHelper.java | 19 import android.net.wifi.WifiScanner; 43 mWifiNative.getChannelsForBand(WifiScanner.WIFI_BAND_24_GHZ); in updateChannels() 45 int[] channels5G = mWifiNative.getChannelsForBand(WifiScanner.WIFI_BAND_5_GHZ); in updateChannels() 48 mWifiNative.getChannelsForBand(WifiScanner.WIFI_BAND_5_GHZ_DFS_ONLY); in updateChannels()
|
D | BackgroundScanScheduler.java | 22 import android.net.wifi.WifiScanner; 23 import android.net.wifi.WifiScanner.ScanData; 24 import android.net.wifi.WifiScanner.ScanSettings; 198 int reportEvents = WifiScanner.REPORT_EVENT_NO_BATCH; in createBucketSettings() 204 WifiScanner.ScanSettings setting = mScanSettingsList.get(i); in createBucketSettings() 206 if ((requestedReportEvents & WifiScanner.REPORT_EVENT_NO_BATCH) == 0) { in createBucketSettings() 207 reportEvents &= ~WifiScanner.REPORT_EVENT_NO_BATCH; in createBucketSettings() 209 if ((requestedReportEvents & WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN) != 0) { in createBucketSettings() 210 reportEvents |= WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN; in createBucketSettings() 212 if ((requestedReportEvents & WifiScanner.REPORT_EVENT_FULL_SCAN_RESULT) != 0) { in createBucketSettings() [all …]
|
D | WificondScannerImpl.java | 22 import android.net.wifi.WifiScanner; 76 private WifiScanner.ScanData mLatestSingleScanResult = 77 new WifiScanner.ScanData(0, 0, new ScanResult[0]); 171 & WifiScanner.REPORT_EVENT_FULL_SCAN_RESULT) != 0) { in startSingleScan() 231 public WifiScanner.ScanData getLatestSingleScanResults() { in getLatestSingleScanResults() 357 return (channelCollection.containsBand(WifiScanner.WIFI_BAND_24_GHZ) in isAllChannelsScanned() 358 && channelCollection.containsBand(WifiScanner.WIFI_BAND_5_GHZ)); in isAllChannelsScanned() 396 mLatestSingleScanResult = new WifiScanner.ScanData(0, 0, 0, in pollLatestScanData() 409 public WifiScanner.ScanData[] getLatestBatchedScanResults(boolean flush) { in getLatestBatchedScanResults()
|
D | WifiScannerImpl.java | 21 import android.net.wifi.WifiScanner; 111 public abstract WifiScanner.ScanData getLatestSingleScanResults(); in getLatestSingleScanResults() 141 public abstract WifiScanner.ScanData[] getLatestBatchedScanResults(boolean flush); in getLatestBatchedScanResults()
|
D | HalWifiScannerImpl.java | 20 import android.net.wifi.WifiScanner; 85 public WifiScanner.ScanData getLatestSingleScanResults() { in getLatestSingleScanResults() 117 public WifiScanner.ScanData[] getLatestBatchedScanResults(boolean flush) { in getLatestBatchedScanResults()
|
/frameworks/base/wifi/tests/src/android/net/wifi/ |
D | WifiScannerTest.java | 29 import android.net.wifi.WifiScanner.ScanSettings; 50 private WifiScanner mWifiScanner; 65 mWifiScanner = new WifiScanner(mContext, mService, mLooper.getLooper()); in setUp() 83 writeSettings.type = WifiScanner.TYPE_LOW_POWER; in verifyScanSettingsParcelWithBand() 84 writeSettings.band = WifiScanner.WIFI_BAND_BOTH_WITH_DFS; in verifyScanSettingsParcelWithBand() 98 writeSettings.type = WifiScanner.TYPE_HIGH_ACCURACY; in verifyScanSettingsParcelWithChannels() 99 writeSettings.band = WifiScanner.WIFI_BAND_UNSPECIFIED; in verifyScanSettingsParcelWithChannels() 100 writeSettings.channels = new WifiScanner.ChannelSpec[] { in verifyScanSettingsParcelWithChannels() 101 new WifiScanner.ChannelSpec(5), in verifyScanSettingsParcelWithChannels() 102 new WifiScanner.ChannelSpec(7) in verifyScanSettingsParcelWithChannels()
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/ |
D | ScanTestUtil.java | 24 import android.net.wifi.WifiScanner; 25 import android.net.wifi.WifiScanner.ScanData; 43 when(wifiNative.getChannelsForBand(WifiScanner.WIFI_BAND_24_GHZ)) in setupMockChannels() 45 when(wifiNative.getChannelsForBand(WifiScanner.WIFI_BAND_5_GHZ)) in setupMockChannels() 47 when(wifiNative.getChannelsForBand(WifiScanner.WIFI_BAND_5_GHZ_DFS_ONLY)) in setupMockChannels() 51 public static WifiScanner.ScanSettings createRequest(WifiScanner.ChannelSpec[] channels, in createRequest() 53 WifiScanner.ScanSettings request = new WifiScanner.ScanSettings(); in createRequest() 54 request.band = WifiScanner.WIFI_BAND_UNSPECIFIED; in createRequest() 63 public static WifiScanner.ScanSettings createRequest(int type, int band, int period, int batch, in createRequest() 65 return createRequest(WifiScanner.TYPE_HIGH_ACCURACY, band, period, 0, 0, in createRequest() [all …]
|
D | WakeupControllerTest.java | 33 import android.net.wifi.WifiScanner; 69 @Mock private WifiScanner mWifiScanner; 80 private WifiScanner.ScanData[] mTestScanDatas; 92 when(mWifiNative.getChannelsForBand(WifiScanner.WIFI_BAND_5_GHZ_DFS_ONLY)) in setUp() 106 mTestScanDatas = new WifiScanner.ScanData[1]; in setUp() 107 mTestScanDatas[0] = new WifiScanner.ScanData(0 /* id */, 0 /* flags */, in setUp() 387 ArgumentCaptor<WifiScanner.ScanListener> scanListenerArgumentCaptor = in onResultsUpdatesWakeupLock() 388 ArgumentCaptor.forClass(WifiScanner.ScanListener.class); in onResultsUpdatesWakeupLock() 391 WifiScanner.ScanListener scanListener = scanListenerArgumentCaptor.getValue(); in onResultsUpdatesWakeupLock() 412 ArgumentCaptor<WifiScanner.ScanListener> scanListenerArgumentCaptor = in onResultsUpdatesWakeupLockWithOnlySavedNetworks() [all …]
|
D | ScanRequestProxyTest.java | 33 import android.net.wifi.WifiScanner; 59 private static final List<WifiScanner.ScanSettings.HiddenNetwork> TEST_HIDDEN_NETWORKS_LIST = 60 new ArrayList<WifiScanner.ScanSettings.HiddenNetwork>() {{ 61 add(new WifiScanner.ScanSettings.HiddenNetwork("test_ssid_1")); 62 add(new WifiScanner.ScanSettings.HiddenNetwork("test_ssid_2")); 71 @Mock private WifiScanner mWifiScanner; 77 private ArgumentCaptor<WifiScanner.ScanSettings> mScanSettingsArgumentCaptor = 78 ArgumentCaptor.forClass(WifiScanner.ScanSettings.class); 79 private ArgumentCaptor<WifiScanner.ScanListener> mScanListenerArgumentCaptor = 80 ArgumentCaptor.forClass(WifiScanner.ScanListener.class); [all …]
|
D | WifiConfigurationUtilTest.java | 25 import android.net.wifi.WifiScanner; 500 WifiScanner.PnoSettings.PnoNetwork pnoNetwork = in testCreatePnoNetworkWithOpenNetwork() 504 WifiScanner.PnoSettings.PnoNetwork.FLAG_A_BAND in testCreatePnoNetworkWithOpenNetwork() 505 | WifiScanner.PnoSettings.PnoNetwork.FLAG_G_BAND, pnoNetwork.flags); in testCreatePnoNetworkWithOpenNetwork() 506 assertEquals(WifiScanner.PnoSettings.PnoNetwork.AUTH_CODE_OPEN, pnoNetwork.authBitField); in testCreatePnoNetworkWithOpenNetwork() 517 WifiScanner.PnoSettings.PnoNetwork pnoNetwork = in testCreatePnoNetworkWithOpenHiddenNetwork() 521 WifiScanner.PnoSettings.PnoNetwork.FLAG_A_BAND in testCreatePnoNetworkWithOpenHiddenNetwork() 522 | WifiScanner.PnoSettings.PnoNetwork.FLAG_G_BAND in testCreatePnoNetworkWithOpenHiddenNetwork() 523 | WifiScanner.PnoSettings.PnoNetwork.FLAG_DIRECTED_SCAN, pnoNetwork.flags); in testCreatePnoNetworkWithOpenHiddenNetwork() 524 assertEquals(WifiScanner.PnoSettings.PnoNetwork.AUTH_CODE_OPEN, pnoNetwork.authBitField); in testCreatePnoNetworkWithOpenHiddenNetwork() [all …]
|
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/ |
D | ScanRequestProxy.java | 26 import android.net.wifi.WifiScanner; 84 private WifiScanner mWifiScanner; 102 private class ScanRequestProxyScanListener implements WifiScanner.ScanListener { 118 public void onResults(WifiScanner.ScanData[] scanDatas) { in onResults() 128 WifiScanner.ScanData scanData = scanDatas[0]; in onResults() 375 WifiScanner.ScanSettings settings = new WifiScanner.ScanSettings(); in startScan() 378 settings.type = WifiScanner.TYPE_HIGH_ACCURACY; in startScan() 381 settings.band = WifiScanner.WIFI_BAND_BOTH_WITH_DFS; in startScan() 382 settings.reportEvents = WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN in startScan() 383 | WifiScanner.REPORT_EVENT_FULL_SCAN_RESULT; in startScan() [all …]
|
D | WifiConfigurationUtil.java | 24 import android.net.wifi.WifiScanner; 531 public static WifiScanner.PnoSettings.PnoNetwork createPnoNetwork( in createPnoNetwork() 533 WifiScanner.PnoSettings.PnoNetwork pnoNetwork = in createPnoNetwork() 534 new WifiScanner.PnoSettings.PnoNetwork(config.SSID); in createPnoNetwork() 536 pnoNetwork.flags |= WifiScanner.PnoSettings.PnoNetwork.FLAG_DIRECTED_SCAN; in createPnoNetwork() 538 pnoNetwork.flags |= WifiScanner.PnoSettings.PnoNetwork.FLAG_A_BAND; in createPnoNetwork() 539 pnoNetwork.flags |= WifiScanner.PnoSettings.PnoNetwork.FLAG_G_BAND; in createPnoNetwork() 541 pnoNetwork.authBitField |= WifiScanner.PnoSettings.PnoNetwork.AUTH_CODE_PSK; in createPnoNetwork() 544 pnoNetwork.authBitField |= WifiScanner.PnoSettings.PnoNetwork.AUTH_CODE_EAPOL; in createPnoNetwork() 546 pnoNetwork.authBitField |= WifiScanner.PnoSettings.PnoNetwork.AUTH_CODE_OPEN; in createPnoNetwork()
|
D | WifiConnectivityManager.java | 30 import android.net.wifi.WifiScanner; 31 import android.net.wifi.WifiScanner.PnoSettings; 32 import android.net.wifi.WifiScanner.ScanSettings; 134 private final WifiScanner mScanner; 298 private class AllSingleScanListener implements WifiScanner.ScanListener { 322 public void onResults(WifiScanner.ScanData[] results) { in onResults() 397 private class SingleScanListener implements WifiScanner.ScanListener { 430 public void onResults(WifiScanner.ScanData[] results) { in onResults() 440 private class PnoScanListener implements WifiScanner.PnoScanListener { 489 public void onResults(WifiScanner.ScanData[] results) { in onResults() [all …]
|
D | WakeupController.java | 25 import android.net.wifi.WifiScanner; 66 private final WifiScanner.ScanListener mScanListener = new WifiScanner.ScanListener() { 73 public void onResults(WifiScanner.ScanData[] results) { 228 .getChannelsForBand(WifiScanner.WIFI_BAND_5_GHZ_DFS_ONLY); in filterDfsScanResults()
|