public void showFetchingMailNotification(Account account, Folder folder) {
String accountName = account.getDescription();
String folderServerId = folder.getServerId();
String folderName = folder.getName();
String tickerText = resourceProvider.checkingMailTicker(accountName, folderName);
String title = resourceProvider.checkingMailTitle();
String text = accountName + resourceProvider.checkingMailSeparator() + folderName;
int notificationId = NotificationIds.getFetchingMailNotificationId(account);
PendingIntent showMessageListPendingIntent = actionBuilder.createViewFolderPendingIntent(
account, folderServerId, notificationId);
NotificationCompat.Builder builder = notificationHelper.createNotificationBuilder(account,
NotificationChannelManager.ChannelType.MISCELLANEOUS)
.setSmallIcon(resourceProvider.getIconCheckingMail())
.setWhen(System.currentTimeMillis())
.setOngoing(true)
.setTicker(tickerText)
.setContentTitle(title)
.setContentText(text)
.setContentIntent(showMessageListPendingIntent)
.setVisibility(NotificationCompat.VISIBILITY_PUBLIC)
.setCategory(NotificationCompat.CATEGORY_SERVICE);
if (NOTIFICATION_LED_WHILE_SYNCING) {
notificationHelper.configureNotification(builder, null, null,
account.getNotificationSetting().getLedColor(),
NOTIFICATION_LED_BLINK_FAST, true);
}
getNotificationManager().notify(notificationId, builder.build());
}