diff options
author | Ningyuan Wang <nywang@google.com> | 2017-05-24 17:49:03 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-05-24 17:49:03 +0000 |
commit | dd798b8777d21082ae75d6ea388c343a2572d8fc (patch) | |
tree | 78ea779c19f8453365b5c77df8810c3b20054511 | |
parent | 1244b39da5cdf42266ab7da3848007f8e781e923 (diff) | |
parent | 9dc9a8750ecd1ab25c5b4c7d17c8930ca2ffb6c3 (diff) |
Rename ChannelHelper.getSupplicantScanFreqs()
am: 9dc9a8750e
Change-Id: I37d859c695b1eae7cade6420b7d90a2c01dd29f8
8 files changed, 29 insertions, 29 deletions
diff --git a/service/java/com/android/server/wifi/scanner/ChannelHelper.java b/service/java/com/android/server/wifi/scanner/ChannelHelper.java index acb0ac820..d87df072f 100644 --- a/service/java/com/android/server/wifi/scanner/ChannelHelper.java +++ b/service/java/com/android/server/wifi/scanner/ChannelHelper.java @@ -222,10 +222,10 @@ public abstract class ChannelHelper { public abstract void fillBucketSettings(WifiNative.BucketSettings bucket, int maxChannels); /** - * Gets the list of channels that should be supplied to supplicant for a scan. Will either - * be a collection of all channels or null if all channels should be scanned. + * Gets the list of channels scan. Will either be a collection of all channels or null + * if all channels should be scanned. */ - public abstract Set<Integer> getSupplicantScanFreqs(); + public abstract Set<Integer> getScanFreqs(); } diff --git a/service/java/com/android/server/wifi/scanner/KnownBandsChannelHelper.java b/service/java/com/android/server/wifi/scanner/KnownBandsChannelHelper.java index acddc26c6..33cce1c08 100644 --- a/service/java/com/android/server/wifi/scanner/KnownBandsChannelHelper.java +++ b/service/java/com/android/server/wifi/scanner/KnownBandsChannelHelper.java @@ -263,7 +263,7 @@ public class KnownBandsChannelHelper extends ChannelHelper { } @Override - public Set<Integer> getSupplicantScanFreqs() { + public Set<Integer> getScanFreqs() { if (mExactBands == WifiScanner.WIFI_BAND_BOTH_WITH_DFS) { return null; } else { diff --git a/service/java/com/android/server/wifi/scanner/NoBandChannelHelper.java b/service/java/com/android/server/wifi/scanner/NoBandChannelHelper.java index 4f8373b30..b2eeada71 100644 --- a/service/java/com/android/server/wifi/scanner/NoBandChannelHelper.java +++ b/service/java/com/android/server/wifi/scanner/NoBandChannelHelper.java @@ -100,7 +100,7 @@ public class NoBandChannelHelper extends ChannelHelper { @Override public boolean partiallyContainsBand(int band) { - // We don't need to partially collapse settings in supplicant scanner because we + // We don't need to partially collapse settings in wificond scanner because we // don't have any limitation on the number of channels that can be scanned. We also // don't currently keep track of bands very well in NoBandChannelHelper. return false; @@ -124,7 +124,7 @@ public class NoBandChannelHelper extends ChannelHelper { @Override public Set<Integer> getMissingChannelsFromBand(int band) { - // We don't need to partially collapse settings in supplicant scanner because we + // We don't need to partially collapse settings in wificond scanner because we // don't have any limitation on the number of channels that can be scanned. We also // don't currently keep track of bands very well in NoBandChannelHelper. return new ArraySet<Integer>(); @@ -132,7 +132,7 @@ public class NoBandChannelHelper extends ChannelHelper { @Override public Set<Integer> getContainingChannelsFromBand(int band) { - // We don't need to partially collapse settings in supplicant scanner because we + // We don't need to partially collapse settings in wificond scanner because we // don't have any limitation on the number of channels that can be scanned. We also // don't currently keep track of bands very well in NoBandChannelHelper. return new ArraySet<Integer>(); @@ -166,7 +166,7 @@ public class NoBandChannelHelper extends ChannelHelper { } @Override - public Set<Integer> getSupplicantScanFreqs() { + public Set<Integer> getScanFreqs() { if (mAllChannels) { return null; } else { diff --git a/service/java/com/android/server/wifi/scanner/WificondScannerImpl.java b/service/java/com/android/server/wifi/scanner/WificondScannerImpl.java index 590542b41..b088cc01d 100644 --- a/service/java/com/android/server/wifi/scanner/WificondScannerImpl.java +++ b/service/java/com/android/server/wifi/scanner/WificondScannerImpl.java @@ -148,7 +148,7 @@ public class WificondScannerImpl extends WifiScannerImpl implements Handler.Call public WificondScannerImpl(Context context, WifiNative wifiNative, WifiMonitor wifiMonitor, Looper looper, Clock clock) { - // TODO figure out how to get channel information from supplicant + // TODO get channel information from wificond. this(context, wifiNative, wifiMonitor, new NoBandChannelHelper(), looper, clock); } @@ -422,7 +422,7 @@ public class WificondScannerImpl extends WifiScannerImpl implements Handler.Call if ((newScanSettings.backgroundScanActive || newScanSettings.singleScanActive) && !allFreqs.isEmpty()) { pauseHwPnoScan(); - Set<Integer> freqs = allFreqs.getSupplicantScanFreqs(); + Set<Integer> freqs = allFreqs.getScanFreqs(); boolean success = mWifiNative.scan(freqs, hiddenNetworkSSIDSet); if (success) { // TODO handle scan timeout diff --git a/tests/wifitests/src/com/android/server/wifi/scanner/BaseWifiScannerImplTest.java b/tests/wifitests/src/com/android/server/wifi/scanner/BaseWifiScannerImplTest.java index 8b92ca1c1..60e525657 100644 --- a/tests/wifitests/src/com/android/server/wifi/scanner/BaseWifiScannerImplTest.java +++ b/tests/wifitests/src/com/android/server/wifi/scanner/BaseWifiScannerImplTest.java @@ -98,7 +98,7 @@ public abstract class BaseWifiScannerImplTest { protected Set<Integer> expectedBandScanFreqs(int band) { ChannelCollection collection = mScanner.getChannelHelper().createChannelCollection(); collection.addBand(band); - return collection.getSupplicantScanFreqs(); + return collection.getScanFreqs(); } protected Set<Integer> expectedBandAndChannelScanFreqs(int band, int... channels) { @@ -107,7 +107,7 @@ public abstract class BaseWifiScannerImplTest { for (int channel : channels) { collection.addChannel(channel); } - return collection.getSupplicantScanFreqs(); + return collection.getScanFreqs(); } @Test diff --git a/tests/wifitests/src/com/android/server/wifi/scanner/KnownBandsChannelHelperTest.java b/tests/wifitests/src/com/android/server/wifi/scanner/KnownBandsChannelHelperTest.java index 3e482a9fe..de3f7ff45 100644 --- a/tests/wifitests/src/com/android/server/wifi/scanner/KnownBandsChannelHelperTest.java +++ b/tests/wifitests/src/com/android/server/wifi/scanner/KnownBandsChannelHelperTest.java @@ -285,7 +285,7 @@ public class KnownBandsChannelHelperTest { assertThat(bucketSettings, channelsAre()); assertEquals(Collections.<Integer>emptySet(), - mChannelCollection.getSupplicantScanFreqs()); + mChannelCollection.getScanFreqs()); assertTrue(mChannelCollection.isEmpty()); assertFalse(mChannelCollection.containsChannel(2400)); @@ -306,7 +306,7 @@ public class KnownBandsChannelHelperTest { assertThat(bucketSettings, channelsAre()); assertEquals(Collections.<Integer>emptySet(), - mChannelCollection.getSupplicantScanFreqs()); + mChannelCollection.getScanFreqs()); assertTrue(mChannelCollection.isEmpty()); assertFalse(mChannelCollection.containsChannel(2400)); @@ -326,7 +326,7 @@ public class KnownBandsChannelHelperTest { assertThat(bucketSettings, bandIs(WifiScanner.WIFI_BAND_24_GHZ)); assertEquals(new HashSet<Integer>(Arrays.asList(2400, 2450)), - mChannelCollection.getSupplicantScanFreqs()); + mChannelCollection.getScanFreqs()); assertFalse(mChannelCollection.isEmpty()); assertTrue(mChannelCollection.containsChannel(2400)); @@ -346,7 +346,7 @@ public class KnownBandsChannelHelperTest { assertThat(bucketSettings, channelsAre(2400)); assertEquals(new HashSet<Integer>(Arrays.asList(2400)), - mChannelCollection.getSupplicantScanFreqs()); + mChannelCollection.getScanFreqs()); assertFalse(mChannelCollection.isEmpty()); assertTrue(mChannelCollection.containsChannel(2400)); @@ -367,7 +367,7 @@ public class KnownBandsChannelHelperTest { assertThat(bucketSettings, channelsAre(2400, 2450)); assertEquals(new HashSet<Integer>(Arrays.asList(2400, 2450)), - mChannelCollection.getSupplicantScanFreqs()); + mChannelCollection.getScanFreqs()); assertFalse(mChannelCollection.isEmpty()); assertTrue(mChannelCollection.containsChannel(2400)); @@ -388,7 +388,7 @@ public class KnownBandsChannelHelperTest { assertThat(bucketSettings, bandIs(WifiScanner.WIFI_BAND_24_GHZ)); assertEquals(new HashSet<Integer>(Arrays.asList(2400, 2450)), - mChannelCollection.getSupplicantScanFreqs()); + mChannelCollection.getScanFreqs()); assertFalse(mChannelCollection.isEmpty()); assertTrue(mChannelCollection.containsChannel(2400)); @@ -409,7 +409,7 @@ public class KnownBandsChannelHelperTest { assertThat(bucketSettings, channelsAre(2400, 2450, 5150)); assertEquals(new HashSet<Integer>(Arrays.asList(2400, 2450, 5150)), - mChannelCollection.getSupplicantScanFreqs()); + mChannelCollection.getScanFreqs()); assertFalse(mChannelCollection.isEmpty()); assertTrue(mChannelCollection.containsChannel(2400)); @@ -429,7 +429,7 @@ public class KnownBandsChannelHelperTest { mChannelCollection.fillBucketSettings(bucketSettings, Integer.MAX_VALUE); assertThat(bucketSettings, bandIs(WifiScanner.WIFI_BAND_BOTH_WITH_DFS)); - assertNull(mChannelCollection.getSupplicantScanFreqs()); + assertNull(mChannelCollection.getScanFreqs()); assertFalse(mChannelCollection.isEmpty()); assertTrue(mChannelCollection.containsChannel(2400)); diff --git a/tests/wifitests/src/com/android/server/wifi/scanner/NoBandChannelHelperTest.java b/tests/wifitests/src/com/android/server/wifi/scanner/NoBandChannelHelperTest.java index 2863b9f90..145b2143c 100644 --- a/tests/wifitests/src/com/android/server/wifi/scanner/NoBandChannelHelperTest.java +++ b/tests/wifitests/src/com/android/server/wifi/scanner/NoBandChannelHelperTest.java @@ -221,7 +221,7 @@ public class NoBandChannelHelperTest { assertThat(bucketSettings, channelsAre()); assertEquals(Collections.<Integer>emptySet(), - mChannelCollection.getSupplicantScanFreqs()); + mChannelCollection.getScanFreqs()); assertTrue(mChannelCollection.isEmpty()); assertFalse(mChannelCollection.containsChannel(2400)); @@ -241,7 +241,7 @@ public class NoBandChannelHelperTest { assertThat(bucketSettings, channelsAre()); assertEquals(Collections.<Integer>emptySet(), - mChannelCollection.getSupplicantScanFreqs()); + mChannelCollection.getScanFreqs()); assertTrue(mChannelCollection.isEmpty()); assertFalse(mChannelCollection.containsChannel(2400)); @@ -259,7 +259,7 @@ public class NoBandChannelHelperTest { mChannelCollection.fillBucketSettings(bucketSettings, Integer.MAX_VALUE); assertThat(bucketSettings, bandIs(ALL_BANDS)); - assertNull(mChannelCollection.getSupplicantScanFreqs()); + assertNull(mChannelCollection.getScanFreqs()); assertFalse(mChannelCollection.isEmpty()); assertTrue(mChannelCollection.containsChannel(2400)); @@ -279,7 +279,7 @@ public class NoBandChannelHelperTest { assertThat(bucketSettings, channelsAre(2400)); assertEquals(new HashSet<Integer>(Arrays.asList(2400)), - mChannelCollection.getSupplicantScanFreqs()); + mChannelCollection.getScanFreqs()); assertFalse(mChannelCollection.isEmpty()); assertTrue(mChannelCollection.containsChannel(2400)); @@ -300,7 +300,7 @@ public class NoBandChannelHelperTest { assertThat(bucketSettings, channelsAre(2400, 2450)); assertEquals(new HashSet<Integer>(Arrays.asList(2400, 2450)), - mChannelCollection.getSupplicantScanFreqs()); + mChannelCollection.getScanFreqs()); assertFalse(mChannelCollection.isEmpty()); assertTrue(mChannelCollection.containsChannel(2400)); @@ -320,7 +320,7 @@ public class NoBandChannelHelperTest { mChannelCollection.fillBucketSettings(bucketSettings, Integer.MAX_VALUE); assertThat(bucketSettings, bandIs(ALL_BANDS)); - assertNull(mChannelCollection.getSupplicantScanFreqs()); + assertNull(mChannelCollection.getScanFreqs()); assertFalse(mChannelCollection.isEmpty()); assertTrue(mChannelCollection.containsChannel(2400)); @@ -340,7 +340,7 @@ public class NoBandChannelHelperTest { mChannelCollection.fillBucketSettings(bucketSettings, Integer.MAX_VALUE); assertThat(bucketSettings, bandIs(ALL_BANDS)); - assertNull(mChannelCollection.getSupplicantScanFreqs()); + assertNull(mChannelCollection.getScanFreqs()); assertFalse(mChannelCollection.isEmpty()); assertTrue(mChannelCollection.containsChannel(2400)); @@ -360,7 +360,7 @@ public class NoBandChannelHelperTest { mChannelCollection.fillBucketSettings(bucketSettings, Integer.MAX_VALUE); assertThat(bucketSettings, bandIs(WifiScanner.WIFI_BAND_BOTH_WITH_DFS)); - assertNull(mChannelCollection.getSupplicantScanFreqs()); + assertNull(mChannelCollection.getScanFreqs()); assertFalse(mChannelCollection.isEmpty()); assertTrue(mChannelCollection.containsChannel(2400)); diff --git a/tests/wifitests/src/com/android/server/wifi/scanner/WificondPnoScannerTest.java b/tests/wifitests/src/com/android/server/wifi/scanner/WificondPnoScannerTest.java index dde727f47..c63a9a042 100644 --- a/tests/wifitests/src/com/android/server/wifi/scanner/WificondPnoScannerTest.java +++ b/tests/wifitests/src/com/android/server/wifi/scanner/WificondPnoScannerTest.java @@ -406,7 +406,7 @@ public class WificondPnoScannerTest { private Set<Integer> expectedBandScanFreqs(int band) { ChannelCollection collection = mScanner.getChannelHelper().createChannelCollection(); collection.addBand(band); - return collection.getSupplicantScanFreqs(); + return collection.getScanFreqs(); } /** |