diff options
author | Ningyuan Wang <nywang@google.com> | 2017-03-02 13:33:12 -0800 |
---|---|---|
committer | Ningyuan Wang <nywang@google.com> | 2017-03-12 05:19:22 +0000 |
commit | 05d51a2d8eb67ea2eaf4cae43280d1cf9fe92645 (patch) | |
tree | d8d06f612edf392df57beafbe8ddf14352b98852 | |
parent | 5a9f890485371054fb52dc7e17478d074ee2e856 (diff) |
Rename SupplicantWifiScannerImpl to WificondScannerImpl
This also fixes a few formatting issues.
Bug: 35707137
Test: compile, unit tests, integration test
Change-Id: I1b6642b723c5676620d65136cc6c773b49e28559
-rw-r--r-- | service/java/com/android/server/wifi/scanner/HalWifiScannerImpl.java | 22 | ||||
-rw-r--r-- | service/java/com/android/server/wifi/scanner/WifiScannerImpl.java | 2 | ||||
-rw-r--r-- | service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java | 4 | ||||
-rw-r--r-- | service/java/com/android/server/wifi/scanner/WificondScannerImpl.java (renamed from service/java/com/android/server/wifi/scanner/SupplicantWifiScannerImpl.java) | 33 | ||||
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/scanner/BaseWifiScannerImplTest.java | 10 | ||||
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/scanner/WifiScanningServiceTest.java | 2 | ||||
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/scanner/WificondPnoScannerTest.java (renamed from tests/wifitests/src/com/android/server/wifi/scanner/SupplicantPnoScannerTest.java) | 36 | ||||
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/scanner/WificondScannerTest.java (renamed from tests/wifitests/src/com/android/server/wifi/scanner/SupplicantWifiScannerTest.java) | 18 |
8 files changed, 62 insertions, 65 deletions
diff --git a/service/java/com/android/server/wifi/scanner/HalWifiScannerImpl.java b/service/java/com/android/server/wifi/scanner/HalWifiScannerImpl.java index 97c69382e..95528e252 100644 --- a/service/java/com/android/server/wifi/scanner/HalWifiScannerImpl.java +++ b/service/java/com/android/server/wifi/scanner/HalWifiScannerImpl.java @@ -29,7 +29,7 @@ import com.android.server.wifi.WifiNative; /** * WifiScanner implementation that takes advantage of the gscan HAL API - * The gscan API is used to perform background scans and wpa_supplicant is used for onehot scans. + * The gscan API is used to perform background scans and wificond is used for oneshot scans. * @see com.android.server.wifi.scanner.WifiScannerImpl for more details on each method. */ public class HalWifiScannerImpl extends WifiScannerImpl implements Handler.Callback { @@ -38,15 +38,15 @@ public class HalWifiScannerImpl extends WifiScannerImpl implements Handler.Callb private final WifiNative mWifiNative; private final ChannelHelper mChannelHelper; - private final SupplicantWifiScannerImpl mSupplicantScannerDelegate; + private final WificondScannerImpl mWificondScannerDelegate; private final boolean mHalBasedPnoSupported; public HalWifiScannerImpl(Context context, WifiNative wifiNative, WifiMonitor wifiMonitor, Looper looper, Clock clock) { mWifiNative = wifiNative; mChannelHelper = new HalChannelHelper(wifiNative); - mSupplicantScannerDelegate = - new SupplicantWifiScannerImpl(context, wifiNative, wifiMonitor, mChannelHelper, + mWificondScannerDelegate = + new WificondScannerImpl(context, wifiNative, wifiMonitor, mChannelHelper, looper, clock); // We are not going to support HAL ePNO currently. @@ -61,7 +61,7 @@ public class HalWifiScannerImpl extends WifiScannerImpl implements Handler.Callb @Override public void cleanup() { - mSupplicantScannerDelegate.cleanup(); + mWificondScannerDelegate.cleanup(); } @Override @@ -76,12 +76,12 @@ public class HalWifiScannerImpl extends WifiScannerImpl implements Handler.Callb public boolean startSingleScan(WifiNative.ScanSettings settings, WifiNative.ScanEventHandler eventHandler) { - return mSupplicantScannerDelegate.startSingleScan(settings, eventHandler); + return mWificondScannerDelegate.startSingleScan(settings, eventHandler); } @Override public WifiScanner.ScanData getLatestSingleScanResults() { - return mSupplicantScannerDelegate.getLatestSingleScanResults(); + return mWificondScannerDelegate.getLatestSingleScanResults(); } @Override @@ -121,7 +121,7 @@ public class HalWifiScannerImpl extends WifiScannerImpl implements Handler.Callb if (mHalBasedPnoSupported) { return mWifiNative.setPnoList(settings, eventHandler); } else { - return mSupplicantScannerDelegate.setHwPnoList(settings, eventHandler); + return mWificondScannerDelegate.setHwPnoList(settings, eventHandler); } } @@ -130,7 +130,7 @@ public class HalWifiScannerImpl extends WifiScannerImpl implements Handler.Callb if (mHalBasedPnoSupported) { return mWifiNative.resetPnoList(); } else { - return mSupplicantScannerDelegate.resetHwPnoList(); + return mWificondScannerDelegate.resetHwPnoList(); } } @@ -139,7 +139,7 @@ public class HalWifiScannerImpl extends WifiScannerImpl implements Handler.Callb if (mHalBasedPnoSupported) { return true; } else { - return mSupplicantScannerDelegate.isHwPnoSupported(isConnectedPno); + return mWificondScannerDelegate.isHwPnoSupported(isConnectedPno); } } @@ -148,7 +148,7 @@ public class HalWifiScannerImpl extends WifiScannerImpl implements Handler.Callb if (mHalBasedPnoSupported) { return true; } else { - return mSupplicantScannerDelegate.shouldScheduleBackgroundScanForHwPno(); + return mWificondScannerDelegate.shouldScheduleBackgroundScanForHwPno(); } } diff --git a/service/java/com/android/server/wifi/scanner/WifiScannerImpl.java b/service/java/com/android/server/wifi/scanner/WifiScannerImpl.java index e476f5a76..98e87902a 100644 --- a/service/java/com/android/server/wifi/scanner/WifiScannerImpl.java +++ b/service/java/com/android/server/wifi/scanner/WifiScannerImpl.java @@ -51,7 +51,7 @@ public abstract class WifiScannerImpl { if (wifiNative.getScanCapabilities(new WifiNative.ScanCapabilities())) { return new HalWifiScannerImpl(context, wifiNative, wifiMonitor, looper, clock); } else { - return new SupplicantWifiScannerImpl(context, wifiNative, wifiMonitor, looper, + return new WificondScannerImpl(context, wifiNative, wifiMonitor, looper, clock); } } diff --git a/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java b/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java index 7da5857f7..a9f4b49ba 100644 --- a/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java +++ b/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java @@ -1473,14 +1473,14 @@ public class WifiScanningServiceImpl extends IWifiScanner.Stub { * 2. Move to |Started State| when we get the |WIFI_SCAN_AVAILABLE| broadcast from WifiManager. * 3. When a new PNO scan request comes in: * a.1. Switch to |Hw Pno Scan state| when the device supports HW PNO - * (This could either be HAL based ePNO or supplicant based PNO). + * (This could either be HAL based ePNO or wificond based PNO). * a.2. In |Hw Pno Scan state| when PNO scan results are received, check if the result * contains IE (information elements). If yes, send the results to the client, else * switch to |Single Scan state| and send the result to the client when the scan result * is obtained. * b.1. Switch to |Sw Pno Scan state| when the device does not supports HW PNO * (This is for older devices which do not support HW PNO and for connected PNO on - * devices which support supplicant based PNO) + * devices which support wificond based PNO) * b.2. In |Sw Pno Scan state| send the result to the client when the background scan result * is obtained * diff --git a/service/java/com/android/server/wifi/scanner/SupplicantWifiScannerImpl.java b/service/java/com/android/server/wifi/scanner/WificondScannerImpl.java index 2f136fe42..3fd5be85e 100644 --- a/service/java/com/android/server/wifi/scanner/SupplicantWifiScannerImpl.java +++ b/service/java/com/android/server/wifi/scanner/WificondScannerImpl.java @@ -41,25 +41,22 @@ import java.util.List; import java.util.Set; /** - * Implementation of the WifiScanner HAL API that uses wpa_supplicant to perform all scans + * Implementation of the WifiScanner HAL API that uses wificond to perform all scans * @see com.android.server.wifi.scanner.WifiScannerImpl for more details on each method. */ -public class SupplicantWifiScannerImpl extends WifiScannerImpl implements Handler.Callback { - private static final String TAG = "SupplicantWifiScannerImpl"; +public class WificondScannerImpl extends WifiScannerImpl implements Handler.Callback { + private static final String TAG = "WificondScannerImpl"; private static final boolean DBG = false; public static final String BACKGROUND_PERIOD_ALARM_TAG = TAG + " Background Scan Period"; public static final String TIMEOUT_ALARM_TAG = TAG + " Scan Timeout"; - // Max number of networks that can be specified to wpa_supplicant per scan request + // Max number of networks that can be specified to wificond per scan request public static final int MAX_HIDDEN_NETWORK_IDS_PER_SCAN = 16; private static final int SCAN_BUFFER_CAPACITY = 10; private static final int MAX_APS_PER_SCAN = 32; private static final int MAX_SCAN_BUCKETS = 16; - private static final String ACTION_SCAN_PERIOD = - "com.android.server.util.SupplicantWifiScannerImpl.action.SCAN_PERIOD"; - private final Context mContext; private final WifiNative mWifiNative; private final AlarmManager mAlarmManager; @@ -130,7 +127,7 @@ public class SupplicantWifiScannerImpl extends WifiScannerImpl implements Handle } }; - public SupplicantWifiScannerImpl(Context context, WifiNative wifiNative, + public WificondScannerImpl(Context context, WifiNative wifiNative, WifiMonitor wifiMonitor, ChannelHelper channelHelper, Looper looper, Clock clock) { mContext = context; @@ -151,7 +148,7 @@ public class SupplicantWifiScannerImpl extends WifiScannerImpl implements Handle WifiMonitor.SCAN_RESULTS_EVENT, mEventHandler); } - public SupplicantWifiScannerImpl(Context context, WifiNative wifiNative, + public WificondScannerImpl(Context context, WifiNative wifiNative, WifiMonitor wifiMonitor, Looper looper, Clock clock) { // TODO figure out how to get channel information from supplicant this(context, wifiNative, wifiMonitor, new NoBandChannelHelper(), looper, clock); @@ -249,7 +246,7 @@ public class SupplicantWifiScannerImpl extends WifiScannerImpl implements Handle stopBatchedScan(); if (DBG) { Log.d(TAG, "Starting scan num_buckets=" + settings.num_buckets + ", base_period=" - + settings.base_period_ms + " ms"); + + settings.base_period_ms + " ms"); } mPendingBackgroundScanSettings = settings; mPendingBackgroundScanEventHandler = eventHandler; @@ -324,7 +321,7 @@ public class SupplicantWifiScannerImpl extends WifiScannerImpl implements Handle } private void handleScanTimeout() { - Log.e(TAG, "Timed out waiting for scan result from supplicant"); + Log.e(TAG, "Timed out waiting for scan result from wificond"); reportScanFailure(); processPendingScans(); } @@ -392,7 +389,8 @@ public class SupplicantWifiScannerImpl extends WifiScannerImpl implements Handle mNextBackgroundScanPeriod++; mBackgroundScanPeriodPending = false; mAlarmManager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, - mClock.getElapsedSinceBootMillis() + mBackgroundScanSettings.base_period_ms, + mClock.getElapsedSinceBootMillis() + + mBackgroundScanSettings.base_period_ms, BACKGROUND_PERIOD_ALARM_TAG, mScanPeriodListener, mEventHandler); } } @@ -707,7 +705,7 @@ public class SupplicantWifiScannerImpl extends WifiScannerImpl implements Handle } mPnoEventHandler = eventHandler; mPnoSettings = settings; - // For supplicant based PNO, we start the scan immediately when we set pno list. + // For wificond based PNO, we start the scan immediately when we set pno list. processPendingScans(); return true; } @@ -722,7 +720,7 @@ public class SupplicantWifiScannerImpl extends WifiScannerImpl implements Handle } mPnoEventHandler = null; mPnoSettings = null; - // For supplicant based PNO, we stop the scan immediately when we reset pno list. + // For wificond based PNO, we stop the scan immediately when we reset pno list. stopHwPnoScan(); return true; } @@ -775,7 +773,7 @@ public class SupplicantWifiScannerImpl extends WifiScannerImpl implements Handle private static class LastScanSettings { public long startTime; - public LastScanSettings(long startTime) { + LastScanSettings(long startTime) { this.startTime = startTime; } @@ -830,7 +828,7 @@ public class SupplicantWifiScannerImpl extends WifiScannerImpl implements Handle private final ArrayDeque<WifiScanner.ScanData> mBuffer; private int mCapacity; - public ScanBuffer(int capacity) { + ScanBuffer(int capacity) { mCapacity = capacity; mBuffer = new ArrayDeque<>(mCapacity); } @@ -1113,7 +1111,8 @@ public class SupplicantWifiScannerImpl extends WifiScannerImpl implements Handle long alarmTimeout = MINIMUM_PNO_GAP_MS - timeDifference; Log.d(TAG, "Start PNO timer with delay " + alarmTimeout); mAlarmManager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, - mClock.getElapsedSinceBootMillis() + alarmTimeout, PNO_DEBOUNCER_ALARM_TAG, + mClock.getElapsedSinceBootMillis() + alarmTimeout, + PNO_DEBOUNCER_ALARM_TAG, mAlarmListener, mEventHandler); mWaitForTimer = true; } 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 b348f0191..bdc4242b4 100644 --- a/tests/wifitests/src/com/android/server/wifi/scanner/BaseWifiScannerImplTest.java +++ b/tests/wifitests/src/com/android/server/wifi/scanner/BaseWifiScannerImplTest.java @@ -180,7 +180,7 @@ public abstract class BaseWifiScannerImplTest { /** * Tests whether the provided hidden networkId's in scan settings is truncated to max size - * supported by wpa_supplicant when invoking native scan. + * supported by wificond when invoking native scan. */ @Test public void singleScanSuccessWithTruncatedHiddenNetworkIds() { @@ -198,7 +198,7 @@ public abstract class BaseWifiScannerImplTest { .build(); Set<String> hiddenNetworkSSIDSet = new HashSet<>(); - for (int i = 0; i < SupplicantWifiScannerImpl.MAX_HIDDEN_NETWORK_IDS_PER_SCAN; i++) { + for (int i = 0; i < WificondScannerImpl.MAX_HIDDEN_NETWORK_IDS_PER_SCAN; i++) { hiddenNetworkSSIDSet.add(hiddenNetworkSSIDs[i]); } doSuccessfulSingleScanTest(settings, createFreqSet(5650), @@ -285,7 +285,7 @@ public abstract class BaseWifiScannerImplTest { mLooper.dispatchAll(); // Fire timeout - mAlarmManager.dispatch(SupplicantWifiScannerImpl.TIMEOUT_ALARM_TAG); + mAlarmManager.dispatch(WificondScannerImpl.TIMEOUT_ALARM_TAG); mLooper.dispatchAll(); order.verify(eventHandler).onScanStatus(WifiNative.WIFI_SCAN_FAILED); @@ -294,7 +294,7 @@ public abstract class BaseWifiScannerImplTest { } /** - * Test that a scan failure is reported if supplicant sends a scan failed event + * Test that a scan failure is reported if wificond sends a scan failed event */ @Test public void singleScanFailOnFailedEvent() { @@ -390,7 +390,7 @@ public abstract class BaseWifiScannerImplTest { } /** - * Validate that scan results that are returned from supplicant, which are timestamped prior to + * Validate that scan results that are returned from wificond, which are timestamped prior to * the start of the scan, are ignored. */ @Test diff --git a/tests/wifitests/src/com/android/server/wifi/scanner/WifiScanningServiceTest.java b/tests/wifitests/src/com/android/server/wifi/scanner/WifiScanningServiceTest.java index e0fb426a0..738318c8e 100644 --- a/tests/wifitests/src/com/android/server/wifi/scanner/WifiScanningServiceTest.java +++ b/tests/wifitests/src/com/android/server/wifi/scanner/WifiScanningServiceTest.java @@ -1784,7 +1784,7 @@ public class WifiScanningServiceTest { } /** - * Tests Supplicant PNO scan when the PNO scan results contain IE info. This ensures that the + * Tests wificond PNO scan when the PNO scan results contain IE info. This ensures that the * PNO scan results are plumbed back to the client as a PNO network found event. */ @Test diff --git a/tests/wifitests/src/com/android/server/wifi/scanner/SupplicantPnoScannerTest.java b/tests/wifitests/src/com/android/server/wifi/scanner/WificondPnoScannerTest.java index fb12ca128..1dd548153 100644 --- a/tests/wifitests/src/com/android/server/wifi/scanner/SupplicantPnoScannerTest.java +++ b/tests/wifitests/src/com/android/server/wifi/scanner/WificondPnoScannerTest.java @@ -48,10 +48,10 @@ import java.util.Arrays; import java.util.Set; /** - * Unit tests for {@link com.android.server.wifi.scanner.SupplicantWifiScannerImpl.setPnoList}. + * Unit tests for {@link com.android.server.wifi.scanner.WificondScannerImpl.setPnoList}. */ @SmallTest -public class SupplicantPnoScannerTest { +public class WificondPnoScannerTest { @Mock Context mContext; TestAlarmManager mAlarmManager; @@ -60,7 +60,7 @@ public class SupplicantPnoScannerTest { @Mock WifiNative mWifiNative; MockResources mResources; @Mock Clock mClock; - SupplicantWifiScannerImpl mScanner; + WificondScannerImpl mScanner; @Before public void setup() throws Exception { @@ -79,7 +79,7 @@ public class SupplicantPnoScannerTest { } /** - * Verify that the HW disconnected PNO scan triggers a supplicant PNO scan and invokes the + * Verify that the HW disconnected PNO scan triggers a wificond PNO scan and invokes the * OnPnoNetworkFound callback when the scan results are received. */ @Test @@ -126,7 +126,7 @@ public class SupplicantPnoScannerTest { // alarm fires. assertTrue("dispatch pno monitor alarm", mAlarmManager.dispatch( - SupplicantWifiScannerImpl.HwPnoDebouncer.PNO_DEBOUNCER_ALARM_TAG)); + WificondScannerImpl.HwPnoDebouncer.PNO_DEBOUNCER_ALARM_TAG)); assertEquals("dispatch message after alarm", 1, mLooper.dispatchAll()); // Now verify that PNO scan is resumed successfully expectSuccessfulHwDisconnectedPnoScan(order, pnoSettings, pnoEventHandler, scanResults); @@ -195,7 +195,7 @@ public class SupplicantPnoScannerTest { when(mWifiNative.startPnoScan(any(WifiNative.PnoSettings.class))).thenReturn(false); assertTrue("dispatch pno monitor alarm", mAlarmManager.dispatch( - SupplicantWifiScannerImpl.HwPnoDebouncer.PNO_DEBOUNCER_ALARM_TAG)); + WificondScannerImpl.HwPnoDebouncer.PNO_DEBOUNCER_ALARM_TAG)); assertEquals("dispatch message after alarm", 1, mLooper.dispatchAll()); order.verify(pnoEventHandler).onPnoScanFailed(); verifyNoMoreInteractions(pnoEventHandler); @@ -204,7 +204,7 @@ public class SupplicantPnoScannerTest { startSuccessfulPnoScan(null, pnoSettings, null, pnoEventHandler); assertTrue("dispatch pno monitor alarm", mAlarmManager.dispatch( - SupplicantWifiScannerImpl.HwPnoDebouncer.PNO_DEBOUNCER_ALARM_TAG)); + WificondScannerImpl.HwPnoDebouncer.PNO_DEBOUNCER_ALARM_TAG)); assertEquals("dispatch message after alarm", 1, mLooper.dispatchAll()); expectSuccessfulHwDisconnectedPnoScan(order, pnoSettings, pnoEventHandler, scanResults); verifyNoMoreInteractions(pnoEventHandler); @@ -231,7 +231,7 @@ public class SupplicantPnoScannerTest { assertTrue(mScanner.resetHwPnoList()); assertTrue("dispatch pno monitor alarm", mAlarmManager.dispatch( - SupplicantWifiScannerImpl.HwPnoDebouncer.PNO_DEBOUNCER_ALARM_TAG)); + WificondScannerImpl.HwPnoDebouncer.PNO_DEBOUNCER_ALARM_TAG)); mLooper.dispatchAll(); verify(mWifiNative).stopPnoScan(); @@ -239,7 +239,7 @@ public class SupplicantPnoScannerTest { startSuccessfulPnoScan(null, pnoSettings, null, pnoEventHandler); assertTrue("dispatch pno monitor alarm", mAlarmManager.dispatch( - SupplicantWifiScannerImpl.HwPnoDebouncer.PNO_DEBOUNCER_ALARM_TAG)); + WificondScannerImpl.HwPnoDebouncer.PNO_DEBOUNCER_ALARM_TAG)); mLooper.dispatchAll(); InOrder order = inOrder(pnoEventHandler, mWifiNative); ScanResults scanResults = createDummyScanResults(false); @@ -270,7 +270,7 @@ public class SupplicantPnoScannerTest { // Stop PNO now. This should trigger the debounce timer and not stop PNO. assertTrue(mScanner.resetHwPnoList()); assertTrue(mAlarmManager.isPending( - SupplicantWifiScannerImpl.HwPnoDebouncer.PNO_DEBOUNCER_ALARM_TAG)); + WificondScannerImpl.HwPnoDebouncer.PNO_DEBOUNCER_ALARM_TAG)); order.verify(mWifiNative, never()).stopPnoScan(); // Now restart PNO scan with an extra network in settings. @@ -285,7 +285,7 @@ public class SupplicantPnoScannerTest { order.verify(mWifiNative).stopPnoScan(); // Trigger the debounce timer and ensure we start PNO scan again. - mAlarmManager.dispatch(SupplicantWifiScannerImpl.HwPnoDebouncer.PNO_DEBOUNCER_ALARM_TAG); + mAlarmManager.dispatch(WificondScannerImpl.HwPnoDebouncer.PNO_DEBOUNCER_ALARM_TAG); mLooper.dispatchAll(); order.verify(mWifiNative).startPnoScan(pnoSettings); } @@ -313,7 +313,7 @@ public class SupplicantPnoScannerTest { // Stop PNO now. This should trigger the debounce timer and not stop PNO. assertTrue(mScanner.resetHwPnoList()); assertTrue(mAlarmManager.isPending( - SupplicantWifiScannerImpl.HwPnoDebouncer.PNO_DEBOUNCER_ALARM_TAG)); + WificondScannerImpl.HwPnoDebouncer.PNO_DEBOUNCER_ALARM_TAG)); order.verify(mWifiNative, never()).stopPnoScan(); // Now restart PNO scan with the same settings. @@ -344,16 +344,14 @@ public class SupplicantPnoScannerTest { private void createScannerWithHwPnoScanSupport() { mResources.setBoolean(R.bool.config_wifi_background_scan_support, true); - mScanner = - new SupplicantWifiScannerImpl(mContext, mWifiNative, mWifiMonitor, - mLooper.getLooper(), mClock); + mScanner = new WificondScannerImpl(mContext, mWifiNative, mWifiMonitor, + mLooper.getLooper(), mClock); } private void createScannerWithSwPnoScanSupport() { mResources.setBoolean(R.bool.config_wifi_background_scan_support, false); - mScanner = - new SupplicantWifiScannerImpl(mContext, mWifiNative, mWifiMonitor, - mLooper.getLooper(), mClock); + mScanner = new WificondScannerImpl(mContext, mWifiNative, mWifiMonitor, + mLooper.getLooper(), mClock); } private WifiNative.PnoNetwork createDummyPnoNetwork(String ssid) { @@ -487,7 +485,7 @@ public class SupplicantPnoScannerTest { // Verify background scan results delivered order.verify(eventHandler).onScanStatus(WifiNative.WIFI_SCAN_RESULTS_AVAILABLE); WifiScanner.ScanData[] scanData = mScanner.getLatestBatchedScanResults(true); - WifiScanner.ScanData lastScanData = scanData[scanData.length -1]; + WifiScanner.ScanData lastScanData = scanData[scanData.length - 1]; assertScanDataEquals(scanResults.getScanData(), lastScanData); } } diff --git a/tests/wifitests/src/com/android/server/wifi/scanner/SupplicantWifiScannerTest.java b/tests/wifitests/src/com/android/server/wifi/scanner/WificondScannerTest.java index d5a4b131c..68a147c00 100644 --- a/tests/wifitests/src/com/android/server/wifi/scanner/SupplicantWifiScannerTest.java +++ b/tests/wifitests/src/com/android/server/wifi/scanner/WificondScannerTest.java @@ -41,14 +41,14 @@ import java.util.ArrayList; import java.util.Set; /** - * Unit tests for {@link com.android.server.wifi.scanner.SupplicantWifiScannerImpl}. + * Unit tests for {@link com.android.server.wifi.scanner.WificondScannerImpl}. */ @SmallTest -public class SupplicantWifiScannerTest extends BaseWifiScannerImplTest { +public class WificondScannerTest extends BaseWifiScannerImplTest { @Before public void setup() throws Exception { - mScanner = new SupplicantWifiScannerImpl(mContext, mWifiNative, mWifiMonitor, + mScanner = new WificondScannerImpl(mContext, mWifiNative, mWifiMonitor, mLooper.getLooper(), mClock); } @@ -665,17 +665,17 @@ public class SupplicantWifiScannerTest extends BaseWifiScannerImplTest { private void assertBackgroundPeriodAlarmPending() { assertTrue("background period alarm not pending", - mAlarmManager.isPending(SupplicantWifiScannerImpl.BACKGROUND_PERIOD_ALARM_TAG)); + mAlarmManager.isPending(WificondScannerImpl.BACKGROUND_PERIOD_ALARM_TAG)); } private void assertBackgroundPeriodAlarmNotPending() { assertFalse("background period alarm is pending", - mAlarmManager.isPending(SupplicantWifiScannerImpl.BACKGROUND_PERIOD_ALARM_TAG)); + mAlarmManager.isPending(WificondScannerImpl.BACKGROUND_PERIOD_ALARM_TAG)); } private void dispatchBackgroundPeriodAlarm() { assertTrue("dispatch background period alarm", - mAlarmManager.dispatch(SupplicantWifiScannerImpl.BACKGROUND_PERIOD_ALARM_TAG)); + mAlarmManager.dispatch(WificondScannerImpl.BACKGROUND_PERIOD_ALARM_TAG)); mLooper.dispatchAll(); } @@ -688,7 +688,7 @@ public class SupplicantWifiScannerTest extends BaseWifiScannerImplTest { public final boolean result; public final boolean full; - private ReportType(boolean result, boolean full) { + ReportType(boolean result, boolean full) { this.result = result; this.full = full; } @@ -697,12 +697,12 @@ public class SupplicantWifiScannerTest extends BaseWifiScannerImplTest { private final ScanResults[] mDeliveredResults; private final Set<Integer> mRequestedFreqs; - public ScanPeriod(ReportType reportType, ScanResults deliveredResult, + ScanPeriod(ReportType reportType, ScanResults deliveredResult, Set<Integer> requestedFreqs) { this(reportType, new ScanResults[] {deliveredResult}, requestedFreqs); } - public ScanPeriod(ReportType reportType, ScanResults[] deliveredResults, + ScanPeriod(ReportType reportType, ScanResults[] deliveredResults, Set<Integer> requestedFreqs) { mReportType = reportType; mDeliveredResults = deliveredResults; |