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:
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.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…
Reference in a new issue