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:
parent
2866a0a8d7
commit
8479032c12
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user