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

Commit 96686db5 authored by Julia Tuttle's avatar Julia Tuttle
Browse files

Fix hovered/pressed states of colorized notification backgrounds

After the notification color scheme updates, colorized notifications
would turn un-colorized when hovered or pressed.

The culprit was a ColorStateList created in NotificationBackgroundView
that didn't actually base the hovered and pressed states on the tint
color.

I'm not sure how this *ever* worked, but this CL bases *all* of the
states on the tint color, and fixes the problem.

Bug: 277285099
Bug: 310318993
Test: manual: find or post a colorized notification and long-press it
Flag: NA
Change-Id: I9a7431c2dadd5703858e84e887979a4c0bd75b30
parent 1744218e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -156,7 +156,7 @@ public class NotificationBackgroundView extends View implements Dumpable {
                    new int[]{com.android.internal.R.attr.state_hovered},
                    new int[]{}},

                    new int[]{0, 0, tintColor}
                    new int[]{tintColor, tintColor, tintColor}
            );
            mBackground.setTintMode(PorterDuff.Mode.SRC_ATOP);
            mBackground.setTintList(stateList);