diff options
Diffstat (limited to 'src/github/daneren2005/dsub/util/SilentBackgroundTask.java')
-rw-r--r-- | src/github/daneren2005/dsub/util/SilentBackgroundTask.java | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/src/github/daneren2005/dsub/util/SilentBackgroundTask.java b/src/github/daneren2005/dsub/util/SilentBackgroundTask.java index 7bceb467..f361954a 100644 --- a/src/github/daneren2005/dsub/util/SilentBackgroundTask.java +++ b/src/github/daneren2005/dsub/util/SilentBackgroundTask.java @@ -24,37 +24,13 @@ import android.app.Activity; * @author Sindre Mehus */ public abstract class SilentBackgroundTask<T> extends BackgroundTask<T> { - public SilentBackgroundTask(Activity activity) { super(activity); } @Override public void execute() { - Thread thread = new Thread() { - @Override - public void run() { - try { - final T result = doInBackground(); - - getHandler().post(new Runnable() { - @Override - public void run() { - done(result); - } - }); - - } catch (final Throwable t) { - getHandler().post(new Runnable() { - @Override - public void run() { - error(t); - } - }); - } - } - }; - thread.start(); + queue.offer(new Task()); } @Override |