lowest priority for background calculations
This commit is contained in:
parent
23e37a8be7
commit
620c56e4cb
1 changed files with 6 additions and 5 deletions
|
@ -2,6 +2,7 @@ package info.nightscout.androidaps.plugins.IobCobCalculator;
|
||||||
|
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.HandlerThread;
|
import android.os.HandlerThread;
|
||||||
|
import android.os.Process;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
import android.support.v4.util.LongSparseArray;
|
import android.support.v4.util.LongSparseArray;
|
||||||
|
|
||||||
|
@ -134,7 +135,7 @@ public class IobCobCalculatorPlugin implements PluginBase {
|
||||||
IobCobCalculatorPlugin() {
|
IobCobCalculatorPlugin() {
|
||||||
MainApp.bus().register(this);
|
MainApp.bus().register(this);
|
||||||
if (sHandlerThread == null) {
|
if (sHandlerThread == null) {
|
||||||
sHandlerThread = new HandlerThread(IobCobCalculatorPlugin.class.getSimpleName());
|
sHandlerThread = new HandlerThread(IobCobCalculatorPlugin.class.getSimpleName(), Process.THREAD_PRIORITY_LOWEST);
|
||||||
sHandlerThread.start();
|
sHandlerThread.start();
|
||||||
sHandler = new Handler(sHandlerThread.getLooper());
|
sHandler = new Handler(sHandlerThread.getLooper());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue