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

Commit 7ec7eb0f authored by Lucas Dupin's avatar Lucas Dupin
Browse files

Fix background color resolution

Test: manual
Bug: 174729670
Change-Id: Ib9fe70ea4be0a4b56ba9a964b8a08f4e48ebbd52
parent 73665572
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -83,6 +83,7 @@ import android.util.Log;
import android.util.Pair;
import android.util.SparseArray;
import android.util.proto.ProtoOutputStream;
import android.view.ContextThemeWrapper;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
@@ -6120,8 +6121,11 @@ public class Notification implements Parcelable
            int defaultColor = mInNightMode ? Color.BLACK : Color.WHITE;
            Resources.Theme theme = mContext.getTheme();
            if (theme == null) {
                // Running unit tests with mocked context
                return defaultColor;
            }
            theme = new ContextThemeWrapper(mContext, R.style.Theme_DeviceDefault_DayNight)
                    .getTheme();
            TypedArray ta = theme.obtainStyledAttributes(new int[]{R.attr.colorBackground});
            if (ta == null) {
                return defaultColor;
+1 −1
Original line number Diff line number Diff line
@@ -88,7 +88,7 @@

    <DateTimeView
        android:id="@+id/time"
        android:textAppearance="@style/TextAppearance.Material.Notification.Time"
        android:textAppearance="@style/TextAppearance.DeviceDefault.Notification.Time"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="@dimen/notification_header_separating_margin"