From 2b430ffc0d82fe6aab93b7083cc7197777d598a3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Mar 2021 07:21:21 +0000 Subject: [PATCH 01/27] Bump byteBuddyVersion from 1.10.21 to 1.10.22 Bumps `byteBuddyVersion` from 1.10.21 to 1.10.22. Updates `byte-buddy` from 1.10.21 to 1.10.22 - [Release notes](https://github.com/raphw/byte-buddy/releases) - [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md) - [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.10.21...byte-buddy-1.10.22) Updates `byte-buddy-android` from 1.10.21 to 1.10.22 - [Release notes](https://github.com/raphw/byte-buddy/releases) - [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md) - [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.10.21...byte-buddy-1.10.22) Updates `byte-buddy-agent` from 1.10.21 to 1.10.22 - [Release notes](https://github.com/raphw/byte-buddy/releases) - [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md) - [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.10.21...byte-buddy-1.10.22) Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 9058bb6dd0..320452b449 100644 --- a/build.gradle +++ b/build.gradle @@ -30,7 +30,7 @@ buildscript { dexmakerVersion = "1.2" retrofit2Version = '2.9.0' okhttp3Version = '4.9.0' - byteBuddyVersion = '1.10.21' + byteBuddyVersion = '1.10.22' androidx_junit = '1.1.2' androidx_rules = '1.4.0-alpha04' From b1e162c713b070039223b4ebb3f0b3358f201034 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Mar 2021 07:19:32 +0000 Subject: [PATCH 02/27] Bump kotlin_version from 1.4.31 to 1.4.32 Bumps `kotlin_version` from 1.4.31 to 1.4.32. Updates `kotlin-gradle-plugin` from 1.4.31 to 1.4.32 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/commits) Updates `kotlin-stdlib-jdk7` from 1.4.31 to 1.4.32 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/commits) Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index f39de78ef1..4ddf1c3925 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ buildscript { ext { - kotlin_version = '1.4.31' + kotlin_version = '1.4.32' coreVersion = '1.3.2' rxjava_version = '2.2.21' rxandroid_version = '2.1.1' From 6cf621d90aac04aa9c3d4c5d84c67f20e4251182 Mon Sep 17 00:00:00 2001 From: Robrub <76626474+robertrub@users.noreply.github.com> Date: Sat, 3 Apr 2021 11:38:15 +0200 Subject: [PATCH 03/27] Update strings.xml Minor change : Omnipod needs 80U to be primed and not 85U. I've tested this many times with an insulin pen. --- omnipod-eros/src/main/res/values/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/omnipod-eros/src/main/res/values/strings.xml b/omnipod-eros/src/main/res/values/strings.xml index 9e78325f0b..dbcd76a5d8 100644 --- a/omnipod-eros/src/main/res/values/strings.xml +++ b/omnipod-eros/src/main/res/values/strings.xml @@ -93,10 +93,10 @@ Pulse Log (copied to clipboard) - Fill a new Pod with enough insulin for 3 days.\n\nListen for two beeps from the Pod during the filling process. These indicate that the minimum amount of 85U has been inserted. Be sure to completely empty the fill syringe, even after hearing the two beeps.\n\nAfter filling the Pod, please press Next.\n\nNote: do not remove the Pod\'s needle cap at this time.\nNote: please place the RileyLink in an upright position and place the Pod a few inches away from it. + Fill a new Pod with enough insulin for 3 days.\n\nListen for two beeps from the Pod during the filling process. These indicate that the minimum amount of 80U has been inserted. Be sure to completely empty the fill syringe, even after hearing the two beeps.\n\nAfter filling the Pod, please press Next.\n\nNote: do not remove the Pod\'s needle cap at this time.\nNote: please place the RileyLink in an upright position and place the Pod a few inches away from it. Trying to pair with the new Pod and prime it.\n\nWhen the initialization process has successfully been completed, you can press Next.\n\nNote: please place the RileyLink in an upright position and place the Pod a few inches away from it. uncertain - \ No newline at end of file + From f74cd6796fe0c0412a27e06fe8dad2942586087a Mon Sep 17 00:00:00 2001 From: Philoul Date: Mon, 5 Apr 2021 10:44:52 +0200 Subject: [PATCH 04/27] Same Color for DEV and BGI in menu + SEN value * 100 --- .../androidaps/plugins/general/overview/OverviewFragment.kt | 2 +- .../androidaps/plugins/general/overview/OverviewMenus.kt | 4 ++-- .../plugins/general/overview/graphData/GraphData.kt | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt index 1f8228d5d8..04b3956134 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt @@ -914,8 +914,8 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList if (menuChartSettings[g + 1][OverviewMenus.CharType.IOB.ordinal]) secondGraphData.addIob(fromTime, now, useIobForScale, 1.0, menuChartSettings[g + 1][OverviewMenus.CharType.PRE.ordinal], alignIobScale) if (menuChartSettings[g + 1][OverviewMenus.CharType.COB.ordinal]) secondGraphData.addCob(fromTime, now, useCobForScale, if (useCobForScale) 1.0 else 0.5) if (menuChartSettings[g + 1][OverviewMenus.CharType.DEV.ordinal]) secondGraphData.addDeviations(fromTime, now, useDevForScale, 1.0, alignDevBgiScale) - if (menuChartSettings[g + 1][OverviewMenus.CharType.SEN.ordinal]) secondGraphData.addRatio(fromTime, now, useRatioForScale, 1.0) if (menuChartSettings[g + 1][OverviewMenus.CharType.BGI.ordinal]) secondGraphData.addMinusBGI(fromTime, endTime, useBGIForScale, if (alignDevBgiScale) 1.0 else 0.8, alignDevBgiScale) + if (menuChartSettings[g + 1][OverviewMenus.CharType.SEN.ordinal]) secondGraphData.addRatio(fromTime, now, useRatioForScale, 1.0) if (menuChartSettings[g + 1][OverviewMenus.CharType.DEVSLOPE.ordinal] && buildHelper.isDev()) secondGraphData.addDeviationSlope(fromTime, now, useDSForScale, 1.0) // set manual x bounds to have nice steps diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewMenus.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewMenus.kt index fe9f14bb81..3bbeac5404 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewMenus.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewMenus.kt @@ -38,10 +38,10 @@ class OverviewMenus @Inject constructor( ABS(R.string.overview_show_absinsulin, R.color.iob, primary = false, secondary = true,shortnameId = R.string.abs_insulin_shortname), IOB(R.string.overview_show_iob, R.color.iob, primary = false, secondary = true,shortnameId = R.string.iob), COB(R.string.overview_show_cob, R.color.cob, primary = false, secondary = true,shortnameId = R.string.cob), - DEV(R.string.overview_show_deviations, R.color.deviations, primary = false, secondary = true,shortnameId = R.string.deviation_shortname), + DEV(R.string.overview_show_deviations, R.color.bgi, primary = false, secondary = true,shortnameId = R.string.deviation_shortname), + BGI(R.string.overview_show_bgi, R.color.bgi, primary = false, secondary = true,shortnameId = R.string.bgi_shortname), SEN(R.string.overview_show_sensitivity, R.color.ratio, primary = false, secondary = true,shortnameId = R.string.sensitivity_shortname), ACT(R.string.overview_show_activity, R.color.activity, primary = true, secondary = false,shortnameId = R.string.activity_shortname), - BGI(R.string.overview_show_bgi, R.color.bgi, primary = false, secondary = true,shortnameId = R.string.bgi_shortname), DEVSLOPE(R.string.overview_show_deviationslope, R.color.devslopepos, primary = false, secondary = true,shortnameId = R.string.devslope_shortname) } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/graphData/GraphData.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/graphData/GraphData.kt index 4f7c34f43f..18763d4a04 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/graphData/GraphData.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/graphData/GraphData.kt @@ -571,9 +571,9 @@ class GraphData( var time = fromTime while (time <= toTime) { iobCobCalculatorPlugin.getAutosensData(time)?.let { autosensData -> - ratioArray.add(ScaledDataPoint(time, autosensData.autosensResult.ratio - 1, ratioScale)) - maxRatioValueFound = max(maxRatioValueFound, autosensData.autosensResult.ratio - 1) - minRatioValueFound = min(minRatioValueFound, autosensData.autosensResult.ratio - 1) + ratioArray.add(ScaledDataPoint(time, 100.0 * (autosensData.autosensResult.ratio - 1), ratioScale)) + maxRatioValueFound = max(maxRatioValueFound, 100.0 * (autosensData.autosensResult.ratio - 1)) + minRatioValueFound = min(minRatioValueFound, 100.0 * (autosensData.autosensResult.ratio - 1)) } time += 5 * 60 * 1000L } From 8bba73a6cac1e27e25318cffbb253f041e7cf24d Mon Sep 17 00:00:00 2001 From: Philoul Date: Thu, 8 Apr 2021 11:24:10 +0200 Subject: [PATCH 05/27] Fix Plugin Type for BGSource in PluginStore.kt I don't know if it could have side effect... --- .../nightscout/androidaps/plugins/configBuilder/PluginStore.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/PluginStore.kt b/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/PluginStore.kt index 05b020fac4..f0945429c5 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/PluginStore.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/PluginStore.kt @@ -118,7 +118,7 @@ class PluginStore @Inject constructor( (activeBgSourceStore as PluginBase).setPluginEnabled(PluginType.BGSOURCE, true) aapsLogger.debug(LTag.CONFIGBUILDER, "Defaulting BgInterface") } - setFragmentVisiblities((activeBgSourceStore as PluginBase).name, pluginsInCategory, PluginType.PUMP) + setFragmentVisiblities((activeBgSourceStore as PluginBase).name, pluginsInCategory, PluginType.BGSOURCE) // PluginType.PUMP pluginsInCategory = getSpecificPluginsList(PluginType.PUMP) From f95d4725f19a49b3b6f274e8f54b215658eaa559 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Tue, 13 Apr 2021 19:43:58 +0200 Subject: [PATCH 06/27] fix tests --- .../general/smsCommunicator/SmsCommunicatorPluginTest.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/general/smsCommunicator/SmsCommunicatorPluginTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/general/smsCommunicator/SmsCommunicatorPluginTest.kt index 7807e57751..f9cfa60794 100644 --- a/app/src/test/java/info/nightscout/androidaps/plugins/general/smsCommunicator/SmsCommunicatorPluginTest.kt +++ b/app/src/test/java/info/nightscout/androidaps/plugins/general/smsCommunicator/SmsCommunicatorPluginTest.kt @@ -245,6 +245,12 @@ class SmsCommunicatorPluginTest : TestBaseWithProfile() { `when`(resourceHelper.gs(R.string.smscommunicator_pumpdisconnected)).thenReturn("Pump disconnected") `when`(resourceHelper.gs(R.string.smscommunicator_code_from_authenticator_for)).thenReturn("from Authenticator app for: %1\$s followed by PIN") `when`(resourceHelper.gs(R.string.patient_name_default)).thenReturn("User") + `when`(resourceHelper.gsNotLocalised(R.string.loopsuspended)).thenReturn("Loop suspended") + `when`(resourceHelper.gsNotLocalised(R.string.smscommunicator_stoppedsms)).thenReturn("SMS Remote Service stopped. To reactivate it, use AAPS on master smartphone.") + `when`(resourceHelper.gsNotLocalised(R.string.profileswitchcreated)).thenReturn("Profile switch created") + `when`(resourceHelper.gsNotLocalised(R.string.smscommunicator_tempbasalcanceled)).thenReturn("Temp basal canceled") + `when`(resourceHelper.gsNotLocalised(R.string.smscommunicator_calibrationsent)).thenReturn("Calibration sent. Receiving must be enabled in xDrip+.") + `when`(resourceHelper.gsNotLocalised(R.string.smscommunicator_tt_canceled)).thenReturn("Temp Target canceled successfully") } From e57c9ea0b826615c82e34bde3830045edb926222 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Tue, 13 Apr 2021 22:52:40 +0200 Subject: [PATCH 07/27] utils -> kt --- .idea/codeStyles/Project.xml | 16 --- .../androidaps/db/DatabaseHelper.java | 2 +- .../aps/openAPSAMA/OpenAPSAMAFragment.kt | 15 ++- .../aps/openAPSSMB/OpenAPSSMBFragment.kt | 15 ++- .../androidaps/utils/JSONFormatter.java | 126 ------------------ .../androidaps/utils/JSONFormatter.kt | 113 ++++++++++++++++ .../utils/NumberPickerVertical.java | 26 ---- .../androidaps/utils/NumberPickerVertical.kt | 17 +++ .../androidaps/utils/PercentageSplitter.java | 22 --- .../androidaps/utils/PercentageSplitter.kt | 21 +++ .../androidaps/utils/SPBackupAgent.java | 17 --- .../androidaps/utils/SPBackupAgent.kt | 16 +++ .../logging/StacktraceLoggerWrapper.kt | 4 - .../cgms/MedtronicCGMSHistoryDecoder.java | 10 +- 14 files changed, 189 insertions(+), 231 deletions(-) delete mode 100644 app/src/main/java/info/nightscout/androidaps/utils/JSONFormatter.java create mode 100644 app/src/main/java/info/nightscout/androidaps/utils/JSONFormatter.kt delete mode 100644 app/src/main/java/info/nightscout/androidaps/utils/NumberPickerVertical.java create mode 100644 app/src/main/java/info/nightscout/androidaps/utils/NumberPickerVertical.kt delete mode 100644 app/src/main/java/info/nightscout/androidaps/utils/PercentageSplitter.java create mode 100644 app/src/main/java/info/nightscout/androidaps/utils/PercentageSplitter.kt delete mode 100644 app/src/main/java/info/nightscout/androidaps/utils/SPBackupAgent.java create mode 100644 app/src/main/java/info/nightscout/androidaps/utils/SPBackupAgent.kt diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index 3542887fac..ff53f4004f 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -2,22 +2,6 @@