Loading core/java/android/app/Notification.java +5 −4 Original line number Diff line number Diff line Loading @@ -5380,14 +5380,15 @@ public class Notification implements Parcelable private void bindExpandButton(RemoteViews contentView, StandardTemplateParams p) { // set default colors int textColor = getPrimaryTextColor(p); int pillColor = getColors(p).getProtectionColor(); int bgColor = getBackgroundColor(p); int pillColor = Colors.flattenAlpha(getColors(p).getProtectionColor(), bgColor); int textColor = Colors.flattenAlpha(getPrimaryTextColor(p), pillColor); contentView.setInt(R.id.expand_button, "setDefaultTextColor", textColor); contentView.setInt(R.id.expand_button, "setDefaultPillColor", pillColor); // Use different highlighted colors for conversations' unread count if (p.mHighlightExpander) { textColor = getBackgroundColor(p); pillColor = getPrimaryAccentColor(p); pillColor = Colors.flattenAlpha(getPrimaryAccentColor(p), bgColor); textColor = Colors.flattenAlpha(bgColor, pillColor); } contentView.setInt(R.id.expand_button, "setHighlightTextColor", textColor); contentView.setInt(R.id.expand_button, "setHighlightPillColor", pillColor); Loading core/java/com/android/internal/widget/NotificationExpandButton.java +2 −5 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ import android.annotation.ColorInt; import android.annotation.Nullable; import android.content.Context; import android.content.res.ColorStateList; import android.graphics.PorterDuff; import android.graphics.Rect; import android.util.AttributeSet; import android.view.RemotableViewMethod; Loading Loading @@ -159,8 +158,7 @@ public class NotificationExpandButton extends FrameLayout { if (mHighlightPillColor != 0) { mPillView.setBackgroundTintList(ColorStateList.valueOf(mHighlightPillColor)); } mPillView.setBackgroundTintMode(PorterDuff.Mode.SRC_IN); mIconView.setColorFilter(mHighlightTextColor, PorterDuff.Mode.SRC_IN); mIconView.setColorFilter(mHighlightTextColor); if (mHighlightTextColor != 0) { mNumberView.setTextColor(mHighlightTextColor); } Loading @@ -168,8 +166,7 @@ public class NotificationExpandButton extends FrameLayout { if (mDefaultPillColor != 0) { mPillView.setBackgroundTintList(ColorStateList.valueOf(mDefaultPillColor)); } mPillView.setBackgroundTintMode(PorterDuff.Mode.SRC_IN); mIconView.setColorFilter(mDefaultTextColor, PorterDuff.Mode.SRC_IN); mIconView.setColorFilter(mDefaultTextColor); if (mDefaultTextColor != 0) { mNumberView.setTextColor(mDefaultTextColor); } Loading Loading
core/java/android/app/Notification.java +5 −4 Original line number Diff line number Diff line Loading @@ -5380,14 +5380,15 @@ public class Notification implements Parcelable private void bindExpandButton(RemoteViews contentView, StandardTemplateParams p) { // set default colors int textColor = getPrimaryTextColor(p); int pillColor = getColors(p).getProtectionColor(); int bgColor = getBackgroundColor(p); int pillColor = Colors.flattenAlpha(getColors(p).getProtectionColor(), bgColor); int textColor = Colors.flattenAlpha(getPrimaryTextColor(p), pillColor); contentView.setInt(R.id.expand_button, "setDefaultTextColor", textColor); contentView.setInt(R.id.expand_button, "setDefaultPillColor", pillColor); // Use different highlighted colors for conversations' unread count if (p.mHighlightExpander) { textColor = getBackgroundColor(p); pillColor = getPrimaryAccentColor(p); pillColor = Colors.flattenAlpha(getPrimaryAccentColor(p), bgColor); textColor = Colors.flattenAlpha(bgColor, pillColor); } contentView.setInt(R.id.expand_button, "setHighlightTextColor", textColor); contentView.setInt(R.id.expand_button, "setHighlightPillColor", pillColor); Loading
core/java/com/android/internal/widget/NotificationExpandButton.java +2 −5 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ import android.annotation.ColorInt; import android.annotation.Nullable; import android.content.Context; import android.content.res.ColorStateList; import android.graphics.PorterDuff; import android.graphics.Rect; import android.util.AttributeSet; import android.view.RemotableViewMethod; Loading Loading @@ -159,8 +158,7 @@ public class NotificationExpandButton extends FrameLayout { if (mHighlightPillColor != 0) { mPillView.setBackgroundTintList(ColorStateList.valueOf(mHighlightPillColor)); } mPillView.setBackgroundTintMode(PorterDuff.Mode.SRC_IN); mIconView.setColorFilter(mHighlightTextColor, PorterDuff.Mode.SRC_IN); mIconView.setColorFilter(mHighlightTextColor); if (mHighlightTextColor != 0) { mNumberView.setTextColor(mHighlightTextColor); } Loading @@ -168,8 +166,7 @@ public class NotificationExpandButton extends FrameLayout { if (mDefaultPillColor != 0) { mPillView.setBackgroundTintList(ColorStateList.valueOf(mDefaultPillColor)); } mPillView.setBackgroundTintMode(PorterDuff.Mode.SRC_IN); mIconView.setColorFilter(mDefaultTextColor, PorterDuff.Mode.SRC_IN); mIconView.setColorFilter(mDefaultTextColor); if (mDefaultTextColor != 0) { mNumberView.setTextColor(mDefaultTextColor); } Loading