Initial commit
[GitHub/Stricted/android_vendor_extra.git] / frameworks / base / 0037-Set-external-QS-tiles-tint-mode-to-SRC_ATOP.patch
1 From 1a4d5be7f78b87480be19243ae88e543a1b9db58 Mon Sep 17 00:00:00 2001
2 From: Alex Cruz <mazdarider23@gmail.com>
3 Date: Sat, 4 Feb 2017 14:13:26 +0100
4 Subject: [PATCH 37/38] Set external QS tiles tint mode to SRC_ATOP
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
22 index 6fabc61..dbdb614 100644
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 --
42 2.9.3
43