-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplatform_packages_apps_ThemePicker.patch
More file actions
213 lines (196 loc) · 8.14 KB
/
platform_packages_apps_ThemePicker.patch
File metadata and controls
213 lines (196 loc) · 8.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
From 6ca7c33ba7f4ce4a51c650295a2c6995df021304 Mon Sep 17 00:00:00 2001
From: Luca Stefani <luca.stefani.ge1@gmail.com>
Date: Fri, 1 Nov 2019 21:14:29 +0100
Subject: [PATCH 1/4] Add wallpaper privapp whitelist
Change-Id: I044b1d9201ac0b8780fc37a387f401f3dd0ddeac
---
Android.bp | 9 ++++++++
privapp_whitelist_com.android.wallpaper.xml | 24 +++++++++++++++++++++
2 files changed, 33 insertions(+)
create mode 100644 privapp_whitelist_com.android.wallpaper.xml
diff --git a/Android.bp b/Android.bp
index 8676f26..c44954a 100644
--- a/Android.bp
+++ b/Android.bp
@@ -135,4 +135,13 @@ android_app {
additional_manifests: [":WallpaperPicker2_Manifest"],
overrides: ["WallpaperPicker", "WallpaperPicker2"],
static_libs: ["ThemePickerApplicationLib"],
+ required: ["privapp_whitelist_com.android.wallpaper"],
+}
+
+prebuilt_etc {
+ name: "privapp_whitelist_com.android.wallpaper",
+ system_ext_specific: true,
+ src: "privapp_whitelist_com.android.wallpaper.xml",
+ sub_dir: "permissions",
+ filename_from_src: true,
}
diff --git a/privapp_whitelist_com.android.wallpaper.xml b/privapp_whitelist_com.android.wallpaper.xml
new file mode 100644
index 0000000..43a8ca3
--- /dev/null
+++ b/privapp_whitelist_com.android.wallpaper.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2019 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License
+ -->
+<permissions>
+ <privapp-permissions package="com.android.wallpaper">
+ <permission name="android.permission.CHANGE_OVERLAY_PACKAGES"/>
+ <permission name="android.permission.MODIFY_DAY_NIGHT_MODE"/>
+ <permission name="android.permission.SET_WALLPAPER_COMPONENT"/>
+ <permission name="android.permission.WRITE_SECURE_SETTINGS"/>
+ </privapp-permissions>
+</permissions>
--
2.34.1
From b7723873902a0dacaea0f15f00f1da073a62708b Mon Sep 17 00:00:00 2001
From: LuK1337 <priv.luk@gmail.com>
Date: Tue, 15 Sep 2020 03:27:19 +0200
Subject: [PATCH 2/4] Add wallpaper default permissions
Change-Id: If43a594da31fbab9280ce45b049737f6c534b620
---
Android.bp | 13 ++++++-
default_permissions_com.android.wallpaper.xml | 37 +++++++++++++++++++
2 files changed, 49 insertions(+), 1 deletion(-)
create mode 100644 default_permissions_com.android.wallpaper.xml
diff --git a/Android.bp b/Android.bp
index c44954a..440b619 100644
--- a/Android.bp
+++ b/Android.bp
@@ -135,7 +135,18 @@ android_app {
additional_manifests: [":WallpaperPicker2_Manifest"],
overrides: ["WallpaperPicker", "WallpaperPicker2"],
static_libs: ["ThemePickerApplicationLib"],
- required: ["privapp_whitelist_com.android.wallpaper"],
+ required: [
+ "default_permissions_com.android.wallpaper",
+ "privapp_whitelist_com.android.wallpaper"
+ ],
+}
+
+prebuilt_etc {
+ name: "default_permissions_com.android.wallpaper",
+ system_ext_specific: true,
+ src: "default_permissions_com.android.wallpaper.xml",
+ sub_dir: "default-permissions",
+ filename_from_src: true,
}
prebuilt_etc {
diff --git a/default_permissions_com.android.wallpaper.xml b/default_permissions_com.android.wallpaper.xml
new file mode 100644
index 0000000..41b23ce
--- /dev/null
+++ b/default_permissions_com.android.wallpaper.xml
@@ -0,0 +1,37 @@
+<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
+<!--
+ Copyright (C) 2019-2020 The LineageOS Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!--
+ This file contains permissions to be granted by default. Default
+ permissions are granted to special platform components and to apps
+ that are approved to get default grants. The special components
+ are apps that are expected to work out-of-the-box as they provide
+ core use cases such as default dialer, default email, etc. These
+ grants are managed by the platform. The apps that are additionally
+ approved for default grants are ones that provide carrier specific
+ functionality, ones legally required at some location, ones providing
+ alternative disclosure and opt-out UI, ones providing highlight features
+ of a dedicated device, etc. This file contains only the latter exceptions.
+ Fixed permissions cannot be controlled by the user and need a special
+ approval. Typically these are to ensure either legally mandated functions
+ or the app is considered a part of the OS.
+-->
+<exceptions>
+ <exception package="com.android.wallpaper">
+ <permission name="android.permission.READ_EXTERNAL_STORAGE" fixed="false"/>
+ </exception>
+</exceptions>
--
2.34.1
From 571103b12f87706ab423894cb7a98de9ab06a1e7 Mon Sep 17 00:00:00 2001
From: Luca Stefani <luca.stefani.ge1@gmail.com>
Date: Fri, 1 Nov 2019 23:17:08 +0100
Subject: [PATCH 3/4] Specify we read and write launcher settings
Change-Id: Ifc8196588443b007602118389ca76d34ab531f14
---
AndroidManifest.xml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 6e5844d..555d3b6 100755
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -60,6 +60,9 @@
</intent>
</queries>
+ <uses-permission android:name="com.android.launcher3.permission.READ_SETTINGS" />
+ <uses-permission android:name="com.android.launcher3.permission.WRITE_SETTINGS" />
+
<application
tools:replace="android:icon,android:name"
android:extractNativeLibs="false"
--
2.34.1
From 22add17297d4e44c663aa85de175b7fcfb8e3f69 Mon Sep 17 00:00:00 2001
From: Danny Lin <danny@kdrag0n.dev>
Date: Tue, 5 Oct 2021 22:40:58 -0700
Subject: [PATCH 4/4] Add permission for launcher preview rendering
Change-Id: Ie707dcd98161e8f5993b0504295fddc3f395cd20
---
AndroidManifest.xml | 1 +
privapp_whitelist_com.android.wallpaper.xml | 1 +
2 files changed, 2 insertions(+)
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 555d3b6..02fa70f 100755
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -13,6 +13,7 @@
<uses-permission android:name="android.permission.CHANGE_OVERLAY_PACKAGES"/>
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS"/>
<uses-permission android:name="android.permission.SET_WALLPAPER_COMPONENT" />
+ <uses-permission android:name="android.permission.BIND_WALLPAPER" />
<uses-permission android:name="android.permission.READ_DEVICE_CONFIG" />
<uses-permission android:name="android.permission.MODIFY_DAY_NIGHT_MODE" />
<uses-permission android:name="android.permission.CUSTOMIZE_SYSTEM_UI" />
diff --git a/privapp_whitelist_com.android.wallpaper.xml b/privapp_whitelist_com.android.wallpaper.xml
index 43a8ca3..0ae3fbb 100644
--- a/privapp_whitelist_com.android.wallpaper.xml
+++ b/privapp_whitelist_com.android.wallpaper.xml
@@ -16,6 +16,7 @@
-->
<permissions>
<privapp-permissions package="com.android.wallpaper">
+ <permission name="android.permission.BIND_WALLPAPER"/>
<permission name="android.permission.CHANGE_OVERLAY_PACKAGES"/>
<permission name="android.permission.MODIFY_DAY_NIGHT_MODE"/>
<permission name="android.permission.SET_WALLPAPER_COMPONENT"/>
--
2.34.1