summaryrefslogtreecommitdiff
path: root/core/java/android/os/AsyncTask.java
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2011-09-16 20:44:06 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-09-16 20:44:06 -0700
commit99f801da15d73272b99487b5694b29a1c2189439 (patch)
tree58d8c1f847ed5f9a562eecfc16456a5b5d828881 /core/java/android/os/AsyncTask.java
parent6dafefb0f44c4e57384e2ec3e08fefac5cc7e071 (diff)
Revert "Forces AsyncTask to use the main looper Bug #5333924"
This reverts commit 6dafefb0f44c4e57384e2ec3e08fefac5cc7e071 This change is breaking the system on startup with an NPE. Need to fix that first then resubmit.
Diffstat (limited to 'core/java/android/os/AsyncTask.java')
-rw-r--r--core/java/android/os/AsyncTask.java8
1 files changed, 1 insertions, 7 deletions
diff --git a/core/java/android/os/AsyncTask.java b/core/java/android/os/AsyncTask.java
index 6a512a96f373..64bba54b2cee 100644
--- a/core/java/android/os/AsyncTask.java
+++ b/core/java/android/os/AsyncTask.java
@@ -237,7 +237,6 @@ public abstract class AsyncTask<Params, Progress, Result> {
/** @hide Used to force static handler to be created. */
public static void init() {
- // TODO: This doesn't do anything, we should get rid of it
sHandler.getLooper();
}
@@ -255,7 +254,6 @@ public abstract class AsyncTask<Params, Progress, Result> {
mTaskInvoked.set(true);
Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
- //noinspection unchecked
return postResult(doInBackground(mParams));
}
};
@@ -290,7 +288,7 @@ public abstract class AsyncTask<Params, Progress, Result> {
}
private Result postResult(Result result) {
- @SuppressWarnings({"unchecked"}) Message message = sHandler.obtainMessage(MESSAGE_POST_RESULT,
+ Message message = sHandler.obtainMessage(MESSAGE_POST_RESULT,
new AsyncTaskResult<Result>(this, result));
message.sendToTarget();
return result;
@@ -600,10 +598,6 @@ public abstract class AsyncTask<Params, Progress, Result> {
}
private static class InternalHandler extends Handler {
- InternalHandler() {
- super(Looper.getMainLooper());
- }
-
@SuppressWarnings({"unchecked", "RawUseOfParameterizedType"})
@Override
public void handleMessage(Message msg) {