Lines Matching refs:channels

51     public static WifiScanner.ScanSettings createRequest(WifiScanner.ChannelSpec[] channels,
55 request.channels = channels;
83 request.channels = null;
151 int period, int reportEvents, WifiScanner.ChannelSpec... channels) {
152 int[] channelFreqs = new int[channels.length];
153 for (int i = 0; i < channels.length; ++i) {
154 channelFreqs[i] = channels[i].frequency;
160 int period, int reportEvents, int... channels) {
164 bucket.num_channels = channels.length;
165 bucket.channels = channelsToNativeSettings(channels);
212 builder.addBucketWithChannels(0, reportEvents, requestSettings.channels);
221 * Compute the expected native scan settings that are expected for the given channels.
224 int reportEvents, WifiScanner.ChannelSpec... channels) {
226 WifiNative.SCAN_TYPE_LOW_LATENCY, reportEvents, channels);
230 * Compute the expected native scan settings that are expected for the given channels & type.
233 int nativeScanType, int reportEvents, WifiScanner.ChannelSpec... channels) {
240 .addBucketWithChannels(0, actualReportEvents, channels)
322 assertEquals(prefix + "all channels", expected.isAllChannelsScanned(),
344 public static WifiScanner.ChannelSpec[] channelsToSpec(int... channels) {
345 WifiScanner.ChannelSpec[] channelSpecs = new WifiScanner.ChannelSpec[channels.length];
346 for (int i = 0; i < channels.length; ++i) {
347 channelSpecs[i] = new WifiScanner.ChannelSpec(channels[i]);
375 for (WifiNative.ChannelSettings channel : expected.buckets[i].channels) {
379 for (WifiNative.ChannelSettings channel : actual.buckets[i].channels) {
382 assertEquals("channels", expectedChannels, actualChannels);
384 // since num_channels and channels are ignored when band is not
385 // WifiScanner.WIFI_BAND_UNSPECIFIED just assert that there are no channels
389 assertTrue("buckets[" + i + "].channels not null or empty",
390 actual.buckets[i].channels == null
391 || actual.buckets[i].channels.length == 0);
428 public static WifiNative.ChannelSettings[] channelsToNativeSettings(int... channels) {
429 WifiNative.ChannelSettings[] channelSpecs = new WifiNative.ChannelSettings[channels.length];
430 for (int i = 0; i < channels.length; ++i) {
432 channelSpecs[i].frequency = channels[i];
463 * Matcher to check that a BucketSettings has exactly the given channels
480 } else if (bucketSettings.channels == null) {
481 mismatchDescription.appendText("had null channels array");
483 } else if (bucketSettings.channels.length != expectedChannels.length) {
485 .appendText("did not have channels array length matching excepted ")
487 .appendText(", was ").appendValue(bucketSettings.channels.length);
491 for (int i = 0; i < bucketSettings.channels.length; ++i) {
492 foundChannelsSet.add(bucketSettings.channels[i].frequency);
505 .appendText("does not contain expected channels ")
509 .appendText(", but contains extra channels ")
521 description.appendText("bucket channels are ").appendValue(expectedChannels);