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

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

Merge "Set notification shelf icon color to primary text color" into sc-dev

parents e1396848 3bf20268
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import android.graphics.Rect;
import android.graphics.drawable.Icon;
import android.util.AttributeSet;
import android.util.Property;
import android.view.ContextThemeWrapper;
import android.view.View;
import android.view.animation.Interpolator;

@@ -35,6 +36,7 @@ import androidx.collection.ArrayMap;

import com.android.internal.statusbar.StatusBarIcon;
import com.android.keyguard.KeyguardUpdateMonitor;
import com.android.settingslib.Utils;
import com.android.systemui.Interpolators;
import com.android.systemui.R;
import com.android.systemui.statusbar.AlphaOptimizedFrameLayout;
@@ -168,6 +170,7 @@ public class NotificationIconContainer extends AlphaOptimizedFrameLayout {
    private Rect mIsolatedIconLocation;
    private int[] mAbsolutePosition = new int[2];
    private View mIsolatedIconForAnimation;
    private int mThemedTextColorPrimary;

    public NotificationIconContainer(Context context, AttributeSet attrs) {
        super(context, attrs);
@@ -179,6 +182,10 @@ public class NotificationIconContainer extends AlphaOptimizedFrameLayout {
        mDotPadding = getResources().getDimensionPixelSize(R.dimen.overflow_icon_dot_padding);
        mStaticDotRadius = getResources().getDimensionPixelSize(R.dimen.overflow_dot_radius);
        mStaticDotDiameter = 2 * mStaticDotRadius;
        final Context themedContext = new ContextThemeWrapper(getContext(),
                com.android.internal.R.style.Theme_DeviceDefault_DayNight);
        mThemedTextColorPrimary = Utils.getColorAttr(themedContext,
                com.android.internal.R.attr.textColorPrimary).getDefaultColor();
    }

    @Override
@@ -806,7 +813,8 @@ public class NotificationIconContainer extends AlphaOptimizedFrameLayout {
                    }
                }
                icon.setVisibleState(visibleState, animationsAllowed);
                icon.setIconColor(iconColor, needsCannedAnimation && animationsAllowed);
                icon.setIconColor(mThemedTextColorPrimary,
                        needsCannedAnimation && animationsAllowed);
                if (animate) {
                    animateTo(icon, animationProperties);
                } else {