From 7f8bcb8addb4a47d76b4a8af78660b1b6b178a3d Mon Sep 17 00:00:00 2001 From: Jeff DeCew Date: Thu, 3 Jun 2021 11:43:43 -0400 Subject: [PATCH] Always highlight unread count Fixes: 188646708 Test: get unread count within a group Change-Id: I41d67e5e488e0d3dbc3873d6d50d55ec4ab8c9f2 --- .../internal/widget/NotificationExpandButton.java | 11 +---------- .../systemui/statusbar/NotificationGroupingUtil.java | 6 ------ 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/core/java/com/android/internal/widget/NotificationExpandButton.java b/core/java/com/android/internal/widget/NotificationExpandButton.java index de3b6a4dacb2b..1974b0c2e5fcb 100644 --- a/core/java/com/android/internal/widget/NotificationExpandButton.java +++ b/core/java/com/android/internal/widget/NotificationExpandButton.java @@ -52,7 +52,6 @@ public class NotificationExpandButton extends FrameLayout { private int mDefaultTextColor; private int mHighlightPillColor; private int mHighlightTextColor; - private boolean mDisallowColor; public NotificationExpandButton(Context context) { this(context, null, 0, 0); @@ -108,14 +107,6 @@ public class NotificationExpandButton extends FrameLayout { return super.pointInView(localX, localY, slop); } - /** - * Disable the use of the accent colors for this view, if true. - */ - public void setGrayedOut(boolean shouldApply) { - mDisallowColor = shouldApply; - updateColors(); - } - @Override public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { super.onInitializeAccessibilityNodeInfo(info); @@ -164,7 +155,7 @@ public class NotificationExpandButton extends FrameLayout { } private void updateColors() { - if (shouldShowNumber() && !mDisallowColor) { + if (shouldShowNumber()) { if (mHighlightPillColor != 0) { mPillView.setBackgroundTintList(ColorStateList.valueOf(mHighlightPillColor)); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGroupingUtil.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGroupingUtil.java index 5b694973d7f46..143fc324f8c77 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGroupingUtil.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGroupingUtil.java @@ -32,7 +32,6 @@ import com.android.internal.R; import com.android.internal.widget.CachingIconView; import com.android.internal.widget.ConversationLayout; import com.android.internal.widget.ImageFloatingTextView; -import com.android.internal.widget.NotificationExpandButton; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; import com.android.systemui.statusbar.notification.row.NotificationContentView; @@ -80,11 +79,6 @@ public class NotificationGroupingUtil { if (icon != null) { icon.setGrayedOut(apply); } - NotificationExpandButton expand = - view.findViewById(com.android.internal.R.id.expand_button); - if (expand != null) { - expand.setGrayedOut(apply); - } } };