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

Commit e24548dc authored by Edward Savage-Jones's avatar Edward Savage-Jones
Browse files

Color/tint the wifi/mobile status bar icons correctly

When in split screen the Wifi and mobile status bar can sometimes end
up in a state where they are tinted dark when they should be light and
vice versa.  This fixes that issue.

Bug: 142921186
Test: Manual - see buganizer
Change-Id: I2ac11db8048de1b2fb225d561ec34fda5000e3fe
parent d7f38d74
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -208,11 +208,9 @@ public class StatusBarMobileView extends FrameLayout implements DarkReceiver,

    @Override
    public void onDarkChanged(Rect area, float darkIntensity, int tint) {
        if (!isInArea(area, this)) {
            return;
        }
        float intensity = isInArea(area, this) ? darkIntensity : 0;
        mMobileDrawable.setTintList(
                ColorStateList.valueOf(mDualToneHandler.getSingleColor(darkIntensity)));
                ColorStateList.valueOf(mDualToneHandler.getSingleColor(intensity)));
        ColorStateList color = ColorStateList.valueOf(getTint(area, this, tint));
        mIn.setImageTintList(color);
        mOut.setImageTintList(color);
+7 −9
Original line number Diff line number Diff line
@@ -236,15 +236,13 @@ public class StatusBarWifiView extends FrameLayout implements DarkReceiver,

    @Override
    public void onDarkChanged(Rect area, float darkIntensity, int tint) {
        if (!isInArea(area, this)) {
            return;
        }

        mWifiIcon.setImageTintList(ColorStateList.valueOf(getTint(area, this, tint)));
        mIn.setImageTintList(ColorStateList.valueOf(getTint(area, this, tint)));
        mOut.setImageTintList(ColorStateList.valueOf(getTint(area, this, tint)));
        mDotView.setDecorColor(tint);
        mDotView.setIconColor(tint, false);
        int areaTint = getTint(area, this, tint);
        ColorStateList color = ColorStateList.valueOf(areaTint);
        mWifiIcon.setImageTintList(color);
        mIn.setImageTintList(color);
        mOut.setImageTintList(color);
        mDotView.setDecorColor(areaTint);
        mDotView.setIconColor(areaTint, false);
    }