summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdward Savage-Jones <edward.savage-jones@sony.com>2019-10-19 22:29:31 +0200
committerLuca Stefani <luca.stefani.ge1@gmail.com>2019-11-08 17:53:32 +0100
commit3b6b5efac9cd3c2bf95cb02971eb11a707253d1a (patch)
tree93d89d9dc713313301b71f3846bd1f70b16b8393
parentf0717d6f1b7d29d11a8ab77866e615372816b894 (diff)
downloadandroid_frameworks_base-3b6b5efac9cd3c2bf95cb02971eb11a707253d1a.tar.gz
android_frameworks_base-3b6b5efac9cd3c2bf95cb02971eb11a707253d1a.tar.bz2
android_frameworks_base-3b6b5efac9cd3c2bf95cb02971eb11a707253d1a.zip
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
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/StatusBarMobileView.java6
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/StatusBarWifiView.java16
2 files changed, 9 insertions, 13 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarMobileView.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarMobileView.java
index 689d161c2ee..239addd4ee1 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarMobileView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarMobileView.java
@@ -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);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarWifiView.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarWifiView.java
index 23e2d277034..6dbcc44e385 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarWifiView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarWifiView.java
@@ -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);
}