Small improvements

This commit is contained in:
M66B
2021-09-11 17:52:43 +02:00
parent 47c9c49bba
commit a823be8a2d
5 changed files with 8 additions and 9 deletions

View File

@@ -95,10 +95,8 @@ public abstract class SimpleTask<T> implements LifecycleObserver {
return localExecutor;
if (globalExecutor == null) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
int threads = prefs.getInt("query_threads", Runtime.getRuntime().availableProcessors());
Log.i("Task threads=" + threads);
globalExecutor = Helper.getBackgroundExecutor(threads, "task");
int processors = Runtime.getRuntime().availableProcessors();
globalExecutor = Helper.getBackgroundExecutor(processors, "task");
}
return globalExecutor;