Update frameworks/base patches for android-7.1.1_r21
[GitHub/Stricted/android_vendor_extra.git] / patches / frameworks / base / 0037-Set-external-QS-tiles-tint-mode-to-SRC_ATOP.patch
CommitLineData
a7bdce84 1From 2d6fcbfe3de3fef2a22112ad440a23064f06c5e6 Mon Sep 17 00:00:00 2001
6bcbafcd
L
2From: Alex Cruz <mazdarider23@gmail.com>
3Date: Sat, 4 Feb 2017 14:13:26 +0100
c00f212d 4Subject: [PATCH 37/39] Set external QS tiles tint mode to SRC_ATOP
6bcbafcd
L
5
6While the external qs tile tint color was exposed, we had the same problem
7we had with the external icons in Settings which is if a themer set the color
8to transparent, they were SOL.
9
10This mirrors what @iskandar1023 did in the commit below
11http://review.projektsubstratum.com/#/c/286/
12
13Before - https://i.imgur.com/trpefmZ.png
14After - https://i.imgur.com/ugAqrju.png
15
16Change-Id: I6d577573dd494d61a3e87abebd919b02a481db56
17---
18 .../SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java | 2 ++
19 1 file changed, 2 insertions(+)
20
21diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java b/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java
5596c080 22index 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 422.11.1
6bcbafcd 43