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 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; 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;