From c35b7bb9d69eb3512ec7d9e142236ceb75875d00 Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Thu, 20 Jul 2017 00:53:05 +0200 Subject: [PATCH 1/5] string comparison --- app/src/main/java/info/nightscout/androidaps/db/TempTarget.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/db/TempTarget.java b/app/src/main/java/info/nightscout/androidaps/db/TempTarget.java index 5aaeea1daa..3bbdcbc06c 100644 --- a/app/src/main/java/info/nightscout/androidaps/db/TempTarget.java +++ b/app/src/main/java/info/nightscout/androidaps/db/TempTarget.java @@ -51,7 +51,7 @@ public class TempTarget implements Interval { return false; if (high != other.high) return false; - if (reason != other.reason) + if (!Objects.equals(reason, other.reason)) return false; if (!Objects.equals(_id, other._id)) return false; From 6daff6fae97546b812de8b8823e759d0a25bfdff Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Thu, 20 Jul 2017 00:53:36 +0200 Subject: [PATCH 2/5] self asignment -> comment --- .../androidaps/plugins/OpenAPSAMA/DetermineBasalResultAMA.java | 2 +- .../androidaps/plugins/OpenAPSMA/DetermineBasalResultMA.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSAMA/DetermineBasalResultAMA.java b/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSAMA/DetermineBasalResultAMA.java index c086ff2cd5..c2a55ff894 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSAMA/DetermineBasalResultAMA.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSAMA/DetermineBasalResultAMA.java @@ -43,7 +43,7 @@ public class DetermineBasalResultAMA extends APSResult { } if (result.contains("duration")) { duration = result.getInteger("duration"); - changeRequested = changeRequested; + //changeRequested as above } else { duration = -1; changeRequested = false; diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSMA/DetermineBasalResultMA.java b/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSMA/DetermineBasalResultMA.java index cb0e67249f..a0cd1a75b0 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSMA/DetermineBasalResultMA.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSMA/DetermineBasalResultMA.java @@ -41,7 +41,7 @@ public class DetermineBasalResultMA extends APSResult { } if (result.contains("duration")) { duration = result.getInteger("duration"); - changeRequested = changeRequested; + //changeRequested as above } else { duration = -1; changeRequested = false; From b5cb68be738d2d3df88763b396dddf4d3dc6f3b9 Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Thu, 20 Jul 2017 00:54:19 +0200 Subject: [PATCH 3/5] remove extra strings --- app/src/main/res/values-it/strings.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 10ed6e1d4c..48cd17b8a1 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -4,9 +4,7 @@ Italiano MM640g assoluto - azioni - attivita\' adulto settaggi avanzati From 1ba11ed00607d5772e710c486d0fb78051a85109 Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Thu, 20 Jul 2017 00:59:08 +0200 Subject: [PATCH 4/5] spanish emptiy string --- app/src/main/res/values-es/strings.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 6aa5dc7979..cb011f510e 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -387,11 +387,10 @@ ENVIAR A BOMBA Media corta delta Bolo: - Ultimo BG: + Último BG: %dmin antes Bolo %.2fU enviado correctamente Rango Objetivo: - Unidades: Sólo se permiten caracteres numéricos Sólo se permiten dígitos en el rango %1$s - %2$s From b72482601ee68f8f2d0c282d1b6ae688912ceb5b Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Thu, 20 Jul 2017 01:01:50 +0200 Subject: [PATCH 5/5] remove unnecessary semicolons --- .../plugins/ConfigBuilder/ConfigBuilderPlugin.java | 1 - .../NSClientInternal/broadcasts/BroadcastStatus.java | 2 +- .../NSClientInternal/data/NSSettingsStatus.java | 8 -------- .../plugins/NSClientInternal/data/NSSgv.java | 6 +++--- .../plugins/NSClientInternal/data/NSTreatment.java | 10 +++++----- .../plugins/Overview/Dialogs/WizardDialog.java | 2 -- .../CircadianPercentageProfileFragment.java | 1 - .../androidaps/plugins/Wear/ActionStringHandler.java | 2 +- 8 files changed, 10 insertions(+), 22 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/ConfigBuilder/ConfigBuilderPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/ConfigBuilder/ConfigBuilderPlugin.java index 239318a6e4..7f7013de73 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/ConfigBuilder/ConfigBuilderPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/ConfigBuilder/ConfigBuilderPlugin.java @@ -83,7 +83,6 @@ public class ConfigBuilderPlugin implements PluginBase, PumpInterface, Constrain MainApp.bus().register(this); PowerManager powerManager = (PowerManager) MainApp.instance().getApplicationContext().getSystemService(Context.POWER_SERVICE); mWakeLock = powerManager.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK, "ConfigBuilderPlugin"); - ; } @Override diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/broadcasts/BroadcastStatus.java b/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/broadcasts/BroadcastStatus.java index 15432c8e79..026658afc0 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/broadcasts/BroadcastStatus.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/broadcasts/BroadcastStatus.java @@ -33,7 +33,7 @@ public class BroadcastStatus { bundle.putInt("nsclientversioncode", MainApp.instance().getPackageManager().getPackageInfo(MainApp.instance().getPackageName(), 0).versionCode); } catch (PackageManager.NameNotFoundException e) { e.printStackTrace(); - }; + } bundle.putString("nightscoutversionname", NSClientService.nightscoutVersionName); bundle.putInt("nightscoutversioncode", NSClientService.nightscoutVersionCode); bundle.putString("status", status.getData().toString()); diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/data/NSSettingsStatus.java b/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/data/NSSettingsStatus.java index 3201d62f6e..4980b342e9 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/data/NSSettingsStatus.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/data/NSSettingsStatus.java @@ -207,8 +207,6 @@ public class NSSettingsStatus { return ret; } - ; - private Integer getIntegerOrNull(String key) { Integer ret = null; if (data.has(key)) { @@ -221,8 +219,6 @@ public class NSSettingsStatus { return ret; } - ; - private Long getLongOrNull(String key) { Long ret = null; if (data.has(key)) { @@ -235,8 +231,6 @@ public class NSSettingsStatus { return ret; } - ; - private Date getDateOrNull(String key) { Date ret = null; if (data.has(key)) { @@ -249,8 +243,6 @@ public class NSSettingsStatus { return ret; } - ; - private boolean getBooleanOrNull(String key) { boolean ret = false; if (data.has(key)) { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/data/NSSgv.java b/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/data/NSSgv.java index c8666f4306..78ddc7a8f7 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/data/NSSgv.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/data/NSSgv.java @@ -24,7 +24,7 @@ public class NSSgv { } } return ret; - }; + } private Integer getIntegerOrNull(String key) { Integer ret = null; @@ -36,7 +36,7 @@ public class NSSgv { } } return ret; - }; + } private Long getLongOrNull(String key) { Long ret = null; @@ -48,7 +48,7 @@ public class NSSgv { } } return ret; - }; + } public JSONObject getData () { return data; } public Integer getMgdl () { return getIntegerOrNull("mgdl"); } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/data/NSTreatment.java b/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/data/NSTreatment.java index 7430caf600..1b48f27e2f 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/data/NSTreatment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/data/NSTreatment.java @@ -25,7 +25,7 @@ public class NSTreatment { } } return ret; - }; + } private Double getDoubleOrNull(String key) { Double ret = null; @@ -37,7 +37,7 @@ public class NSTreatment { } } return ret; - }; + } private Integer getIntegerOrNull(String key) { Integer ret = null; @@ -49,7 +49,7 @@ public class NSTreatment { } } return ret; - }; + } private Long getLongOrNull(String key) { Long ret = null; @@ -61,7 +61,7 @@ public class NSTreatment { } } return ret; - }; + } private Date getDateOrNull(String key) { Date ret = null; @@ -73,7 +73,7 @@ public class NSTreatment { } } return ret; - }; + } public String getAction() { return action; } public JSONObject getData() { return data; } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/WizardDialog.java b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/WizardDialog.java index 0a1b5417a8..5d57f3caf1 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/WizardDialog.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/WizardDialog.java @@ -213,9 +213,7 @@ public class WizardDialog extends DialogFragment implements OnClickListener, Com bgTrendInsulin = (TextView) view.findViewById(R.id.treatments_wizard_bgtrendinsulin); cobLayout = (LinearLayout) view.findViewById(R.id.treatments_wizard_cob_layout); cob = (TextView) view.findViewById(R.id.treatments_wizard_cob); - ; cobInsulin = (TextView) view.findViewById(R.id.treatments_wizard_cobinsulin); - ; bgCheckbox = (CheckBox) view.findViewById(R.id.treatments_wizard_bgcheckbox); bolusIobCheckbox = (CheckBox) view.findViewById(R.id.treatments_wizard_bolusiobcheckbox); diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/ProfileCircadianPercentage/CircadianPercentageProfileFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/ProfileCircadianPercentage/CircadianPercentageProfileFragment.java index c70a66850f..0f0defac27 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/ProfileCircadianPercentage/CircadianPercentageProfileFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/ProfileCircadianPercentage/CircadianPercentageProfileFragment.java @@ -434,7 +434,6 @@ public class CircadianPercentageProfileFragment extends Fragment { if (i == 0) { copyprevbutton.setVisibility(View.INVISIBLE); - ; } else { final int j = i; //needs to be final to be passed to inner class. copyprevbutton.setOnClickListener(new View.OnClickListener() { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Wear/ActionStringHandler.java b/app/src/main/java/info/nightscout/androidaps/plugins/Wear/ActionStringHandler.java index f800d9d531..02ee924923 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Wear/ActionStringHandler.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Wear/ActionStringHandler.java @@ -173,7 +173,7 @@ public class ActionStringHandler { rTitle += " LOOP"; rMessage = "TARGETS:\n" + getTargetsStatus(); rMessage += "\n\n" + getLoopStatus(); - rMessage += "\n\nOAPS RESULT:\n" + getOAPSResultStatus();; + rMessage += "\n\nOAPS RESULT:\n" + getOAPSResultStatus(); } } else if ("wizard".equals(act[0])) {