Fix the bug in LoadBodyTask.

doInBackground() returned a string[] when error, but onPostExecute() expects
null.

Also added isCancelled() check, just in case.

Bug 2918930

Change-Id: Ie87ff2e2e5b7c3fd77a062944759d03f8f09d3d9
This commit is contained in:
Makoto Onuki 2010-08-13 15:42:12 -07:00
parent 2866a0a8d7
commit 8479032c12

View File

@ -660,13 +660,13 @@ public abstract class MessageViewFragmentBase extends Fragment implements View.O
// database calls, such as IllegalStateException
Log.d(Email.LOG_TAG, "Exception while loading message body: " + re.toString());
mErrorLoadingMessageBody = true;
return new String[] { null, null };
return null;
}
}
@Override
protected void onPostExecute(String[] results) {
if (results == null) {
if (results == null || isCancelled()) {
if (mErrorLoadingMessageBody) {
Utility.showToast(getActivity(), R.string.error_loading_message_body);
}