Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4150d4dc authored by Ibrahim Yilmaz's avatar Ibrahim Yilmaz
Browse files

[RONs] Allow text color spans when promoted

This CL does not strip custom color spans when the notification is promoted to ongoing.

Bug: 369147090
Test: post a colorized  progress style notification and check the colored text.
Flag: android.app.ui_rich_ongoing
Change-Id: I2f408c4addda85240b3e60654ae8673833339705
parent 09ba9519
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -7134,7 +7134,9 @@ public class Notification implements Parcelable
         */
        public CharSequence ensureColorSpanContrastOrStripStyling(CharSequence cs,
                int buttonFillColor) {
            if (Flags.cleanUpSpansAndNewLines()) {
            // Ongoing promoted notifications are allowed to have styling.
            final boolean isPromotedOngoing = mN.isPromotedOngoing();
            if (!isPromotedOngoing && Flags.cleanUpSpansAndNewLines()) {
                return stripStyling(cs);
            }
@@ -8686,7 +8688,9 @@ public class Notification implements Parcelable
            // Replace the text with the big text, but only if the big text is not empty.
            CharSequence bigTextText = mBuilder.processLegacyText(mBigText);
            if (Flags.cleanUpSpansAndNewLines()) {
            // Ongoing promoted notifications are allowed to have styling.
            final boolean isPromotedOngoing = mBuilder.mN.isPromotedOngoing();
            if (!isPromotedOngoing && Flags.cleanUpSpansAndNewLines()) {
                bigTextText = normalizeBigText(stripStyling(bigTextText));
            }
            if (!TextUtils.isEmpty(bigTextText)) {