From 73b6235188f9e22413178c0f0b6982db3e549b38 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Fri, 11 Aug 2017 22:46:08 +0200 Subject: [PATCH 1/3] APSRequest Answers event --- .../info/nightscout/androidaps/plugins/Loop/LoopPlugin.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Loop/LoopPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/Loop/LoopPlugin.java index d3f59de5ad..6e459a03b2 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Loop/LoopPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Loop/LoopPlugin.java @@ -10,6 +10,8 @@ import android.os.Handler; import android.os.HandlerThread; import android.support.v7.app.NotificationCompat; +import com.crashlytics.android.answers.Answers; +import com.crashlytics.android.answers.CustomEvent; import com.squareup.otto.Subscribe; import org.json.JSONException; @@ -277,6 +279,7 @@ public class LoopPlugin implements PluginBase { @Override public void run() { final PumpEnactResult applyResult = configBuilder.applyAPSRequest(resultAfterConstraints); + Answers.getInstance().logCustom(new CustomEvent("APSRequest")); if (applyResult.enacted || applyResult.success) { lastRun.setByPump = applyResult; lastRun.lastEnact = lastRun.lastAPSRun; From f861546e12b50c6de93a88ce5634a472e479912f Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Sat, 12 Aug 2017 11:20:56 +0200 Subject: [PATCH 2/3] Quickfix to avoid crashes after staleData merge --- .../plugins/NSClientInternal/data/NSSettingsStatus.java | 2 ++ 1 file changed, 2 insertions(+) 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 189474c9c8..4829af714e 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 @@ -201,6 +201,7 @@ public class NSSettingsStatus { private String getStringOrNull(String key) { String ret = null; + if(data == null) return null; if (data.has(key)) { try { ret = data.getString(key); @@ -309,6 +310,7 @@ public class NSSettingsStatus { public JSONObject extentendedPumpSettings() { try { JSONObject extended = getExtendedSettings(); + if(extended == null) return null; if (extended.has("pump")) { JSONObject pump = extended.getJSONObject("pump"); return pump; From 8caaeeff2a648234913eb1a51feef57261ab6a61 Mon Sep 17 00:00:00 2001 From: Timm Korte Date: Sun, 13 Aug 2017 14:32:37 +0200 Subject: [PATCH 3/3] change logfile name pattern to still be rotated once a day but include the hour-minute-seconds as timestamp in the filename --- app/src/main/assets/logback.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/assets/logback.xml b/app/src/main/assets/logback.xml index 41ed7bdefe..1e18709044 100644 --- a/app/src/main/assets/logback.xml +++ b/app/src/main/assets/logback.xml @@ -6,7 +6,7 @@ - ${EXT_FILES_DIR}/AndroidAPS._%d{yyyy-MM-dd}.%i.zip + ${EXT_FILES_DIR}/AndroidAPS._%d{yyyy-MM-dd}_%d{HH-mm-ss, aux}_.%i.zip 5MB