diff --git a/src/com/android/email/activity/EmailActivity.java b/src/com/android/email/activity/EmailActivity.java index ca7ef4cb2..11359c0df 100644 --- a/src/com/android/email/activity/EmailActivity.java +++ b/src/com/android/email/activity/EmailActivity.java @@ -383,30 +383,19 @@ public class EmailActivity extends Activity implements View.OnClickListener, Fra } } } else { - // Connection error; show the error message banner - new EmailAsyncTask(mTaskTracker) { - @Override - protected String doInBackground(Void... params) { - Account account = - Account.restoreAccountWithId(EmailActivity.this, accountId); - return (account == null) ? null : account.mDisplayName; - } - - @Override - protected void onSuccess(String accountName) { - String message = - MessagingExceptionStrings.getErrorString(EmailActivity.this, result); - if (!TextUtils.isEmpty(accountName)) { - // TODO Use properly designed layout. Don't just concatenate strings; - // which is generally poor for I18N. - message = message + " (" + accountName + ")"; - } - if (mErrorBanner.show(message)) { - mLastErrorAccountId = accountId; - } - } - }.executeParallel(); - } + Account account = Account.restoreAccountWithId(EmailActivity.this, accountId); + if (account == null) return; + String message = + MessagingExceptionStrings.getErrorString(EmailActivity.this, result); + if (!TextUtils.isEmpty(account.mDisplayName)) { + // TODO Use properly designed layout. Don't just concatenate strings; + // which is generally poor for I18N. + message = message + " (" + account.mDisplayName + ")"; + } + if (mErrorBanner.show(message)) { + mLastErrorAccountId = accountId; + } + } } } }