Commit | Line | Data |
---|---|---|
c00f212d | 1 | From 7c68e1ec39a7031020eaaadebdb0aee86f48cec1 Mon Sep 17 00:00:00 2001 |
6bcbafcd L |
2 | From: Alex Cruz <mazdarider23@gmail.com> |
3 | Date: Sat, 4 Feb 2017 14:13:26 +0100 | |
c00f212d | 4 | Subject: [PATCH 37/39] Set external QS tiles tint mode to SRC_ATOP |
6bcbafcd L |
5 | |
6 | While the external qs tile tint color was exposed, we had the same problem | |
7 | we had with the external icons in Settings which is if a themer set the color | |
8 | to transparent, they were SOL. | |
9 | ||
10 | This mirrors what @iskandar1023 did in the commit below | |
11 | http://review.projektsubstratum.com/#/c/286/ | |
12 | ||
13 | Before - https://i.imgur.com/trpefmZ.png | |
14 | After - https://i.imgur.com/ugAqrju.png | |
15 | ||
16 | Change-Id: I6d577573dd494d61a3e87abebd919b02a481db56 | |
17 | --- | |
18 | .../SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java | 2 ++ | |
19 | 1 file changed, 2 insertions(+) | |
20 | ||
21 | diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java b/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java | |
5596c080 | 22 | index 6fabc6101ca..dbdb614c8e1 100644 |
6bcbafcd L |
23 | --- a/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java |
24 | +++ b/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java | |
25 | @@ -23,6 +23,7 @@ import android.content.Context; | |
26 | import android.content.Intent; | |
27 | import android.content.pm.PackageManager; | |
28 | import android.content.pm.ResolveInfo; | |
29 | +import android.graphics.PorterDuff.Mode; | |
30 | import android.graphics.drawable.Drawable; | |
31 | import android.os.AsyncTask; | |
32 | import android.os.Handler; | |
33 | @@ -178,6 +179,7 @@ public class TileQueryHelper { | |
34 | } | |
35 | icon.mutate(); | |
36 | icon.setTint(mContext.getColor(R.color.external_qs_tile_tint_color)); | |
37 | + icon.setTintMode(Mode.SRC_ATOP); | |
38 | CharSequence label = info.serviceInfo.loadLabel(pm); | |
39 | addTile(spec, icon, label != null ? label.toString() : "null", appLabel, mContext); | |
40 | } | |
41 | -- | |
5596c080 | 42 | 2.11.1 |
6bcbafcd | 43 |