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

Commit d1461b3a authored by Jeff DeCew's avatar Jeff DeCew Committed by Automerger Merge Worker
Browse files

Merge "Revert color of expand button on unread conversations" into sc-dev am: 03a220d6

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14103566

Change-Id: Ifa05d5ab544fe8d924dff2f2e342cfd52a9895d9
parents c57bf4cf 03a220d6
Loading
Loading
Loading
Loading
+2 −23
Original line number Diff line number Diff line
@@ -5360,12 +5360,8 @@ public class Notification implements Parcelable
            contentView.setInt(R.id.expand_button, "setDefaultPillColor", pillColor);
            // Use different highlighted colors for conversations' unread count
            if (p.mHighlightExpander) {
                pillColor = getAccentTertiaryColor(p);
                // TODO(b/183710694): The accent tertiary is currently too bright in dark mode, so
                //  we need to pick a contrasting color.
                textColor = ColorUtils.setAlphaComponent(
                        ContrastColorUtil.resolvePrimaryColor(mContext, pillColor, mInNightMode),
                        0xFF);
                textColor = getBackgroundColor(p);
                pillColor = getAccentColor(p);
            }
            contentView.setInt(R.id.expand_button, "setHighlightTextColor", textColor);
            contentView.setInt(R.id.expand_button, "setHighlightPillColor", pillColor);
@@ -6295,23 +6291,6 @@ public class Notification implements Parcelable
            return ColorUtils.blendARGB(getPrimaryTextColor(p), getBackgroundColor(p), 0.8f);
        }

        /**
         * Gets the tertiary accent color for colored UI elements. If we're tinting with the theme
         * accent, this comes from the tertiary system accent palette, otherwise this would be
         * identical to {@link #getSmallIconColor(StandardTemplateParams)}.
         */
        private @ColorInt int getAccentTertiaryColor(StandardTemplateParams p) {
            if (isColorized(p)) {
                return getPrimaryTextColor(p);
            }
            int color = obtainThemeColor(com.android.internal.R.attr.colorAccentTertiary,
                    COLOR_INVALID);
            if (color != COLOR_INVALID) {
                return color;
            }
            return getContrastColor(p);
        }

        /**
         * Gets the theme's error color, or the primary text color for colorized notifications.
         */