From 8b8f7f3460fd5e0138b7636c2c4ba1626795aa8d Mon Sep 17 00:00:00 2001 From: Vitaly Polonetsky Date: Thu, 5 May 2011 04:25:58 +0800 Subject: [PATCH] fixed displaying of "(null)" account description in notification at account setup wizard --- src/com/fsck/k9/controller/MessagingController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/fsck/k9/controller/MessagingController.java b/src/com/fsck/k9/controller/MessagingController.java index f37b89318..e05654b1c 100644 --- a/src/com/fsck/k9/controller/MessagingController.java +++ b/src/com/fsck/k9/controller/MessagingController.java @@ -3982,7 +3982,8 @@ public class MessagingController implements Runnable { Intent i = FolderList.actionHandleNotification(context, account, message.getFolder().getName()); PendingIntent pi = PendingIntent.getActivity(context, 0, i, 0); - String accountNotice = context.getString(R.string.notification_new_one_account_fmt, unreadCount, account.getDescription()); + String accountDescr = (account.getDescription() != null) ? account.getDescription() : account.getEmail(); + String accountNotice = context.getString(R.string.notification_new_one_account_fmt, unreadCount, accountDescr); notif.setLatestEventInfo(context, accountNotice, messageNotice, pi); // Only ring or vibrate if we have not done so already on this