Use dedicated widget executor

pull/212/head
M66B 2 years ago
parent 0783d43d5e
commit 31b3377c10

@ -38,11 +38,14 @@ import androidx.preference.PreferenceManager;
import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ExecutorService;
public class Widget extends AppWidgetProvider {
private static final ExecutorService executor = Helper.getBackgroundExecutor(0, "widget");
@Override
public void onUpdate(final Context context, final AppWidgetManager appWidgetManager, final int[] appWidgetIds) {
Helper.getParallelExecutor().submit(new Runnable() {
executor.submit(new Runnable() {
@Override
public void run() {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);

Loading…
Cancel
Save