@TargetApi(Build.VERSION_CODES.N) private static void createBundledNotifications( Context ctx, Account account, List<NotificationEntity> entities, boolean feedback) { NotificationEntity lastEntity = entities.get(entities.size() - 1); NotificationCompat.Builder builder = createNotificationBuilder(ctx, account, lastEntity, feedback); Person p = new Person.Builder().setName(account.getAccountDisplayName()).build(); NotificationCompat.MessagingStyle style = new NotificationCompat.MessagingStyle(p) .setConversationTitle(lastEntity.mNotification.subject); for (NotificationEntity entity : entities) { final String author = getEventAuthor(ctx, entity); style.addMessage(getContentMessage(ctx, entity, true, false), entity.mWhen, new Person.Builder().setName(author).build()); } builder.setStyle(style) .setNumber(entities.size()) .setGroup(NOTIFICATION_KEY_GROUP + account.getAccountHash()); createInlineReply(ctx, builder, lastEntity); publishNotification(ctx, builder.build(), lastEntity.mGroupId); }