lowest priority for background calculations

This commit is contained in:
Milos Kozak 2017-12-04 19:57:09 +01:00
parent 23e37a8be7
commit 620c56e4cb

View file

@ -2,6 +2,7 @@ package info.nightscout.androidaps.plugins.IobCobCalculator;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.Process;
import android.support.annotation.Nullable;
import android.support.v4.util.LongSparseArray;
@ -134,7 +135,7 @@ public class IobCobCalculatorPlugin implements PluginBase {
IobCobCalculatorPlugin() {
MainApp.bus().register(this);
if (sHandlerThread == null) {
sHandlerThread = new HandlerThread(IobCobCalculatorPlugin.class.getSimpleName());
sHandlerThread = new HandlerThread(IobCobCalculatorPlugin.class.getSimpleName(), Process.THREAD_PRIORITY_LOWEST);
sHandlerThread.start();
sHandler = new Handler(sHandlerThread.getLooper());
}