From caa109dbfd7c5863accf2cf41df5adba2facd09c Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Thu, 9 Feb 2017 16:32:44 +0100 Subject: [PATCH] use SafeParse in DanaRStartsActivity --- .../androidaps/plugins/DanaR/History/DanaRStatsActivity.java | 3 ++- .../plugins/DanaRKorean/History/DanaRStatsActivity.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/DanaR/History/DanaRStatsActivity.java b/app/src/main/java/info/nightscout/androidaps/plugins/DanaR/History/DanaRStatsActivity.java index 4e75c4c999..1ded51f982 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/DanaR/History/DanaRStatsActivity.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/DanaR/History/DanaRStatsActivity.java @@ -56,6 +56,7 @@ import info.nightscout.androidaps.plugins.DanaR.comm.RecordTypes; import info.nightscout.androidaps.plugins.DanaR.events.EventDanaRConnectionStatus; import info.nightscout.androidaps.plugins.DanaR.events.EventDanaRSyncStatus; import info.nightscout.utils.DecimalFormatter; +import info.nightscout.utils.SafeParse; import info.nightscout.utils.ToastUtils; public class DanaRStatsActivity extends Activity { @@ -366,7 +367,7 @@ public class DanaRStatsActivity extends Activity { return; } else { - magicNumber = Double.parseDouble(TBB); + magicNumber = SafeParse.stringToDouble(TBB); } magicNumber *=2; diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/DanaRKorean/History/DanaRStatsActivity.java b/app/src/main/java/info/nightscout/androidaps/plugins/DanaRKorean/History/DanaRStatsActivity.java index bf7a7c4321..995924b9c7 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/DanaRKorean/History/DanaRStatsActivity.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/DanaRKorean/History/DanaRStatsActivity.java @@ -56,6 +56,7 @@ import info.nightscout.androidaps.plugins.DanaR.events.EventDanaRConnectionStatu import info.nightscout.androidaps.plugins.DanaR.events.EventDanaRSyncStatus; import info.nightscout.androidaps.plugins.DanaRKorean.Services.ExecutionService; import info.nightscout.utils.DecimalFormatter; +import info.nightscout.utils.SafeParse; import info.nightscout.utils.ToastUtils; public class DanaRStatsActivity extends Activity { @@ -366,7 +367,7 @@ public class DanaRStatsActivity extends Activity { return; } else { - magicNumber = Double.parseDouble(TBB); + magicNumber = SafeParse.stringToDouble(TBB); } magicNumber *=2;