mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-19 05:38:31 +00:00
Use dedicated widget executor
This commit is contained in:
parent
0783d43d5e
commit
31b3377c10
1 changed files with 4 additions and 1 deletions
|
@ -38,11 +38,14 @@ import androidx.preference.PreferenceManager;
|
||||||
import java.text.NumberFormat;
|
import java.text.NumberFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.concurrent.ExecutorService;
|
||||||
|
|
||||||
public class Widget extends AppWidgetProvider {
|
public class Widget extends AppWidgetProvider {
|
||||||
|
private static final ExecutorService executor = Helper.getBackgroundExecutor(0, "widget");
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onUpdate(final Context context, final AppWidgetManager appWidgetManager, final int[] appWidgetIds) {
|
public void onUpdate(final Context context, final AppWidgetManager appWidgetManager, final int[] appWidgetIds) {
|
||||||
Helper.getParallelExecutor().submit(new Runnable() {
|
executor.submit(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||||
|
|
Loading…
Reference in a new issue