AsyncTask terminating with exception calls onCancelled
Test: cts/tests/tests/os/src/android/os/cts/AsyncTaskTest.java b/30304893 Change-Id: Icb50cda8026ddd70d457b5e62eb29c81313ee47d
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user