Update frameworks/base patches
[GitHub/Stricted/android_vendor_extra.git] / patches / frameworks / base / 0021-Allow-prevention-of-doze-notification-color-inversio.patch
1 From 72155ae90df8ca1a97cc567aa9525081f50f0365 Mon Sep 17 00:00:00 2001
2 From: Daniel Koman <dankoman30@gmail.com>
3 Date: Fri, 17 Apr 2015 11:56:28 -0600
4 Subject: [PATCH 21/40] Allow prevention of doze notification color inversion
5
6 Removed empty newline at the end -- KreAch3R
7 Removed slims files for aosp roms -- Bgill55
8
9 Change-Id: I2d361c34904f3d168894b8b1741456319fd68456
10 ---
11 core/res/res/values/projekt_config.xml | 5 +++++
12 core/res/res/values/projekt_symbols.xml | 3 +++
13 packages/SystemUI/src/com/android/systemui/ViewInvertHelper.java | 4 +++-
14 3 files changed, 11 insertions(+), 1 deletion(-)
15
16 diff --git a/core/res/res/values/projekt_config.xml b/core/res/res/values/projekt_config.xml
17 index f6eb90a49eb..5234959fc9e 100644
18 --- a/core/res/res/values/projekt_config.xml
19 +++ b/core/res/res/values/projekt_config.xml
20 @@ -22,4 +22,9 @@
21 <!-- True if the notifications should dynamically tint the app icon and app title -->
22 <bool name="config_allowNotificationIconTextTinting">true</bool>
23
24 + <!-- Whether doze should invert colors for notifications. If the RRO theme causes
25 + the NORMAL notification background to be dark and the text to be light, this boolean
26 + needs to be set to false, to prevent the doze notifications from being light -->
27 + <bool name="config_invert_colors_on_doze">true</bool>
28 +
29 </resources>
30 diff --git a/core/res/res/values/projekt_symbols.xml b/core/res/res/values/projekt_symbols.xml
31 index f597a5f3f7b..16a5728e6c9 100644
32 --- a/core/res/res/values/projekt_symbols.xml
33 +++ b/core/res/res/values/projekt_symbols.xml
34 @@ -22,4 +22,7 @@
35 <java-symbol type="color" name="notification_text_default_color" />
36 <java-symbol type="color" name="sender_text_color" />
37
38 + <!-- Doze invert -->
39 + <java-symbol type="bool" name="config_invert_colors_on_doze" />
40 +
41 </resources>
42 diff --git a/packages/SystemUI/src/com/android/systemui/ViewInvertHelper.java b/packages/SystemUI/src/com/android/systemui/ViewInvertHelper.java
43 index 2c96e31d9f5..65fd1158b95 100644
44 --- a/packages/SystemUI/src/com/android/systemui/ViewInvertHelper.java
45 +++ b/packages/SystemUI/src/com/android/systemui/ViewInvertHelper.java
46 @@ -20,6 +20,7 @@ import android.animation.Animator;
47 import android.animation.AnimatorListenerAdapter;
48 import android.animation.ValueAnimator;
49 import android.content.Context;
50 +import android.content.res.Resources;
51 import android.graphics.ColorMatrix;
52 import android.graphics.ColorMatrixColorFilter;
53 import android.graphics.Paint;
54 @@ -90,7 +91,8 @@ public class ViewInvertHelper {
55 }
56
57 public void update(boolean invert) {
58 - if (invert) {
59 + if (invert && Resources.getSystem().getBoolean(
60 + com.android.internal.R.bool.config_invert_colors_on_doze)) {
61 updateInvertPaint(1f);
62 for (int i = 0; i < mTargets.size(); i++) {
63 mTargets.get(i).setLayerType(View.LAYER_TYPE_HARDWARE, mDarkPaint);
64 --
65 2.11.1
66