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

Commit 41572fda authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix background color resolution"

parents 0cfae2f4 7ec7eb0f
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"