Loading core/java/com/android/internal/widget/ConversationLayout.java +1 −0 Original line number Diff line number Diff line Loading @@ -1178,6 +1178,7 @@ public class ConversationLayout extends FrameLayout } newGroup.setShowingAvatar(!mIsOneToOne && !mIsCollapsed); newGroup.setSingleLine(mIsCollapsed && TextUtils.isEmpty(mSummarizedContent)); newGroup.setIsCollapsed(mIsCollapsed); newGroup.setSender(sender, nameOverride); newGroup.setSending(groupIndex == (groups.size() - 1) && showSpinner); mGroups.add(newGroup); Loading core/java/com/android/internal/widget/MessagingGroup.java +11 −2 Original line number Diff line number Diff line Loading @@ -103,6 +103,7 @@ public class MessagingGroup extends NotificationOptimizedLinearLayout implements private boolean mShowingAvatar = true; private CharSequence mSenderName; private boolean mSingleLine = false; private boolean mIsCollapsed = false; private LinearLayout mContentContainer; private int mRequestedMaxDisplayedLines = Integer.MAX_VALUE; private int mSenderTextPaddingSingleLine; Loading Loading @@ -451,7 +452,7 @@ public class MessagingGroup extends NotificationOptimizedLinearLayout implements private void updateIconVisibility() { if (Flags.notificationsRedesignTemplates()) { // We don't show any icon (other than the app or person icon) in the collapsed form. mMessagingIconContainer.setVisibility(mSingleLine ? GONE : VISIBLE); mMessagingIconContainer.setVisibility(mIsCollapsed ? GONE : VISIBLE); } } Loading Loading @@ -714,10 +715,18 @@ public class MessagingGroup extends NotificationOptimizedLinearLayout implements updateMaxDisplayedLines(); updateClipRect(); updateSenderVisibility(); updateIconVisibility(); } } /** * Sets whether this is in a collapsed layout or not. Certain elements like icons are not shown * when the notification is collapsed. */ public void setIsCollapsed(boolean isCollapsed) { mIsCollapsed = isCollapsed; updateIconVisibility(); } public boolean isSingleLine() { return mSingleLine; } Loading core/java/com/android/internal/widget/MessagingLayout.java +1 −0 Original line number Diff line number Diff line Loading @@ -551,6 +551,7 @@ public class MessagingLayout extends FrameLayout } newGroup.setSingleLine(mIsCollapsed && TextUtils.isEmpty(mSummarizedContent)); newGroup.setShowingAvatar(!mIsCollapsed); newGroup.setIsCollapsed(mIsCollapsed); newGroup.setSender(sender, nameOverride); newGroup.setSending(groupIndex == (groups.size() - 1) && showSpinner); mGroups.add(newGroup); Loading core/java/com/android/internal/widget/PeopleHelper.java +1 −1 Original line number Diff line number Diff line Loading @@ -110,7 +110,7 @@ public class PeopleHelper { @NonNull public Icon createAvatarSymbol(@NonNull CharSequence name, @NonNull String symbol, @ColorInt int layoutColor) { if (symbol.isEmpty() || TextUtils.isDigitsOnly(symbol) if (symbol == null || symbol.isEmpty() || TextUtils.isDigitsOnly(symbol) || SPECIAL_CHAR_PATTERN.matcher(symbol).find()) { Icon avatarIcon = Icon.createWithResource(mContext, R.drawable.messaging_user); avatarIcon.setTint(findColor(name, layoutColor)); Loading Loading
core/java/com/android/internal/widget/ConversationLayout.java +1 −0 Original line number Diff line number Diff line Loading @@ -1178,6 +1178,7 @@ public class ConversationLayout extends FrameLayout } newGroup.setShowingAvatar(!mIsOneToOne && !mIsCollapsed); newGroup.setSingleLine(mIsCollapsed && TextUtils.isEmpty(mSummarizedContent)); newGroup.setIsCollapsed(mIsCollapsed); newGroup.setSender(sender, nameOverride); newGroup.setSending(groupIndex == (groups.size() - 1) && showSpinner); mGroups.add(newGroup); Loading
core/java/com/android/internal/widget/MessagingGroup.java +11 −2 Original line number Diff line number Diff line Loading @@ -103,6 +103,7 @@ public class MessagingGroup extends NotificationOptimizedLinearLayout implements private boolean mShowingAvatar = true; private CharSequence mSenderName; private boolean mSingleLine = false; private boolean mIsCollapsed = false; private LinearLayout mContentContainer; private int mRequestedMaxDisplayedLines = Integer.MAX_VALUE; private int mSenderTextPaddingSingleLine; Loading Loading @@ -451,7 +452,7 @@ public class MessagingGroup extends NotificationOptimizedLinearLayout implements private void updateIconVisibility() { if (Flags.notificationsRedesignTemplates()) { // We don't show any icon (other than the app or person icon) in the collapsed form. mMessagingIconContainer.setVisibility(mSingleLine ? GONE : VISIBLE); mMessagingIconContainer.setVisibility(mIsCollapsed ? GONE : VISIBLE); } } Loading Loading @@ -714,10 +715,18 @@ public class MessagingGroup extends NotificationOptimizedLinearLayout implements updateMaxDisplayedLines(); updateClipRect(); updateSenderVisibility(); updateIconVisibility(); } } /** * Sets whether this is in a collapsed layout or not. Certain elements like icons are not shown * when the notification is collapsed. */ public void setIsCollapsed(boolean isCollapsed) { mIsCollapsed = isCollapsed; updateIconVisibility(); } public boolean isSingleLine() { return mSingleLine; } Loading
core/java/com/android/internal/widget/MessagingLayout.java +1 −0 Original line number Diff line number Diff line Loading @@ -551,6 +551,7 @@ public class MessagingLayout extends FrameLayout } newGroup.setSingleLine(mIsCollapsed && TextUtils.isEmpty(mSummarizedContent)); newGroup.setShowingAvatar(!mIsCollapsed); newGroup.setIsCollapsed(mIsCollapsed); newGroup.setSender(sender, nameOverride); newGroup.setSending(groupIndex == (groups.size() - 1) && showSpinner); mGroups.add(newGroup); Loading
core/java/com/android/internal/widget/PeopleHelper.java +1 −1 Original line number Diff line number Diff line Loading @@ -110,7 +110,7 @@ public class PeopleHelper { @NonNull public Icon createAvatarSymbol(@NonNull CharSequence name, @NonNull String symbol, @ColorInt int layoutColor) { if (symbol.isEmpty() || TextUtils.isDigitsOnly(symbol) if (symbol == null || symbol.isEmpty() || TextUtils.isDigitsOnly(symbol) || SPECIAL_CHAR_PATTERN.matcher(symbol).find()) { Icon avatarIcon = Icon.createWithResource(mContext, R.drawable.messaging_user); avatarIcon.setTint(findColor(name, layoutColor)); Loading