OSDN Git Service

Fix AsyncTask to handle exceptions in doInBackground
authorTony Mantler <nicoya@google.com>
Fri, 5 Aug 2016 21:08:06 +0000 (14:08 -0700)
committerTony Mantler <nicoya@google.com>
Fri, 5 Aug 2016 22:03:45 +0000 (22:03 +0000)
commit78a8e9d2939dcb7be3d3a656c6ac630f17d73854
tree9f2682cb846926cf08ed0631fad7d9002f13bf1b
parentba8f3d03ac43800c5b962d6559b592d6adb5b678
Fix AsyncTask to handle exceptions in doInBackground

When cancelling, the exception will be eaten by FutureTask, but
onCancelled would end up never being called due to the exception
causing the code to skip calling postResult.

b/30304893

Change-Id: I47d859d9ef77245889816b2b6e10bb380bc4979b
core/java/android/os/AsyncTask.java