From 6fb50762eec720d9fa2597b7e256a95ca001d4e9 Mon Sep 17 00:00:00 2001 From: Adrian DC Date: Sun, 17 Jun 2018 12:40:26 +0200 Subject: [PATCH] NetworkTraffic: Resolve status bar indicators tints * Apply the color tint with PorterDuff.Mode.MULTIPLY as the original color is white, with transparencies * Use the DarkReceiver tint's value as icons tint * Results: Before and after: https://ibb.co/k15ony * Test: Bright wallpaper with status bar contrasts: https://ibb.co/dxupSy Change-Id: I4f31cf5a9a3db4018543603a891fa7967ccbb4a3 --- .../org/lineageos/internal/statusbar/NetworkTraffic.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sdk/src/java/org/lineageos/internal/statusbar/NetworkTraffic.java b/sdk/src/java/org/lineageos/internal/statusbar/NetworkTraffic.java index 8bed2f25..02853d0f 100644 --- a/sdk/src/java/org/lineageos/internal/statusbar/NetworkTraffic.java +++ b/sdk/src/java/org/lineageos/internal/statusbar/NetworkTraffic.java @@ -16,7 +16,6 @@ package org.lineageos.internal.statusbar; -import android.animation.ArgbEvaluator; import android.content.BroadcastReceiver; import android.content.ContentResolver; import android.content.Context; @@ -110,8 +109,7 @@ public class NetworkTraffic extends TextView { private LineageStatusBarItem.DarkReceiver mDarkReceiver = new LineageStatusBarItem.DarkReceiver() { public void onDarkChanged(Rect area, float darkIntensity, int tint) { - mIconTint = (int) ArgbEvaluator.getInstance().evaluate(darkIntensity, - mLightModeFillColor, mDarkModeFillColor); + mIconTint = tint; setTextColor(mIconTint); updateTrafficDrawableColor(); } @@ -365,7 +363,7 @@ public class NetworkTraffic extends TextView { private void updateTrafficDrawableColor() { if (mDrawable != null) { - mDrawable.setColorFilter(mIconTint, PorterDuff.Mode.SRC_ATOP); + mDrawable.setColorFilter(mIconTint, PorterDuff.Mode.MULTIPLY); } } }