From 0f668472a4577f5502e540ee825dd4729dac695c Mon Sep 17 00:00:00 2001 From: Carlos Rafael Giani Date: Sat, 5 Aug 2023 15:21:17 +0200 Subject: [PATCH] combov2: Use custom Bluetooth strings instead of reusing BLE ones The Combo does not use Bluetooth Low Energy, but rather Bluetooth Classic, so don't use BLE strings for notificiations. --- .../main/kotlin/info/nightscout/pump/combov2/ComboV2Plugin.kt | 4 ++-- pump/combov2/src/main/res/values/strings.xml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pump/combov2/src/main/kotlin/info/nightscout/pump/combov2/ComboV2Plugin.kt b/pump/combov2/src/main/kotlin/info/nightscout/pump/combov2/ComboV2Plugin.kt index cbe56f27f5..39a9e6e2c1 100644 --- a/pump/combov2/src/main/kotlin/info/nightscout/pump/combov2/ComboV2Plugin.kt +++ b/pump/combov2/src/main/kotlin/info/nightscout/pump/combov2/ComboV2Plugin.kt @@ -349,7 +349,7 @@ class ComboV2Plugin @Inject constructor ( } catch (_: BluetoothNotEnabledException) { uiInteraction.addNotification( Notification.BLUETOOTH_NOT_ENABLED, - text = rh.gs(info.nightscout.core.ui.R.string.ble_not_enabled), + text = rh.gs(R.string.combov2_bluetooth_disabled), level = Notification.INFO ) @@ -761,7 +761,7 @@ class ComboV2Plugin @Inject constructor ( } catch (_: BluetoothNotEnabledException) { uiInteraction.addNotification( Notification.BLUETOOTH_NOT_ENABLED, - text = rh.gs(info.nightscout.core.ui.R.string.ble_not_enabled), + text = rh.gs(R.string.combov2_bluetooth_disabled), level = Notification.INFO ) } catch (e: Exception) { diff --git a/pump/combov2/src/main/res/values/strings.xml b/pump/combov2/src/main/res/values/strings.xml index 947df4df66..e1e2432874 100644 --- a/pump/combov2/src/main/res/values/strings.xml +++ b/pump/combov2/src/main/res/values/strings.xml @@ -139,4 +139,5 @@ buttons at the same time to cancel pairing)\n Refreshing pump status after the pump reported an error Go back Cannot perform pairing because the driver is not initialized. This typically happens because the necessary Bluetooth permissions have not been granted. Go back, grant the Bluetooth permissions, then try again to pair. + Cannot start driver - Bluetooth is disabled