|
|
@ -62,6 +62,7 @@ public abstract class SimpleTask<T> implements LifecycleObserver {
|
|
|
|
|
|
|
|
|
|
|
|
private static PowerManager.WakeLock wl = null;
|
|
|
|
private static PowerManager.WakeLock wl = null;
|
|
|
|
private static ExecutorService globalExecutor = null;
|
|
|
|
private static ExecutorService globalExecutor = null;
|
|
|
|
|
|
|
|
private static int themeId = -1;
|
|
|
|
@SuppressLint("StaticFieldLeak")
|
|
|
|
@SuppressLint("StaticFieldLeak")
|
|
|
|
private static Context themedContext = null;
|
|
|
|
private static Context themedContext = null;
|
|
|
|
private static final List<SimpleTask> tasks = new ArrayList<>();
|
|
|
|
private static final List<SimpleTask> tasks = new ArrayList<>();
|
|
|
@ -158,10 +159,11 @@ public abstract class SimpleTask<T> implements LifecycleObserver {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
if (themedContext == null)
|
|
|
|
int themeId = FragmentDialogTheme.getTheme(context);
|
|
|
|
themedContext = new ContextThemeWrapper(
|
|
|
|
if (themedContext == null || SimpleTask.themeId != themeId) {
|
|
|
|
context.getApplicationContext(),
|
|
|
|
SimpleTask.themeId = themeId;
|
|
|
|
FragmentDialogTheme.getTheme(context));
|
|
|
|
themedContext = new ContextThemeWrapper(context.getApplicationContext(), themeId);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
future = getExecutor(context).submit(new Runnable() {
|
|
|
|
future = getExecutor(context).submit(new Runnable() {
|
|
|
|
private Object data;
|
|
|
|
private Object data;
|
|
|
|