This worker thread shouldn't be prioritized at the same level as user
tasks, preemptions of ui threads may result. Additionally, if we lower
its priority level, it will be scheduled on more efficient cores
in big little systems.
Change-Id: I49a7df6fb43d6c067aeacf9ff0cbd5477cb42f7d
import android.util.Slog;
import android.util.SparseArray;
import android.util.Xml;
+import android.os.Process;
import com.android.internal.util.FastXmlSerializer;
import com.android.internal.util.XmlUtils;
@Override
public void run() {
+ Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
ArraySet<Integer> persistentTaskIds = new ArraySet<Integer>();
while (true) {
// We can't lock mService while holding TaskPersister.this, but we don't want to