From 78f1fe096a514f75ef9f0a1b42e2f29a5cb46c2c Mon Sep 17 00:00:00 2001 From: Jakub Kuczys Date: Wed, 6 Dec 2023 15:51:55 +0100 Subject: [PATCH] Remove xdrip prefs file --- core/utils/src/main/res/values/keys.xml | 1 - .../aaps/plugins/source/XdripSourcePlugin.kt | 4 ++-- .../source/src/main/res/values/strings.xml | 5 ++-- .../source/src/main/res/xml/pref_dexcom.xml | 4 ++-- .../source/src/main/res/xml/pref_xdrip.xml | 23 ------------------- .../plugins/source/XdripSourcePluginTest.kt | 2 +- 6 files changed, 7 insertions(+), 32 deletions(-) delete mode 100644 plugins/source/src/main/res/xml/pref_xdrip.xml diff --git a/core/utils/src/main/res/values/keys.xml b/core/utils/src/main/res/values/keys.xml index 1dc4a7f260..8493fae85b 100644 --- a/core/utils/src/main/res/values/keys.xml +++ b/core/utils/src/main/res/values/keys.xml @@ -50,7 +50,6 @@ insight_local_settings data_choices_settings dexcom_settings - xdrip_settings active_pump_change_timestamp active_pump_type active_pump_serial_number diff --git a/plugins/source/src/main/kotlin/app/aaps/plugins/source/XdripSourcePlugin.kt b/plugins/source/src/main/kotlin/app/aaps/plugins/source/XdripSourcePlugin.kt index dcb91782f7..0ee8e1d7e8 100644 --- a/plugins/source/src/main/kotlin/app/aaps/plugins/source/XdripSourcePlugin.kt +++ b/plugins/source/src/main/kotlin/app/aaps/plugins/source/XdripSourcePlugin.kt @@ -43,7 +43,7 @@ class XdripSourcePlugin @Inject constructor( .mainType(PluginType.BGSOURCE) .fragmentClass(BGSourceFragment::class.java.name) .pluginIcon((app.aaps.core.main.R.drawable.ic_blooddrop_48)) - .preferencesId(R.xml.pref_xdrip) + .preferencesId(R.xml.pref_dexcom) .pluginName(R.string.source_xdrip) .description(R.string.description_source_xdrip), aapsLogger, rh, injector @@ -80,7 +80,7 @@ class XdripSourcePlugin @Inject constructor( fun getSensorStartTime(bundle: Bundle): Long? { val now = dateUtil.now() - var sensorStartTime: Long? = if (sp.getBoolean(R.string.key_xdrip_log_ns_sensor_change, false)) { + var sensorStartTime: Long? = if (sp.getBoolean(R.string.key_dexcom_log_ns_sensor_change, false)) { bundle.getLong(Intents.EXTRA_SENSOR_STARTED_AT, 0) } else { null diff --git a/plugins/source/src/main/res/values/strings.xml b/plugins/source/src/main/res/values/strings.xml index d2a3aa7d08..9c2db02d03 100644 --- a/plugins/source/src/main/res/values/strings.xml +++ b/plugins/source/src/main/res/values/strings.xml @@ -2,7 +2,6 @@ dexcom_lognssensorchange - xdrip_lognssensorchange last_processed_glunovo_timestamp last_processed_intelligo_timestamp @@ -40,8 +39,8 @@ Send BG data to xDrip+ In xDrip+ select 640g/Eversense data source BG upload settings - Log sensor change to NS - Create event \"Sensor Change\" in NS automatically on sensor start + Log sensor change to NS + Create event \"Sensor Change\" in NS automatically on sensor start direction diff --git a/plugins/source/src/main/res/xml/pref_dexcom.xml b/plugins/source/src/main/res/xml/pref_dexcom.xml index 2479f27cd6..f9891d0049 100644 --- a/plugins/source/src/main/res/xml/pref_dexcom.xml +++ b/plugins/source/src/main/res/xml/pref_dexcom.xml @@ -15,8 +15,8 @@ + android:summary="@string/dexcom_log_ns_sensor_change_summary" + android:title="@string/dexcom_log_ns_sensor_change_title" /> diff --git a/plugins/source/src/main/res/xml/pref_xdrip.xml b/plugins/source/src/main/res/xml/pref_xdrip.xml deleted file mode 100644 index 1eb5069016..0000000000 --- a/plugins/source/src/main/res/xml/pref_xdrip.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/source/src/test/kotlin/app/aaps/plugins/source/XdripSourcePluginTest.kt b/plugins/source/src/test/kotlin/app/aaps/plugins/source/XdripSourcePluginTest.kt index 360a837549..6afe6d546a 100644 --- a/plugins/source/src/test/kotlin/app/aaps/plugins/source/XdripSourcePluginTest.kt +++ b/plugins/source/src/test/kotlin/app/aaps/plugins/source/XdripSourcePluginTest.kt @@ -59,7 +59,7 @@ class XdripSourcePluginTest : TestBase() { ): Pair { val bundle = BundleMock.mock() sensorStartTime?.let { bundle.putLong(Intents.EXTRA_SENSOR_STARTED_AT, sensorStartTime) } - `when`(sp.getBoolean(R.string.key_xdrip_log_ns_sensor_change, false)).thenReturn(logNsSensorChange) + `when`(sp.getBoolean(R.string.key_dexcom_log_ns_sensor_change, false)).thenReturn(logNsSensorChange) lateinit var worker: XdripSourcePlugin.XdripSourceWorker TestListenableWorkerBuilder(context)