public static synchronized void restartScan() { synchronized (mLock) { if (sScanCmdId == 0 && sScanSettings != null && sScanEventHandler != null) { Log.d(TAG, "Restarting scan"); startScan(sScanSettings, sScanEventHandler); sScanEventHandler.onScanRestarted(); } } }
public static synchronized void pauseScan() { synchronized (mLock) { if (sScanCmdId != 0 && sScanSettings != null && sScanEventHandler != null) { Log.d(TAG, "Pausing scan"); stopScanNative(sWlan0Index, sScanCmdId); sScanCmdId = 0; sScanEventHandler.onScanPaused(); } } }