Loading core/java/android/app/Notification.java +104 −26 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import static android.app.admin.DevicePolicyResources.Drawables.WORK_PROFILE_ICO import static android.app.admin.DevicePolicyResources.UNDEFINED; import static android.graphics.drawable.Icon.TYPE_URI; import static android.graphics.drawable.Icon.TYPE_URI_ADAPTIVE_BITMAP; import static android.app.Flags.cleanUpSpansAndNewLines; import static android.app.Flags.evenlyDividedCallStyleActionLayout; import static android.app.Flags.updateRankingTime; Loading Loading @@ -3124,9 +3125,29 @@ public class Notification implements Parcelable + " instance is a custom Parcelable and not allowed in Notification"); return cs.toString(); } if (Flags.cleanUpSpansAndNewLines()) { return stripStyling(cs); } return removeTextSizeSpans(cs); } private static CharSequence stripStyling(@Nullable CharSequence cs) { if (cs == null) { return cs; } return cs.toString(); } private static CharSequence cleanUpNewLines(@Nullable CharSequence charSequence) { if (charSequence == null) { return charSequence; } return charSequence.toString().replaceAll("[\r\n]+", "\n"); } private static CharSequence removeTextSizeSpans(CharSequence charSequence) { if (charSequence instanceof Spanned) { Spanned ss = (Spanned) charSequence; Loading Loading @@ -5505,7 +5526,8 @@ public class Notification implements Parcelable boolean hasSecondLine = showProgress; if (p.hasTitle()) { contentView.setViewVisibility(p.mTitleViewId, View.VISIBLE); contentView.setTextViewText(p.mTitleViewId, ensureColorSpanContrast(p.mTitle, p)); contentView.setTextViewText(p.mTitleViewId, ensureColorSpanContrastOrStripStyling(p.mTitle, p)); setTextViewColorPrimary(contentView, p.mTitleViewId, p); } else if (p.mTitleViewId != R.id.title) { // This alternate title view ID is not cleared by resetStandardTemplate Loading @@ -5515,7 +5537,8 @@ public class Notification implements Parcelable if (p.mText != null && p.mText.length() != 0 && (!showProgress || p.mAllowTextWithProgress)) { contentView.setViewVisibility(p.mTextViewId, View.VISIBLE); contentView.setTextViewText(p.mTextViewId, ensureColorSpanContrast(p.mText, p)); contentView.setTextViewText(p.mTextViewId, ensureColorSpanContrastOrStripStyling(p.mText, p)); setTextViewColorSecondary(contentView, p.mTextViewId, p); hasSecondLine = true; } else if (p.mTextViewId != R.id.text) { Loading Loading @@ -5804,7 +5827,7 @@ public class Notification implements Parcelable headerText = mN.extras.getCharSequence(EXTRA_INFO_TEXT); } if (!TextUtils.isEmpty(headerText)) { contentView.setTextViewText(R.id.header_text, ensureColorSpanContrast( contentView.setTextViewText(R.id.header_text, ensureColorSpanContrastOrStripStyling( processLegacyText(headerText), p)); setTextViewColorSecondary(contentView, R.id.header_text, p); contentView.setViewVisibility(R.id.header_text, View.VISIBLE); Loading @@ -5826,7 +5849,8 @@ public class Notification implements Parcelable return false; } if (!TextUtils.isEmpty(p.mHeaderTextSecondary)) { contentView.setTextViewText(R.id.header_text_secondary, ensureColorSpanContrast( contentView.setTextViewText(R.id.header_text_secondary, ensureColorSpanContrastOrStripStyling( processLegacyText(p.mHeaderTextSecondary), p)); setTextViewColorSecondary(contentView, R.id.header_text_secondary, p); contentView.setViewVisibility(R.id.header_text_secondary, View.VISIBLE); Loading Loading @@ -6048,7 +6072,7 @@ public class Notification implements Parcelable big.setViewVisibility(R.id.notification_material_reply_text_1_container, View.VISIBLE); big.setTextViewText(R.id.notification_material_reply_text_1, ensureColorSpanContrast(replyText[0].getText(), p)); ensureColorSpanContrastOrStripStyling(replyText[0].getText(), p)); setTextViewColorSecondary(big, R.id.notification_material_reply_text_1, p); big.setViewVisibility(R.id.notification_material_reply_progress, showSpinner ? View.VISIBLE : View.GONE); Loading @@ -6060,7 +6084,7 @@ public class Notification implements Parcelable && p.maxRemoteInputHistory > 1) { big.setViewVisibility(R.id.notification_material_reply_text_2, View.VISIBLE); big.setTextViewText(R.id.notification_material_reply_text_2, ensureColorSpanContrast(replyText[1].getText(), p)); ensureColorSpanContrastOrStripStyling(replyText[1].getText(), p)); setTextViewColorSecondary(big, R.id.notification_material_reply_text_2, p); if (replyText.length > 2 && !TextUtils.isEmpty(replyText[2].getText()) Loading @@ -6068,7 +6092,7 @@ public class Notification implements Parcelable big.setViewVisibility( R.id.notification_material_reply_text_3, View.VISIBLE); big.setTextViewText(R.id.notification_material_reply_text_3, ensureColorSpanContrast(replyText[2].getText(), p)); ensureColorSpanContrastOrStripStyling(replyText[2].getText(), p)); setTextViewColorSecondary(big, R.id.notification_material_reply_text_3, p); } } Loading Loading @@ -6500,6 +6524,18 @@ public class Notification implements Parcelable mContext, getColors(p).getBackgroundColor(), mInNightMode), R.dimen.notification_action_disabled_container_alpha); } if (Flags.cleanUpSpansAndNewLines()) { if (!isLegacy()) { // Check for a full-length span color to use as the button fill color. Integer fullLengthColor = getFullLengthSpanColor(title); if (fullLengthColor != null) { // Ensure the custom button fill has 1.3:1 contrast w/ notification bg. int notifBackgroundColor = getColors(p).getBackgroundColor(); buttonFillColor = ensureButtonFillContrast( fullLengthColor, notifBackgroundColor); } } } else { if (isLegacy()) { title = ContrastColorUtil.clearColorSpans(title); } else { Loading @@ -6511,10 +6547,14 @@ public class Notification implements Parcelable buttonFillColor = ensureButtonFillContrast( fullLengthColor, notifBackgroundColor); } // Remove full-length color spans and ensure text contrast with the button fill. // Remove full-length color spans // and ensure text contrast with the button fill. title = ContrastColorUtil.ensureColorSpanContrast(title, buttonFillColor); } final CharSequence label = ensureColorSpanContrast(title, p); } final CharSequence label = ensureColorSpanContrastOrStripStyling(title, p); if (p.mCallStyleActions && evenlyDividedCallStyleActionLayout()) { if (CallStyle.DEBUG_NEW_ACTION_LAYOUT) { Log.d(TAG, "new action layout enabled, gluing instead of setting text"); Loading Loading @@ -6554,7 +6594,7 @@ public class Notification implements Parcelable button.setIntDimen(R.id.action0, "setMinimumWidth", minWidthDimen); } } else { button.setTextViewText(R.id.action0, ensureColorSpanContrast( button.setTextViewText(R.id.action0, ensureColorSpanContrastOrStripStyling( action.title, p)); button.setTextColor(R.id.action0, getStandardActionColor(p)); } Loading Loading @@ -6628,6 +6668,26 @@ public class Notification implements Parcelable return result; } /** * @hide */ public CharSequence ensureColorSpanContrastOrStripStyling(CharSequence cs, StandardTemplateParams p) { return ensureColorSpanContrastOrStripStyling(cs, getBackgroundColor(p)); } /** * @hide */ public CharSequence ensureColorSpanContrastOrStripStyling(CharSequence cs, int buttonFillColor) { if (Flags.cleanUpSpansAndNewLines()) { return stripStyling(cs); } return ContrastColorUtil.ensureColorSpanContrast(cs, buttonFillColor); } /** * Ensures contrast on color spans against a background color. * Note that any full-length color spans will be removed instead of being contrasted. Loading Loading @@ -7853,7 +7913,8 @@ public class Notification implements Parcelable RemoteViews contentView = getStandardView(mBuilder.getBigPictureLayoutResource(), p, null /* result */); if (mSummaryTextSet) { contentView.setTextViewText(R.id.text, mBuilder.ensureColorSpanContrast( contentView.setTextViewText(R.id.text, mBuilder.ensureColorSpanContrastOrStripStyling( mBuilder.processLegacyText(mSummaryText), p)); mBuilder.setTextViewColorSecondary(contentView, R.id.text, p); contentView.setViewVisibility(R.id.text, View.VISIBLE); Loading Loading @@ -8017,6 +8078,9 @@ public class Notification implements Parcelable */ public BigTextStyle bigText(CharSequence cs) { mBigText = safeCharSequence(cs); if (Flags.cleanUpSpansAndNewLines()) { mBigText = cleanUpNewLines(mBigText); } return this; } Loading Loading @@ -8517,7 +8581,7 @@ public class Notification implements Parcelable for (int i = 0; i < N; i++) { final Message m = messages.get(i); if (ensureContrast) { m.ensureColorContrast(backgroundColor); m.ensureColorContrastOrStripStyling(backgroundColor); } bundles[i] = m.toBundle(); } Loading @@ -8543,7 +8607,9 @@ public class Notification implements Parcelable } else { title = sender; } if (Flags.cleanUpSpansAndNewLines()) { title = stripStyling(title); } if (title != null) { extras.putCharSequence(EXTRA_TITLE, title); } Loading Loading @@ -8994,6 +9060,17 @@ public class Notification implements Parcelable return this; } /** * Strip styling or updates TextAppearance spans in message text. * @hide */ public void ensureColorContrastOrStripStyling(int backgroundColor) { if (Flags.cleanUpSpansAndNewLines()) { mText = stripStyling(mText); } else { ensureColorContrast(backgroundColor); } } /** * Updates TextAppearance spans in the message text so it has sufficient contrast * against its background. Loading Loading @@ -9324,7 +9401,8 @@ public class Notification implements Parcelable if (!TextUtils.isEmpty(str)) { contentView.setViewVisibility(rowIds[i], View.VISIBLE); contentView.setTextViewText(rowIds[i], mBuilder.ensureColorSpanContrast(mBuilder.processLegacyText(str), p)); mBuilder.ensureColorSpanContrastOrStripStyling( mBuilder.processLegacyText(str), p)); mBuilder.setTextViewColorSecondary(contentView, rowIds[i], p); contentView.setViewPadding(rowIds[i], 0, topPadding, 0, 0); if (first) { Loading core/java/android/app/notification.aconfig +7 −0 Original line number Diff line number Diff line Loading @@ -110,3 +110,10 @@ flag { description: "No notifs can use USAGE_UNKNOWN or USAGE_MEDIA" bug: "331793339" } flag { name: "clean_up_spans_and_new_lines" namespace: "systemui" description: "Cleans up spans and unnecessary new lines from standard notification templates" bug: "313439845" } No newline at end of file core/java/com/android/internal/widget/ConversationLayout.java +4 −0 Original line number Diff line number Diff line Loading @@ -1212,6 +1212,10 @@ public class ConversationLayout extends FrameLayout } } } if (android.app.Flags.cleanUpSpansAndNewLines() && conversationText != null) { // remove formatting from title. conversationText = conversationText.toString(); } if (conversationIcon == null) { conversationIcon = largeIcon; Loading core/java/com/android/internal/widget/MessagingGroup.java +5 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.StyleRes; import android.app.Flags; import android.app.Person; import android.content.Context; import android.content.res.ColorStateList; Loading Loading @@ -200,6 +201,10 @@ public class MessagingGroup extends NotificationOptimizedLinearLayout implements if (nameOverride == null) { nameOverride = sender.getName(); } if (Flags.cleanUpSpansAndNewLines() && nameOverride != null) { // remove formatting from sender name nameOverride = nameOverride.toString(); } mSenderName = nameOverride; if (mSingleLine && !TextUtils.isEmpty(nameOverride)) { nameOverride = mContext.getResources().getString( Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/row/SingleLineViewInflater.kt +2 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.systemui.statusbar.notification.row import android.app.Flags import android.app.Notification import android.app.Notification.MessagingStyle import android.app.Person Loading Loading @@ -131,7 +132,7 @@ internal object SingleLineViewInflater { val senderName = systemUiContext.resources.getString( R.string.conversation_single_line_name_display, name if (Flags.cleanUpSpansAndNewLines()) name?.toString() else name ) // We need to find back-up values for those texts if they are needed and empty Loading Loading
core/java/android/app/Notification.java +104 −26 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import static android.app.admin.DevicePolicyResources.Drawables.WORK_PROFILE_ICO import static android.app.admin.DevicePolicyResources.UNDEFINED; import static android.graphics.drawable.Icon.TYPE_URI; import static android.graphics.drawable.Icon.TYPE_URI_ADAPTIVE_BITMAP; import static android.app.Flags.cleanUpSpansAndNewLines; import static android.app.Flags.evenlyDividedCallStyleActionLayout; import static android.app.Flags.updateRankingTime; Loading Loading @@ -3124,9 +3125,29 @@ public class Notification implements Parcelable + " instance is a custom Parcelable and not allowed in Notification"); return cs.toString(); } if (Flags.cleanUpSpansAndNewLines()) { return stripStyling(cs); } return removeTextSizeSpans(cs); } private static CharSequence stripStyling(@Nullable CharSequence cs) { if (cs == null) { return cs; } return cs.toString(); } private static CharSequence cleanUpNewLines(@Nullable CharSequence charSequence) { if (charSequence == null) { return charSequence; } return charSequence.toString().replaceAll("[\r\n]+", "\n"); } private static CharSequence removeTextSizeSpans(CharSequence charSequence) { if (charSequence instanceof Spanned) { Spanned ss = (Spanned) charSequence; Loading Loading @@ -5505,7 +5526,8 @@ public class Notification implements Parcelable boolean hasSecondLine = showProgress; if (p.hasTitle()) { contentView.setViewVisibility(p.mTitleViewId, View.VISIBLE); contentView.setTextViewText(p.mTitleViewId, ensureColorSpanContrast(p.mTitle, p)); contentView.setTextViewText(p.mTitleViewId, ensureColorSpanContrastOrStripStyling(p.mTitle, p)); setTextViewColorPrimary(contentView, p.mTitleViewId, p); } else if (p.mTitleViewId != R.id.title) { // This alternate title view ID is not cleared by resetStandardTemplate Loading @@ -5515,7 +5537,8 @@ public class Notification implements Parcelable if (p.mText != null && p.mText.length() != 0 && (!showProgress || p.mAllowTextWithProgress)) { contentView.setViewVisibility(p.mTextViewId, View.VISIBLE); contentView.setTextViewText(p.mTextViewId, ensureColorSpanContrast(p.mText, p)); contentView.setTextViewText(p.mTextViewId, ensureColorSpanContrastOrStripStyling(p.mText, p)); setTextViewColorSecondary(contentView, p.mTextViewId, p); hasSecondLine = true; } else if (p.mTextViewId != R.id.text) { Loading Loading @@ -5804,7 +5827,7 @@ public class Notification implements Parcelable headerText = mN.extras.getCharSequence(EXTRA_INFO_TEXT); } if (!TextUtils.isEmpty(headerText)) { contentView.setTextViewText(R.id.header_text, ensureColorSpanContrast( contentView.setTextViewText(R.id.header_text, ensureColorSpanContrastOrStripStyling( processLegacyText(headerText), p)); setTextViewColorSecondary(contentView, R.id.header_text, p); contentView.setViewVisibility(R.id.header_text, View.VISIBLE); Loading @@ -5826,7 +5849,8 @@ public class Notification implements Parcelable return false; } if (!TextUtils.isEmpty(p.mHeaderTextSecondary)) { contentView.setTextViewText(R.id.header_text_secondary, ensureColorSpanContrast( contentView.setTextViewText(R.id.header_text_secondary, ensureColorSpanContrastOrStripStyling( processLegacyText(p.mHeaderTextSecondary), p)); setTextViewColorSecondary(contentView, R.id.header_text_secondary, p); contentView.setViewVisibility(R.id.header_text_secondary, View.VISIBLE); Loading Loading @@ -6048,7 +6072,7 @@ public class Notification implements Parcelable big.setViewVisibility(R.id.notification_material_reply_text_1_container, View.VISIBLE); big.setTextViewText(R.id.notification_material_reply_text_1, ensureColorSpanContrast(replyText[0].getText(), p)); ensureColorSpanContrastOrStripStyling(replyText[0].getText(), p)); setTextViewColorSecondary(big, R.id.notification_material_reply_text_1, p); big.setViewVisibility(R.id.notification_material_reply_progress, showSpinner ? View.VISIBLE : View.GONE); Loading @@ -6060,7 +6084,7 @@ public class Notification implements Parcelable && p.maxRemoteInputHistory > 1) { big.setViewVisibility(R.id.notification_material_reply_text_2, View.VISIBLE); big.setTextViewText(R.id.notification_material_reply_text_2, ensureColorSpanContrast(replyText[1].getText(), p)); ensureColorSpanContrastOrStripStyling(replyText[1].getText(), p)); setTextViewColorSecondary(big, R.id.notification_material_reply_text_2, p); if (replyText.length > 2 && !TextUtils.isEmpty(replyText[2].getText()) Loading @@ -6068,7 +6092,7 @@ public class Notification implements Parcelable big.setViewVisibility( R.id.notification_material_reply_text_3, View.VISIBLE); big.setTextViewText(R.id.notification_material_reply_text_3, ensureColorSpanContrast(replyText[2].getText(), p)); ensureColorSpanContrastOrStripStyling(replyText[2].getText(), p)); setTextViewColorSecondary(big, R.id.notification_material_reply_text_3, p); } } Loading Loading @@ -6500,6 +6524,18 @@ public class Notification implements Parcelable mContext, getColors(p).getBackgroundColor(), mInNightMode), R.dimen.notification_action_disabled_container_alpha); } if (Flags.cleanUpSpansAndNewLines()) { if (!isLegacy()) { // Check for a full-length span color to use as the button fill color. Integer fullLengthColor = getFullLengthSpanColor(title); if (fullLengthColor != null) { // Ensure the custom button fill has 1.3:1 contrast w/ notification bg. int notifBackgroundColor = getColors(p).getBackgroundColor(); buttonFillColor = ensureButtonFillContrast( fullLengthColor, notifBackgroundColor); } } } else { if (isLegacy()) { title = ContrastColorUtil.clearColorSpans(title); } else { Loading @@ -6511,10 +6547,14 @@ public class Notification implements Parcelable buttonFillColor = ensureButtonFillContrast( fullLengthColor, notifBackgroundColor); } // Remove full-length color spans and ensure text contrast with the button fill. // Remove full-length color spans // and ensure text contrast with the button fill. title = ContrastColorUtil.ensureColorSpanContrast(title, buttonFillColor); } final CharSequence label = ensureColorSpanContrast(title, p); } final CharSequence label = ensureColorSpanContrastOrStripStyling(title, p); if (p.mCallStyleActions && evenlyDividedCallStyleActionLayout()) { if (CallStyle.DEBUG_NEW_ACTION_LAYOUT) { Log.d(TAG, "new action layout enabled, gluing instead of setting text"); Loading Loading @@ -6554,7 +6594,7 @@ public class Notification implements Parcelable button.setIntDimen(R.id.action0, "setMinimumWidth", minWidthDimen); } } else { button.setTextViewText(R.id.action0, ensureColorSpanContrast( button.setTextViewText(R.id.action0, ensureColorSpanContrastOrStripStyling( action.title, p)); button.setTextColor(R.id.action0, getStandardActionColor(p)); } Loading Loading @@ -6628,6 +6668,26 @@ public class Notification implements Parcelable return result; } /** * @hide */ public CharSequence ensureColorSpanContrastOrStripStyling(CharSequence cs, StandardTemplateParams p) { return ensureColorSpanContrastOrStripStyling(cs, getBackgroundColor(p)); } /** * @hide */ public CharSequence ensureColorSpanContrastOrStripStyling(CharSequence cs, int buttonFillColor) { if (Flags.cleanUpSpansAndNewLines()) { return stripStyling(cs); } return ContrastColorUtil.ensureColorSpanContrast(cs, buttonFillColor); } /** * Ensures contrast on color spans against a background color. * Note that any full-length color spans will be removed instead of being contrasted. Loading Loading @@ -7853,7 +7913,8 @@ public class Notification implements Parcelable RemoteViews contentView = getStandardView(mBuilder.getBigPictureLayoutResource(), p, null /* result */); if (mSummaryTextSet) { contentView.setTextViewText(R.id.text, mBuilder.ensureColorSpanContrast( contentView.setTextViewText(R.id.text, mBuilder.ensureColorSpanContrastOrStripStyling( mBuilder.processLegacyText(mSummaryText), p)); mBuilder.setTextViewColorSecondary(contentView, R.id.text, p); contentView.setViewVisibility(R.id.text, View.VISIBLE); Loading Loading @@ -8017,6 +8078,9 @@ public class Notification implements Parcelable */ public BigTextStyle bigText(CharSequence cs) { mBigText = safeCharSequence(cs); if (Flags.cleanUpSpansAndNewLines()) { mBigText = cleanUpNewLines(mBigText); } return this; } Loading Loading @@ -8517,7 +8581,7 @@ public class Notification implements Parcelable for (int i = 0; i < N; i++) { final Message m = messages.get(i); if (ensureContrast) { m.ensureColorContrast(backgroundColor); m.ensureColorContrastOrStripStyling(backgroundColor); } bundles[i] = m.toBundle(); } Loading @@ -8543,7 +8607,9 @@ public class Notification implements Parcelable } else { title = sender; } if (Flags.cleanUpSpansAndNewLines()) { title = stripStyling(title); } if (title != null) { extras.putCharSequence(EXTRA_TITLE, title); } Loading Loading @@ -8994,6 +9060,17 @@ public class Notification implements Parcelable return this; } /** * Strip styling or updates TextAppearance spans in message text. * @hide */ public void ensureColorContrastOrStripStyling(int backgroundColor) { if (Flags.cleanUpSpansAndNewLines()) { mText = stripStyling(mText); } else { ensureColorContrast(backgroundColor); } } /** * Updates TextAppearance spans in the message text so it has sufficient contrast * against its background. Loading Loading @@ -9324,7 +9401,8 @@ public class Notification implements Parcelable if (!TextUtils.isEmpty(str)) { contentView.setViewVisibility(rowIds[i], View.VISIBLE); contentView.setTextViewText(rowIds[i], mBuilder.ensureColorSpanContrast(mBuilder.processLegacyText(str), p)); mBuilder.ensureColorSpanContrastOrStripStyling( mBuilder.processLegacyText(str), p)); mBuilder.setTextViewColorSecondary(contentView, rowIds[i], p); contentView.setViewPadding(rowIds[i], 0, topPadding, 0, 0); if (first) { Loading
core/java/android/app/notification.aconfig +7 −0 Original line number Diff line number Diff line Loading @@ -110,3 +110,10 @@ flag { description: "No notifs can use USAGE_UNKNOWN or USAGE_MEDIA" bug: "331793339" } flag { name: "clean_up_spans_and_new_lines" namespace: "systemui" description: "Cleans up spans and unnecessary new lines from standard notification templates" bug: "313439845" } No newline at end of file
core/java/com/android/internal/widget/ConversationLayout.java +4 −0 Original line number Diff line number Diff line Loading @@ -1212,6 +1212,10 @@ public class ConversationLayout extends FrameLayout } } } if (android.app.Flags.cleanUpSpansAndNewLines() && conversationText != null) { // remove formatting from title. conversationText = conversationText.toString(); } if (conversationIcon == null) { conversationIcon = largeIcon; Loading
core/java/com/android/internal/widget/MessagingGroup.java +5 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.StyleRes; import android.app.Flags; import android.app.Person; import android.content.Context; import android.content.res.ColorStateList; Loading Loading @@ -200,6 +201,10 @@ public class MessagingGroup extends NotificationOptimizedLinearLayout implements if (nameOverride == null) { nameOverride = sender.getName(); } if (Flags.cleanUpSpansAndNewLines() && nameOverride != null) { // remove formatting from sender name nameOverride = nameOverride.toString(); } mSenderName = nameOverride; if (mSingleLine && !TextUtils.isEmpty(nameOverride)) { nameOverride = mContext.getResources().getString( Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/SingleLineViewInflater.kt +2 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.systemui.statusbar.notification.row import android.app.Flags import android.app.Notification import android.app.Notification.MessagingStyle import android.app.Person Loading Loading @@ -131,7 +132,7 @@ internal object SingleLineViewInflater { val senderName = systemUiContext.resources.getString( R.string.conversation_single_line_name_display, name if (Flags.cleanUpSpansAndNewLines()) name?.toString() else name ) // We need to find back-up values for those texts if they are needed and empty Loading