mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-24 02:12:15 -05:00
Make sure ActivityListener.getOperation() never returns null
This commit is contained in:
parent
0878de5936
commit
93be25bf37
@ -23,14 +23,14 @@ public class ActivityListener extends MessagingListener {
|
|||||||
|
|
||||||
|
|
||||||
public String formatHeader(Context context, String activityPrefix, int unreadMessageCount, DateFormat timeFormat) {
|
public String formatHeader(Context context, String activityPrefix, int unreadMessageCount, DateFormat timeFormat) {
|
||||||
String operation = getOperation(context, timeFormat);
|
String operation = getOperation(context, timeFormat);
|
||||||
return context.getString(R.string.activity_header_format, activityPrefix,
|
return context.getString(R.string.activity_header_format, activityPrefix,
|
||||||
(unreadMessageCount > 0 ? context.getString(R.string.activity_unread_count, unreadMessageCount) : ""),
|
(unreadMessageCount > 0 ? context.getString(R.string.activity_unread_count, unreadMessageCount) : ""),
|
||||||
operation);
|
operation);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getOperation(Context context, DateFormat timeFormat){
|
public String getOperation(Context context, DateFormat timeFormat){
|
||||||
String operation = null;
|
String operation;
|
||||||
String progress = null;
|
String progress = null;
|
||||||
if (mLoadingAccountDescription != null
|
if (mLoadingAccountDescription != null
|
||||||
|| mSendingAccountDescription != null
|
|| mSendingAccountDescription != null
|
||||||
@ -61,6 +61,8 @@ public class ActivityListener extends MessagingListener {
|
|||||||
operation = context.getString(R.string.status_processing_account, mProcessingAccountDescription,
|
operation = context.getString(R.string.status_processing_account, mProcessingAccountDescription,
|
||||||
mProcessingCommandTitle != null ? mProcessingCommandTitle : "",
|
mProcessingCommandTitle != null ? mProcessingCommandTitle : "",
|
||||||
progress);
|
progress);
|
||||||
|
} else {
|
||||||
|
operation = "";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
long nextPollTime = MailService.getNextPollTime();
|
long nextPollTime = MailService.getNextPollTime();
|
||||||
|
Loading…
Reference in New Issue
Block a user