diff --git a/core/java/com/android/internal/widget/NotificationExpandButton.java b/core/java/com/android/internal/widget/NotificationExpandButton.java
index 7a8ead6b33f13..de3b6a4dacb2b 100644
--- a/core/java/com/android/internal/widget/NotificationExpandButton.java
+++ b/core/java/com/android/internal/widget/NotificationExpandButton.java
@@ -165,15 +165,23 @@ public class NotificationExpandButton extends FrameLayout {
private void updateColors() {
if (shouldShowNumber() && !mDisallowColor) {
- mPillView.setBackgroundTintList(ColorStateList.valueOf(mHighlightPillColor));
+ if (mHighlightPillColor != 0) {
+ mPillView.setBackgroundTintList(ColorStateList.valueOf(mHighlightPillColor));
+ }
mPillView.setBackgroundTintMode(PorterDuff.Mode.SRC_IN);
mIconView.setColorFilter(mHighlightTextColor, PorterDuff.Mode.SRC_IN);
- mNumberView.setTextColor(mHighlightTextColor);
+ if (mHighlightTextColor != 0) {
+ mNumberView.setTextColor(mHighlightTextColor);
+ }
} else {
- mPillView.setBackgroundTintList(ColorStateList.valueOf(mDefaultPillColor));
+ if (mDefaultPillColor != 0) {
+ mPillView.setBackgroundTintList(ColorStateList.valueOf(mDefaultPillColor));
+ }
mPillView.setBackgroundTintMode(PorterDuff.Mode.SRC_IN);
mIconView.setColorFilter(mDefaultTextColor, PorterDuff.Mode.SRC_IN);
- mNumberView.setTextColor(mDefaultTextColor);
+ if (mDefaultTextColor != 0) {
+ mNumberView.setTextColor(mDefaultTextColor);
+ }
}
}
diff --git a/core/res/res/layout/notification_expand_button.xml b/core/res/res/layout/notification_expand_button.xml
index b969fa49bcc79..e752431ce75fb 100644
--- a/core/res/res/layout/notification_expand_button.xml
+++ b/core/res/res/layout/notification_expand_button.xml
@@ -22,7 +22,6 @@
android:layout_gravity="top|end"
android:contentDescription="@string/expand_button_content_description_collapsed"
android:padding="16dp"
- android:visibility="gone"
>
+
+