@Test public void testCreateBigTextStyleNotification() throws Exception { Account account = createFakeAccount(); int notificationId = 23; NotificationHolder holder = createNotificationHolder(notificationId); Builder builder = notifications.createBigTextStyleNotification(account, holder, notificationId); verify(builder).setTicker(NOTIFICATION_SUMMARY); verify(builder).setGroup("newMailNotifications-" + ACCOUNT_NUMBER); verify(builder).setContentTitle(SENDER); verify(builder).setContentText(SUBJECT); verify(builder).setSubText(ACCOUNT_NAME); BigTextStyle bigTextStyle = notifications.bigTextStyle; verify(bigTextStyle).bigText(NOTIFICATION_PREVIEW); verify(builder).setStyle(bigTextStyle); }
protected NotificationCompat.Builder createBigTextStyleNotification(Account account, NotificationHolder holder, int notificationId) { String accountName = controller.getAccountName(account); NotificationContent content = holder.content; String groupKey = NotificationGroupKeys.getGroupKey(account); NotificationCompat.Builder builder = createAndInitializeNotificationBuilder(account) .setTicker(content.summary) .setGroup(groupKey) .setContentTitle(content.sender) .setContentText(content.subject) .setSubText(accountName); NotificationCompat.BigTextStyle style = createBigTextStyle(builder); style.bigText(content.preview); builder.setStyle(style); PendingIntent contentIntent = actionCreator.createViewMessagePendingIntent( content.messageReference, notificationId); builder.setContentIntent(contentIntent); return builder; }
BaseNotifications { protected NotificationCompat.Builder createBigTextStyleNotification(Account account, NotificationHolder holder, int notificationId) { String accountName = controller.getAccountName(account); NotificationContent content = holder.content; String groupKey = NotificationGroupKeys.getGroupKey(account); NotificationCompat.Builder builder = createAndInitializeNotificationBuilder(account) .setTicker(content.summary) .setGroup(groupKey) .setContentTitle(content.sender) .setContentText(content.subject) .setSubText(accountName); NotificationCompat.BigTextStyle style = createBigTextStyle(builder); style.bigText(content.preview); builder.setStyle(style); PendingIntent contentIntent = actionCreator.createViewMessagePendingIntent( content.messageReference, notificationId); builder.setContentIntent(contentIntent); return builder; } }
BaseNotifications { protected NotificationCompat.Builder createBigTextStyleNotification(Account account, NotificationHolder holder, int notificationId) { String accountName = controller.getAccountName(account); NotificationContent content = holder.content; String groupKey = NotificationGroupKeys.getGroupKey(account); NotificationCompat.Builder builder = createAndInitializeNotificationBuilder(account) .setTicker(content.summary) .setGroup(groupKey) .setContentTitle(content.sender) .setContentText(content.subject) .setSubText(accountName); NotificationCompat.BigTextStyle style = createBigTextStyle(builder); style.bigText(content.preview); builder.setStyle(style); PendingIntent contentIntent = actionCreator.createViewMessagePendingIntent( content.messageReference, notificationId); builder.setContentIntent(contentIntent); return builder; } protected  BaseNotifications(NotificationController controller, NotificationActionCreator actionCreator); }
BaseNotifications { protected NotificationCompat.Builder createBigTextStyleNotification(Account account, NotificationHolder holder, int notificationId) { String accountName = controller.getAccountName(account); NotificationContent content = holder.content; String groupKey = NotificationGroupKeys.getGroupKey(account); NotificationCompat.Builder builder = createAndInitializeNotificationBuilder(account) .setTicker(content.summary) .setGroup(groupKey) .setContentTitle(content.sender) .setContentText(content.subject) .setSubText(accountName); NotificationCompat.BigTextStyle style = createBigTextStyle(builder); style.bigText(content.preview); builder.setStyle(style); PendingIntent contentIntent = actionCreator.createViewMessagePendingIntent( content.messageReference, notificationId); builder.setContentIntent(contentIntent); return builder; } protected  BaseNotifications(NotificationController controller, NotificationActionCreator actionCreator);  }
BaseNotifications { protected NotificationCompat.Builder createBigTextStyleNotification(Account account, NotificationHolder holder, int notificationId) { String accountName = controller.getAccountName(account); NotificationContent content = holder.content; String groupKey = NotificationGroupKeys.getGroupKey(account); NotificationCompat.Builder builder = createAndInitializeNotificationBuilder(account) .setTicker(content.summary) .setGroup(groupKey) .setContentTitle(content.sender) .setContentText(content.subject) .setSubText(accountName); NotificationCompat.BigTextStyle style = createBigTextStyle(builder); style.bigText(content.preview); builder.setStyle(style); PendingIntent contentIntent = actionCreator.createViewMessagePendingIntent( content.messageReference, notificationId); builder.setContentIntent(contentIntent); return builder; } protected  BaseNotifications(NotificationController controller, NotificationActionCreator actionCreator);   }