Update for topic:rootless
[GitHub/Stricted/android_vendor_extra.git] / patches / frameworks / base / 0012-Themes-Expose-resolver-hardcoded-colors.patch
CommitLineData
c00f212d 1From 30faae7536ebb3d2879161ed8d0adde3bbaf1ebb Mon Sep 17 00:00:00 2001
6bcbafcd
L
2From: Dave Kover <dkover@cyngn.com>
3Date: Fri, 9 Dec 2016 10:47:17 -0700
c00f212d 4Subject: [PATCH 12/39] Themes: Expose resolver hardcoded colors
6bcbafcd
L
5
6commit dbbd5e70cc65002df41561474b03362022dd6716
7Author: Dave Kover <dkover@cyngn.com>
8Date: Wed Feb 18 16:11:14 2015 -0800
9
10 Themes: Expose resolver hardcoded colors
11
12 Expose background colors of the resolver list.
13
14 Change-Id: I3a0a460c5ffe0f5057b3b9ec92faa7a3e09c9e01
15
16commit 0343eb126f3901a3857791137f74fa805bb9d75c
17Author: Thyrus11 <thyrus11@gmail.com>
18Date: Sat Feb 21 07:19:42 2015 +0100
19
20 Themes: Make resolver list fully themeable
21
22 Follow-up on commit cc9e3b8fcba95b911d1cda36f7770c410058aa8b.
23
24 Change-Id: I3f006a1157db9d0b151a4fe8edf50e7edc7a0b9f
25
26commit c7d973809488b801e8c708d740009f1233bb762e
27Author: Nicholas Chum <nicholaschum@gmail.com>
28Date: Sun Nov 8 05:27:28 2015 -0500
29
30 Themes: Allow Resolver List BG to be fully themed
31
32 We are able to trace the activity of the new resolver/chooser through
33 different
34 methods, thus leading us to the Java file:
35 \com\android\internal\app\ChooserActivity.java
36 Here we see that the exposed "chooser_service_row_background_color" is
37 available, but not the rest of the activity, so we look into R.layout's,
38 and we
39 find chooser_grid to be the only one containing hardcoded
40 "@color/white" values (as this is framework, we assume this is also
41 known as
42 "@android:color/white" to themers).
43
44 Expose all "@color/white" values from this file to resolver_list_bg.
45
46 Change-Id: I286d92b5d1f672c8adb3c0af1951793521536d90
47
48Change-Id: Iec7951147bbbc99aee6b06ae50c1acc7b9c01a7f
49---
50 core/res/res/layout/chooser_grid.xml | 6 +++---
51 .../res/layout/resolver_different_item_header.xml | 2 +-
52 core/res/res/layout/resolver_list.xml | 8 ++++----
53 core/res/res/layout/resolver_list_with_default.xml | 6 +++---
54 core/res/res/values/projekt_colors.xml | 20 ++++++++++++++++++++
55 5 files changed, 31 insertions(+), 11 deletions(-)
56 create mode 100644 core/res/res/values/projekt_colors.xml
57
58diff --git a/core/res/res/layout/chooser_grid.xml b/core/res/res/layout/chooser_grid.xml
5596c080 59index d8dd447e6a7..78c2e05f372 100644
6bcbafcd
L
60--- a/core/res/res/layout/chooser_grid.xml
61+++ b/core/res/res/layout/chooser_grid.xml
62@@ -31,7 +31,7 @@
63 android:layout_alwaysShow="true"
64 android:elevation="8dp"
65 android:paddingStart="16dp"
66- android:background="@color/white" >
67+ android:background="@color/resolver_list_bg" >
68 <TextView android:id="@+id/profile_button"
69 android:layout_width="wrap_content"
70 android:layout_height="48dp"
71@@ -74,7 +74,7 @@
72 android:id="@+id/resolver_list"
73 android:clipToPadding="false"
74 android:scrollbarStyle="outsideOverlay"
75- android:background="@color/white"
76+ android:background="@color/resolver_list_bg"
77 android:elevation="8dp"
78 android:listSelector="@color/transparent"
79 android:divider="@null"
80@@ -85,7 +85,7 @@
81 android:layout_width="match_parent"
82 android:layout_height="wrap_content"
83 android:layout_alwaysShow="true"
84- android:background="@color/white"
85+ android:background="@color/resolver_list_bg"
86 android:text="@string/noApplications"
87 android:padding="32dp"
88 android:gravity="center"
89diff --git a/core/res/res/layout/resolver_different_item_header.xml b/core/res/res/layout/resolver_different_item_header.xml
5596c080 90index 58891363e20..201c8c686fe 100644
6bcbafcd
L
91--- a/core/res/res/layout/resolver_different_item_header.xml
92+++ b/core/res/res/layout/resolver_different_item_header.xml
93@@ -29,6 +29,6 @@
94 android:paddingEnd="16dp"
95 android:paddingTop="8dp"
96 android:paddingBottom="8dp"
97- android:background="@color/white"
98+ android:background="@color/resolver_list_bg"
99 android:elevation="8dp"
100 />
101diff --git a/core/res/res/layout/resolver_list.xml b/core/res/res/layout/resolver_list.xml
5596c080 102index c4e8e9cb63b..1b6230a5a09 100644
6bcbafcd
L
103--- a/core/res/res/layout/resolver_list.xml
104+++ b/core/res/res/layout/resolver_list.xml
105@@ -30,7 +30,7 @@
106 android:layout_height="wrap_content"
107 android:layout_alwaysShow="true"
108 android:elevation="8dp"
109- android:background="@color/white">
110+ android:background="@color/resolver_list_bg">
111
112 <TextView
113 android:id="@+id/profile_button"
114@@ -69,7 +69,7 @@
115 android:id="@+id/resolver_list"
116 android:clipToPadding="false"
117 android:scrollbarStyle="outsideOverlay"
118- android:background="@color/white"
119+ android:background="@color/resolver_list_bg"
120 android:elevation="8dp"
121 android:nestedScrollingEnabled="true"
122 android:scrollIndicators="top|bottom"
123@@ -78,7 +78,7 @@
124 <TextView android:id="@+id/empty"
125 android:layout_width="match_parent"
126 android:layout_height="wrap_content"
127- android:background="@color/white"
128+ android:background="@color/resolver_list_bg"
129 android:elevation="8dp"
130 android:layout_alwaysShow="true"
131 android:text="@string/noApplications"
132@@ -99,7 +99,7 @@
133 android:orientation="horizontal"
134 android:layoutDirection="locale"
135 android:measureWithLargestChild="true"
136- android:background="@color/white"
137+ android:background="@color/resolver_list_bg"
138 android:paddingTop="8dp"
139 android:paddingBottom="8dp"
140 android:paddingStart="12dp"
141diff --git a/core/res/res/layout/resolver_list_with_default.xml b/core/res/res/layout/resolver_list_with_default.xml
5596c080 142index 02dc2ede430..d3baf682fe0 100644
6bcbafcd
L
143--- a/core/res/res/layout/resolver_list_with_default.xml
144+++ b/core/res/res/layout/resolver_list_with_default.xml
145@@ -29,7 +29,7 @@
146 android:layout_height="wrap_content"
147 android:layout_alwaysShow="true"
148 android:orientation="vertical"
149- android:background="@color/white"
150+ android:background="@color/resolver_list_bg"
151 android:elevation="8dp">
152
153 <LinearLayout
154@@ -110,7 +110,7 @@
155 android:paddingBottom="8dp"
156 android:paddingStart="12dp"
157 android:paddingEnd="12dp"
158- android:background="@color/white"
159+ android:background="@color/resolver_list_bg"
160 android:elevation="8dp">
161
162 <Button
163@@ -150,7 +150,7 @@
164 android:id="@+id/resolver_list"
165 android:clipToPadding="false"
166 android:scrollbarStyle="outsideOverlay"
167- android:background="@color/white"
168+ android:background="@color/resolver_list_bg"
169 android:elevation="8dp"
170 android:nestedScrollingEnabled="true"
171 android:divider="@null" />
172diff --git a/core/res/res/values/projekt_colors.xml b/core/res/res/values/projekt_colors.xml
173new file mode 100644
5596c080 174index 00000000000..c6dbc1ca1c9
6bcbafcd
L
175--- /dev/null
176+++ b/core/res/res/values/projekt_colors.xml
177@@ -0,0 +1,20 @@
178+<?xml version="1.0" encoding="utf-8"?>
179+<!--
180+ Copyright (c) 2016 Projekt Substratum
181+
182+ Licensed under the Apache License, Version 2.0 (the "License");
183+ you may not use this file except in compliance with the License.
184+ You may obtain a copy of the License at
185+
186+ http://www.apache.org/licenses/LICENSE-2.0
187+
188+ Unless required by applicable law or agreed to in writing, software
189+ distributed under the License is distributed on an "AS IS" BASIS,
190+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
191+ See the License for the specific language governing permissions and
192+ limitations under the License.
193+-->
194+
195+<resources>
196+ <color name="resolver_list_bg">@color/white</color>
197+</resources>
198--
5596c080 1992.11.1
6bcbafcd 200