Loading core/java/android/app/Notification.java +20 −2 Original line number Diff line number Diff line Loading @@ -5283,8 +5283,7 @@ public class Notification implements Parcelable contentView.setInt(R.id.expand_button, "setDefaultPillColor", pillColor); // Use different highlighted colors except when low-priority mode prevents that if (!p.mReduceHighlights) { textColor = getBackgroundColor(p); pillColor = getAccentColor(p); pillColor = getAccentTertiaryColor(p); } contentView.setInt(R.id.expand_button, "setHighlightTextColor", textColor); contentView.setInt(R.id.expand_button, "setHighlightPillColor", pillColor); Loading Loading @@ -6218,6 +6217,25 @@ 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); } if (mTintWithThemeAccent) { 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. */ Loading Loading
core/java/android/app/Notification.java +20 −2 Original line number Diff line number Diff line Loading @@ -5283,8 +5283,7 @@ public class Notification implements Parcelable contentView.setInt(R.id.expand_button, "setDefaultPillColor", pillColor); // Use different highlighted colors except when low-priority mode prevents that if (!p.mReduceHighlights) { textColor = getBackgroundColor(p); pillColor = getAccentColor(p); pillColor = getAccentTertiaryColor(p); } contentView.setInt(R.id.expand_button, "setHighlightTextColor", textColor); contentView.setInt(R.id.expand_button, "setHighlightPillColor", pillColor); Loading Loading @@ -6218,6 +6217,25 @@ 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); } if (mTintWithThemeAccent) { 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. */ Loading