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
This commit is contained in:
Edward Savage-Jones
2019-10-19 22:29:31 +02:00
parent d7f38d742b
commit e24548dced
2 changed files with 9 additions and 13 deletions

View File

@@ -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);

View File

@@ -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);
}