I've run into a case where my activity was paused, and from the onPause()
method I canceled my AsyncTask
. However, my logs show the following events in chronological order:
OnPause
calledAsyncTask
is canceled fromOnPause
.cancel(false)
returnstrue
indicating the task was successfully cancelled.onPostExecute
is called, despite the contract that it won't ever be called if cancelled.
Has anyone seen this? Are LogCat messages guaranteed to be presented in accurate order?