From 14641e85e628851d13cf512e6b8505f0e26fa07b Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Wed, 16 Mar 2022 11:36:02 +0100 Subject: [PATCH] RL: fix checking for permission --- .../plugins/pump/common/hw/rileylink/ble/RileyLinkBLE.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/RileyLinkBLE.kt b/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/RileyLinkBLE.kt index 900cc86d58..5a48ec26cf 100644 --- a/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/RileyLinkBLE.kt +++ b/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/ble/RileyLinkBLE.kt @@ -160,7 +160,7 @@ class RileyLinkBLE @Inject constructor( return } if (config.PUMPDRIVERS && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S && - ContextCompat.checkSelfPermission(context, "android.permission.BLUETOOTH_CONNECT") == PackageManager.PERMISSION_GRANTED + ContextCompat.checkSelfPermission(context, "android.permission.BLUETOOTH_CONNECT") != PackageManager.PERMISSION_GRANTED ) { aapsLogger.debug(LTag.PUMPBTCOMM, "no permission") return