Tighten up AsyncTask's semantics and behavior.
Bug #3109366
Bug #3109382

The new behavior of AsyncTask is the following:
- Unchanged if you don't call cancel()
- If you call cancel():
  - Either onCancelled() *OR* onPostExecute() is invoked
  - onCancelled() is invoked only after doInBackground() finishes

Change-Id: If53faec5890d2fa7098aea76973186a0b1026b39
2 files changed