diff options
| -rw-r--r-- | core/java/android/app/Notification.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java index 1b71e73db852..cc72d8f1ad8c 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -9526,14 +9526,21 @@ public class Notification implements Parcelable .viewType(viewType) .highlightExpander(isConversationLayout) .hideProgress(true) - .text(null) .hideLeftIcon(isOneToOne) .hideRightIcon(hideRightIcons || isOneToOne); if (notificationsRedesignTemplates()) { + String lastMessage = !mMessages.isEmpty() + ? mMessages.getLast().mText.toString() : null; + p.title(conversationTitle) + // The text is not actually displayed like this (since we're using a + // MessagingLinearLayout instead of the regular text), but we're using it to + // know whether the notification will have a second line in practice. + .text(lastMessage) .hideAppName(isCollapsed); } else { p.title(isLegacyHeaderless ? conversationTitle : null) + .text(null) .headerTextSecondary(isLegacyHeaderless ? null : conversationTitle); } RemoteViews contentView = mBuilder.applyStandardTemplateWithActions( |