From c8ba4076c6aa5a3f738ede153f5302c5347d19d8 Mon Sep 17 00:00:00 2001 From: Jamorham Date: Thu, 25 Jan 2018 20:55:02 +0000 Subject: [PATCH] Update Helpers --- .../androidaps/plugins/PumpInsight/utils/Helpers.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpInsight/utils/Helpers.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpInsight/utils/Helpers.java index 0f4a386636..08b65a1f7a 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpInsight/utils/Helpers.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpInsight/utils/Helpers.java @@ -3,11 +3,13 @@ package info.nightscout.androidaps.plugins.PumpInsight.utils; import android.content.Context; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; +import android.os.Handler; import android.util.Log; import java.util.HashMap; import java.util.Map; +import info.nightscout.androidaps.MainApp; import info.nightscout.androidaps.plugins.PumpInsight.connector.Connector; /** @@ -59,4 +61,9 @@ public class Helpers { return false; } } + + public static boolean runOnUiThreadDelayed(Runnable theRunnable, long delay) { + return new Handler(MainApp.instance().getMainLooper()).postDelayed(theRunnable, delay); + } + }