summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Android.bp16
-rwxr-xr-xAndroidManifest.xml15
-rw-r--r--privapp_whitelist_com.android.wallpaper.xml26
-rw-r--r--res/drawable/ic_home.xml21
-rw-r--r--res/drawable/ic_launcher_background.xml17
-rw-r--r--res/drawable/ic_launcher_foreground.xml42
-rw-r--r--res/drawable/icon_foreground.xml65
-rw-r--r--res/layout/themed_icon_section_view.xml14
-rw-r--r--res/mipmap-anydpi/ic_launcher.xml9
9 files changed, 121 insertions, 104 deletions
diff --git a/Android.bp b/Android.bp
index f6c85581..327e23d8 100644
--- a/Android.bp
+++ b/Android.bp
@@ -118,5 +118,19 @@ android_app {
platform_apis: true,
manifest: "AndroidManifest.xml",
additional_manifests: [":WallpaperPicker2_Manifest"],
- overrides: ["WallpaperPicker2"],
+ overrides: [
+ "WallpaperCropper",
+ "WallpaperPicker2",
+ ],
+ 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/AndroidManifest.xml b/AndroidManifest.xml
index 4e71bcc6..140c5f1d 100755
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -6,11 +6,14 @@
<uses-sdk android:targetSdkVersion="30" android:minSdkVersion="28"/>
<uses-permission android:name="android.permission.CHANGE_OVERLAY_PACKAGES"/>
+ <uses-permission android:name="android.permission.CUSTOMIZE_SYSTEM_UI" />
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS"/>
<uses-permission android:name="android.permission.SET_WALLPAPER_COMPONENT" />
- <uses-permission android:name="android.permission.READ_DEVICE_CONFIG" />
+ <uses-permission android:name="android.permission.BIND_WALLPAPER" />
+
<uses-permission android:name="android.permission.MODIFY_DAY_NIGHT_MODE" />
- <uses-permission android:name="android.permission.CUSTOMIZE_SYSTEM_UI" />
+ <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
+ <uses-permission android:name="android.permission.READ_DEVICE_CONFIG" />
<queries>
<!-- Specific intents Wallpaper picker query for -->
@@ -43,13 +46,19 @@
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME" />
</intent>
+
+ <!-- Themes stub package -->
+ <package android:name="com.android.customization" />
</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"
android:hardwareAccelerated="true"
- android:icon="@drawable/ic_home"
+ android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:requiredForAllUsers="true"
android:restoreAnyVersion="true"
diff --git a/privapp_whitelist_com.android.wallpaper.xml b/privapp_whitelist_com.android.wallpaper.xml
new file mode 100644
index 00000000..0f5706b3
--- /dev/null
+++ b/privapp_whitelist_com.android.wallpaper.xml
@@ -0,0 +1,26 @@
+<?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.BIND_WALLPAPER"/>
+ <permission name="android.permission.CHANGE_OVERLAY_PACKAGES"/>
+ <permission name="android.permission.MODIFY_DAY_NIGHT_MODE"/>
+ <permission name="android.permission.READ_WALLPAPER_INTERNAL"/>
+ <permission name="android.permission.SET_WALLPAPER_COMPONENT"/>
+ <permission name="android.permission.WRITE_SECURE_SETTINGS"/>
+ </privapp-permissions>
+</permissions>
diff --git a/res/drawable/ic_home.xml b/res/drawable/ic_home.xml
deleted file mode 100644
index be8f1fe8..00000000
--- a/res/drawable/ic_home.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?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.
--->
-<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
- <background android:drawable="?android:colorAccent" />
- <foreground>
- <inset android:inset="16.6%" android:drawable="@drawable/icon_foreground" />
- </foreground>
-</adaptive-icon>
diff --git a/res/drawable/ic_launcher_background.xml b/res/drawable/ic_launcher_background.xml
new file mode 100644
index 00000000..51128595
--- /dev/null
+++ b/res/drawable/ic_launcher_background.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ SPDX-FileCopyrightText: 2022 The LineageOS Project
+ SPDX-License-Identifier: Apache-2.0
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="108dp"
+ android:height="108dp"
+ android:viewportWidth="108"
+ android:viewportHeight="108">
+ <path
+ android:pathData="M0,0h108v108h-108z"
+ android:fillColor="#0092E4"/>
+ <path
+ android:pathData="M54,76C41.878,76 32,66.122 32,54C32,41.878 41.878,32 54,32C66.122,32 76,40.888 76,51.8C76,59.082 70.082,64 62.8,64H59C52.925,64 53.5,67 55,68C56.5,69 60,69 60,72C60,75 57.036,76 54,76Z"
+ android:fillColor="#ffffff"/>
+</vector>
diff --git a/res/drawable/ic_launcher_foreground.xml b/res/drawable/ic_launcher_foreground.xml
new file mode 100644
index 00000000..8fef0757
--- /dev/null
+++ b/res/drawable/ic_launcher_foreground.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ SPDX-FileCopyrightText: 2022 The LineageOS Project
+ SPDX-License-Identifier: Apache-2.0
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:aapt="http://schemas.android.com/aapt"
+ android:width="108dp"
+ android:height="108dp"
+ android:viewportWidth="108"
+ android:viewportHeight="108">
+ <group>
+ <clip-path
+ android:pathData="M0,0h108v108h-108z"/>
+ <path
+ android:pathData="M68,50m-4,0a4,4 0,1 1,8 0a4,4 0,1 1,-8 0"
+ android:fillColor="#CBDEFB"/>
+ <path
+ android:pathData="M40,50m-4,0a4,4 0,1 1,8 0a4,4 0,1 1,-8 0"
+ android:fillColor="#00354A"/>
+ <path
+ android:pathData="M60,41m-4,0a4,4 0,1 1,8 0a4,4 0,1 1,-8 0"
+ android:fillColor="#0092E4"/>
+ <path
+ android:pathData="M48,41m-4,0a4,4 0,1 1,8 0a4,4 0,1 1,-8 0"
+ android:fillColor="#00689B"/>
+ <path
+ android:pathData="M28.54,28.54m-72,0a72,72 0,1 1,144 0a72,72 0,1 1,-144 0"
+ android:fillAlpha="0.6">
+ <aapt:attr name="android:fillColor">
+ <gradient
+ android:gradientRadius="72"
+ android:centerX="28.54"
+ android:centerY="28.54"
+ android:type="radial">
+ <item android:offset="0" android:color="#19FFFFFF"/>
+ <item android:offset="1" android:color="#00FFFFFF"/>
+ </gradient>
+ </aapt:attr>
+ </path>
+ </group>
+</vector>
diff --git a/res/drawable/icon_foreground.xml b/res/drawable/icon_foreground.xml
deleted file mode 100644
index 1138c561..00000000
--- a/res/drawable/icon_foreground.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-<?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.
--->
-<vector android:height="72dp" android:viewportHeight="512"
- android:viewportWidth="512" android:width="72dp"
- xmlns:aapt="http://schemas.android.com/aapt" xmlns:android="http://schemas.android.com/apk/res/android">
- <path android:pathData="M512.25,248.55l-118,-118 -4.86,-4.86c-1.72,-1.65 -3.47,-3.28 -5.26,-4.86 -33,-29.29 -78.25,-47.41 -128.1,-47.41 -100.59,0 -182.56,82 -182.56,182.56a181.9,181.9 0,0 0,50.09 125.42h0l0.14,0.14q3.39,3.58 7,7L254.16,512H512.25Z">
- <aapt:attr name="android:fillColor">
- <gradient android:endX="512.25" android:endY="292.69"
- android:startX="73.44" android:startY="292.69" android:type="linear">
- <item android:color="#331C3AA9" android:offset="0"/>
- <item android:color="#051C3AA9" android:offset="1"/>
- </gradient>
- </aapt:attr>
- </path>
- <path android:fillAlpha="0.2" android:fillColor="#1a237e"
- android:pathData="M256,438.51c-100.59,0 -182.56,-82 -182.56,-182.56S155.41,73.39 256,73.39s182.56,73.75 182.56,164.3A109.63,109.63 0,0 1,329 347.23L296.71,347.23a9,9 0,0 0,-9.13 9.12,9.65 9.65,0 0,0 2.38,6 46.46,46.46 0,0 1,11.68 30.49A45.66,45.66 0,0 1,256 438.51ZM155.59,274.2a27.38,27.38 0,1 0,-27.38 -27.38A27.38,27.38 0,0 0,155.59 274.2ZM210.36,201.2A27.39,27.39 0,1 0,183 173.8,27.38 27.38,0 0,0 210.36,201.18ZM301.64,201.2a27.39,27.39 0,1 0,-27.38 -27.38A27.38,27.38 0,0 0,301.64 201.18ZM356.41,274.2A27.38,27.38 0,1 0,329 246.82,27.38 27.38,0 0,0 356.41,274.2Z" android:strokeAlpha="0.2"/>
- <path android:fillColor="#fff" android:pathData="M389.36,125.66l4.86,4.86C392.64,128.87 391,127.25 389.36,125.66Z"/>
- <path android:fillColor="#eee" android:pathData="M256,438.51c-100.59,0 -182.56,-82 -182.56,-182.56S155.41,73.39 256,73.39s182.56,73.75 182.56,164.3A109.63,109.63 0,0 1,329 347.23L296.71,347.23a9,9 0,0 0,-9.13 9.12,9.65 9.65,0 0,0 2.38,6 46.46,46.46 0,0 1,11.68 30.49A45.66,45.66 0,0 1,256 438.51ZM155.59,274.2a27.38,27.38 0,1 0,-27.38 -27.38A27.38,27.38 0,0 0,155.59 274.2ZM210.36,201.2A27.39,27.39 0,1 0,183 173.8,27.38 27.38,0 0,0 210.36,201.18ZM301.64,201.2a27.39,27.39 0,1 0,-27.38 -27.38A27.38,27.38 0,0 0,301.64 201.18ZM356.41,274.2A27.38,27.38 0,1 0,329 246.82,27.38 27.38,0 0,0 356.41,274.2Z"/>
- <path android:fillAlpha="0.4" android:fillColor="#fff" android:pathData="M256,75.39c100.24,0 182,73.24 182.55,163.36 0,-0.36 0,-0.71 0,-1.06 0,-90.55 -82,-164.3 -182.56,-164.3S73.44,155.36 73.44,256c0,0.33 0,0.66 0,1C74,156.82 155.74,75.39 256,75.39Z"/>
- <path android:fillAlpha="0.1" android:fillColor="#212121" android:pathData="M329,345.23H296.71a9,9 0,0 0,-9.13 9.12,7.45 7.45,0 0,0 0.07,0.95 9,9 0,0 1,9.06 -8.07H329A109.63,109.63 0,0 0,438.56 237.69c0,-0.31 0,-0.63 0,-0.94A109.62,109.62 0,0 1,329 345.23Z"/>
- <path android:fillAlpha="0.1" android:fillColor="#212121" android:pathData="M256,436.51C155.74,436.51 74,355.08 73.45,255c0,0.33 0,0.66 0,1 0,100.59 82,182.56 182.56,182.56a45.66,45.66 0,0 0,45.64 -45.64c0,-0.35 0,-0.69 0,-1A45.66,45.66 0,0 1,256 436.51Z"/>
- <path android:fillAlpha="0.1" android:fillColor="#212121" android:pathData="M356.41,221.44a27.38,27.38 0,0 1,27.36 26.38c0,-0.33 0,-0.67 0,-1a27.39,27.39 0,0 0,-54.77 0c0,0.33 0,0.67 0,1A27.38,27.38 0,0 1,356.41 221.44Z"/>
- <path android:fillAlpha="0.1" android:fillColor="#212121" android:pathData="M301.64,148.41A27.39,27.39 0,0 1,329 174.8c0,-0.34 0,-0.67 0,-1a27.38,27.38 0,1 0,-54.76 0c0,0.33 0,0.66 0,1A27.39,27.39 0,0 1,301.64 148.41Z"/>
- <path android:fillColor="#8ab4f8" android:pathData="M155.59,246.82m-27.38,0a27.38,27.38 0,1 1,54.76 0a27.38,27.38 0,1 1,-54.76 0"/>
- <path android:fillAlpha="0.6" android:fillColor="#8ab4f8"
- android:pathData="M210.36,173.8m-27.38,0a27.38,27.38 0,1 1,54.76 0a27.38,27.38 0,1 1,-54.76 0" android:strokeAlpha="0.6"/>
- <path android:fillAlpha="0.3" android:fillColor="#8ab4f8"
- android:pathData="M301.64,173.8m-27.38,0a27.38,27.38 0,1 1,54.76 0a27.38,27.38 0,1 1,-54.76 0" android:strokeAlpha="0.3"/>
- <path android:fillColor="#1a73e8" android:pathData="M356.41,246.82m-27.38,0a27.38,27.38 0,1 1,54.76 0a27.38,27.38 0,1 1,-54.76 0"/>
- <path android:fillAlpha="0.1" android:fillColor="#212121" android:pathData="M155.59,274.2A27.38,27.38 0,0 0,183 246.82c0,-0.34 0,-0.67 0,-1a27.38,27.38 0,0 1,-54.72 0c0,0.33 0,0.66 0,1A27.38,27.38 0,0 0,155.59 274.2Z"/>
- <path android:fillAlpha="0.24000001" android:fillColor="#fff"
- android:pathData="M155.59,219.44a27.38,27.38 0,0 0,-27.38 27.38c0,0.33 0,0.67 0,1a27.38,27.38 0,0 1,54.72 0c0,-0.33 0,-0.67 0,-1A27.38,27.38 0,0 0,155.59 219.44Z" android:strokeAlpha="0.6"/>
- <path android:fillAlpha="0.24000001" android:fillColor="#fff"
- android:pathData="M210.36,146.41A27.38,27.38 0,0 0,183 173.8c0,0.33 0,0.66 0,1a27.38,27.38 0,0 1,54.72 0c0,-0.34 0,-0.67 0,-1A27.38,27.38 0,0 0,210.36 146.41Z" android:strokeAlpha="0.6"/>
- <path android:fillAlpha="0.1" android:fillColor="#212121" android:pathData="M210.36,201.18a27.38,27.38 0,0 0,27.38 -27.38c0,-0.34 0,-0.67 0,-1a27.38,27.38 0,0 1,-54.72 0c0,0.33 0,0.66 0,1A27.38,27.38 0,0 0,210.36 201.18Z"/>
- <path android:fillAlpha="0.1" android:fillColor="#212121" android:pathData="M301.64,199.18a27.38,27.38 0,0 1,-27.36 -26.38c0,0.33 0,0.66 0,1a27.38,27.38 0,0 0,54.76 0c0,-0.34 0,-0.67 0,-1A27.38,27.38 0,0 1,301.64 199.18Z"/>
- <path android:fillAlpha="0.24000001" android:fillColor="#fff"
- android:pathData="M301.64,148.41A27.39,27.39 0,0 1,329 174.8c0,-0.34 0,-0.67 0,-1a27.38,27.38 0,1 0,-54.76 0c0,0.33 0,0.66 0,1A27.39,27.39 0,0 1,301.64 148.41Z" android:strokeAlpha="0.6"/>
- <path android:fillAlpha="0.24000001" android:fillColor="#fff"
- android:pathData="M356.41,221.44a27.38,27.38 0,0 1,27.36 26.38c0,-0.33 0,-0.67 0,-1a27.39,27.39 0,0 0,-54.77 0c0,0.33 0,0.67 0,1A27.38,27.38 0,0 1,356.41 221.44Z" android:strokeAlpha="0.6"/>
- <path android:fillAlpha="0.1" android:fillColor="#FF000000" android:pathData="M356.41,272.2a27.38,27.38 0,0 1,-27.36 -26.38c0,0.33 0,0.66 0,1a27.39,27.39 0,0 0,54.77 0c0,-0.34 0,-0.67 0,-1A27.38,27.38 0,0 1,356.41 272.2Z"/>
- <path android:pathData="M0,0.07V512H512V0Z">
- <aapt:attr name="android:fillColor">
- <gradient android:centerX="16.842121"
- android:centerY="53.77451"
- android:gradientRadius="512.5738" android:type="radial">
- <item android:color="#19FFFFFF" android:offset="0"/>
- <item android:color="#00FFFFFF" android:offset="1"/>
- </gradient>
- </aapt:attr>
- </path>
-</vector>
diff --git a/res/layout/themed_icon_section_view.xml b/res/layout/themed_icon_section_view.xml
index 95be2077..2ca84a92 100644
--- a/res/layout/themed_icon_section_view.xml
+++ b/res/layout/themed_icon_section_view.xml
@@ -51,18 +51,4 @@
</LinearLayout>
- <Space
- android:layout_width="0dp"
- android:layout_height="8dp" />
-
- <TextView
- android:id="@+id/beta_tag"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingHorizontal="8dp"
- android:paddingVertical="4dp"
- android:text="@string/beta_title"
- android:textColor="@color/text_color_on_accent"
- style="@style/BetaTagTextStyle" />
-
</com.android.customization.picker.themedicon.ThemedIconSectionView>
diff --git a/res/mipmap-anydpi/ic_launcher.xml b/res/mipmap-anydpi/ic_launcher.xml
new file mode 100644
index 00000000..3d90bc5c
--- /dev/null
+++ b/res/mipmap-anydpi/ic_launcher.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ SPDX-FileCopyrightText: 2022 The LineageOS Project
+ SPDX-License-Identifier: Apache-2.0
+-->
+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
+ <background android:drawable="@drawable/ic_launcher_background"/>
+ <foreground android:drawable="@drawable/ic_launcher_foreground"/>
+</adaptive-icon>