Added import result dialog

This commit is contained in:
M66B
2021-10-07 09:12:26 +02:00
parent c24a4cb4a1
commit eb915d20b4
4 changed files with 126 additions and 25 deletions

View File

@@ -298,6 +298,26 @@ public abstract class SimpleTask<T> implements LifecycleObserver {
protected abstract T onExecute(Context context, Bundle args) throws Throwable;
protected void postProgress(CharSequence status) {
postProgress(status, null);
}
protected void postProgress(CharSequence status, Bundle data) {
ApplicationEx.getMainHandler().post(new Runnable() {
@Override
public void run() {
try {
onProgress(status, data);
} catch (Throwable ex) {
Log.e(ex);
}
}
});
}
protected void onProgress(CharSequence status, Bundle data) {
}
protected void onExecuted(Bundle args, T data) {
}