Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Commit

Permalink
Fix yet another crash
Browse files Browse the repository at this point in the history
  • Loading branch information
andyboeh committed Feb 18, 2019
1 parent 653552b commit 18643fd
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -416,10 +416,14 @@ PendingIntent getScanCallbackIntent(boolean newUuid) {
private void stopBleBackgroundScan() {
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
mHandler.removeCallbacks(mReduceBleScanIntervalRunnable);
mBluetoothScanner.stopScan(getScanCallbackIntent(false));
if(mBluetoothScanner != null) {
mBluetoothScanner.stopScan(getScanCallbackIntent(false));
}
} else {
mHandler.removeCallbacks(mRestartRunnable);
mBluetoothScanner.stopScan(mScanCallback);
if(mBluetoothScanner != null) {
mBluetoothScanner.stopScan(mScanCallback);
}
}
}

Expand Down

0 comments on commit 18643fd

Please sign in to comment.