From ca6fd027bc2e570685319929e5c36cafec3e1345 Mon Sep 17 00:00:00 2001 From: "David G. Young" Date: Thu, 20 Dec 2018 11:46:13 -0500 Subject: [PATCH] Fix reversed logic on service shutdown preventing cleanup --- src/main/java/org/altbeacon/beacon/service/BeaconService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/altbeacon/beacon/service/BeaconService.java b/src/main/java/org/altbeacon/beacon/service/BeaconService.java index 73545ded8..e296ee6b3 100644 --- a/src/main/java/org/altbeacon/beacon/service/BeaconService.java +++ b/src/main/java/org/altbeacon/beacon/service/BeaconService.java @@ -336,7 +336,7 @@ public void onDestroy() { LogManager.i(TAG, "onDestroy called. stopping scanning"); handler.removeCallbacksAndMessages(null); - if (mScanHelper.getCycledScanner() == null) { + if (mScanHelper.getCycledScanner() != null) { mScanHelper.getCycledScanner().stop(); mScanHelper.getCycledScanner().destroy(); }