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 e069af3 commit b0fca75
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 b0fca75

Please sign in to comment.