1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-31 20:25:38 +00:00

Use dedicated widget executor

This commit is contained in:
M66B 2023-02-02 20:56:41 +01:00
parent 0783d43d5e
commit 31b3377c10

View file

@ -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);