Fabric-Log combo init to get an idea of user count.

This commit is contained in:
Johannes Mockenhaupt 2018-01-25 02:47:37 +01:00
parent 01d49f9e52
commit f7ed34532a
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -3,6 +3,9 @@ package info.nightscout.androidaps.plugins.PumpCombo;
import android.os.SystemClock;
import android.support.annotation.NonNull;
import com.crashlytics.android.answers.Answers;
import com.crashlytics.android.answers.CustomEvent;
import org.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -344,6 +347,8 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
}
private synchronized void initializePump() {
Answers.getInstance().logCustom(new CustomEvent("ComboInit")
.putCustomAttribute("buildversion", BuildConfig.BUILDVERSION));
long maxWait = System.currentTimeMillis() + 15 * 1000;
while (!ruffyScripter.isPumpAvailable()) {
log.debug("Waiting for ruffy service to come up ...");