android - onPostExecute on cancelled AsyncTask -
does onpostexecute
execute if asynctask
has been cancelled?
if execute, safe should ask if task has been cancelled (iscancelled
) @ start of onpostexecute
, before doing else?
the documented behaviour of onpostexecute on cancel() changed between android 2 , android 4.
runs on ui thread after doinbackground. specified result value returned doinbackground or null if task cancelled or exception occured.
runs on ui thread after doinbackground. specified result value returned doinbackground. method won't invoked if task cancelled.
so if still targeting android 2 devices should assume onpostexecute called , in onpostexecute check null result.
Comments
Post a Comment