Merge "AsyncTask terminating with exception calls onCancelled" into nyc-mr1-dev

This commit is contained in:
Tony Mantler
2016-09-28 23:25:51 +00:00
committed by Android (Google) Code Review

View File

@@ -304,6 +304,9 @@ public abstract class AsyncTask<Params, Progress, Result> {
//noinspection unchecked
result = doInBackground(mParams);
Binder.flushPendingCommands();
} catch (Throwable tr) {
mCancelled.set(true);
throw tr;
} finally {
postResult(result);
}