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

Commit e9714eb0 authored by Selim Cinek's avatar Selim Cinek
Browse files

Ensured correct coloring of badge in dark mode

Bug: 6701275011
Test: add conversation in darkmode, observe dark badge background
Change-Id: I88d9667d82a134233ff8c0c19f06dffdd5b16a67
parent f2b8aa71
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -7525,6 +7525,9 @@ public class Notification implements Parcelable
                    mBuilder.getPrimaryTextColor(p));
            contentView.setInt(R.id.status_bar_latest_event_content, "setMessageTextColor",
                    mBuilder.getSecondaryTextColor(p));
            contentView.setInt(R.id.status_bar_latest_event_content,
                    "setNotificationBackgroundColor",
                    mBuilder.resolveBackgroundColor(p));
            contentView.setBoolean(R.id.status_bar_latest_event_content, "setIsCollapsed",
                    isCollapsed);
            contentView.setIcon(R.id.status_bar_latest_event_content, "setAvatarReplacement",
+9 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import android.app.Notification;
import android.app.Person;
import android.app.RemoteInputHistoryItem;
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
@@ -526,6 +527,14 @@ public class ConversationLayout extends FrameLayout
        mSenderTextColor = color;
    }

    /**
     * @param color the color of the notification background
     */
    @RemotableViewMethod
    public void setNotificationBackgroundColor(int color) {
        mConversationIconBadge.setBackgroundTintList(ColorStateList.valueOf(color));
    }

    @RemotableViewMethod
    public void setMessageTextColor(int color) {
        mMessageTextColor = color;
+9 −0
Original line number Diff line number Diff line
@@ -382,6 +382,15 @@ public class MessagingLayout extends FrameLayout
        mSenderTextColor = color;
    }


    /**
     * @param color the color of the notification background
     */
    @RemotableViewMethod
    public void setNotificationBackgroundColor(int color) {
        // Nothing to do with this
    }

    @RemotableViewMethod
    public void setMessageTextColor(int color) {
        mMessageTextColor = color;