diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/NewInsulinDialog.java b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/NewInsulinDialog.java index 6455a3cd0c..b6059f85be 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/NewInsulinDialog.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/NewInsulinDialog.java @@ -162,7 +162,7 @@ public class NewInsulinDialog extends DialogFragment implements OnClickListener, private String toSignedString(double value) { String formatted = DecimalFormatter.toPumpSupportedBolus(value); - return value < 0 ? "-" + formatted : formatted; + return value > 0 ? "+" + formatted : formatted; } @Override diff --git a/app/src/main/java/info/nightscout/utils/NSUpload.java b/app/src/main/java/info/nightscout/utils/NSUpload.java index a0102253b0..9f26d01fea 100644 --- a/app/src/main/java/info/nightscout/utils/NSUpload.java +++ b/app/src/main/java/info/nightscout/utils/NSUpload.java @@ -179,7 +179,7 @@ public class NSUpload { DbLogger.dbAdd(intent, data.toString()); } - private static String getNextAvailableSecond(long time) { + private static synchronized String getNextAvailableSecond(long time) { long second = time - time % 1000; if (second == lastUsedSecond) second += 1000; lastUsedSecond = second;