After calling AsyncTask.cancel(true) from within doInBackground(), instead of calling onCancelled(), Android calls onPostExecut
AsyncTask.cancel(true)
doInBackground()
onCancelled()
onPostExecut
You should return null and treat the return in the onPostExecute.