diff options
-rw-r--r-- | Android.bp | 24 | ||||
-rwxr-xr-x | AndroidManifest.xml | 9 | ||||
-rw-r--r-- | default_permissions_com.android.wallpaper.xml | 37 | ||||
-rw-r--r-- | privapp_whitelist_com.android.wallpaper.xml | 25 |
4 files changed, 94 insertions, 1 deletions
@@ -97,5 +97,27 @@ android_app { platform_apis: true, manifest: "AndroidManifest.xml", additional_manifests: [":WallpaperPicker2_Manifest"], - overrides: ["WallpaperPicker2"], + + required: [ + "privapp_whitelist_com.android.wallpaper.xml", + "default_permissions_com.android.wallpaper.xml", + ], + + overrides: ["WallpaperPicker2", "WallpaperPicker"], +} + +prebuilt_etc_xml { + name: "privapp_whitelist_com.android.wallpaper.xml", + src: "privapp_whitelist_com.android.wallpaper.xml", + system_ext_specific: true, + filename_from_src: true, + sub_dir: "permissions", +} + +prebuilt_etc_xml { + name: "default_permissions_com.android.wallpaper.xml", + src: "default_permissions_com.android.wallpaper.xml", + system_ext_specific: true, + filename_from_src: true, + sub_dir: "default-permissions", } diff --git a/AndroidManifest.xml b/AndroidManifest.xml index c6e79a91..24625d6a 100755 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -8,6 +8,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.MODIFY_DAY_NIGHT_MODE" /> @@ -35,8 +36,16 @@ <intent> <action android:name="com.android.launcher3.action.PARTNER_CUSTOMIZATION" /> </intent> + <!-- Intent filter with action used to discover launcher --> + <intent> + <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.HOME" /> + </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" diff --git a/default_permissions_com.android.wallpaper.xml b/default_permissions_com.android.wallpaper.xml new file mode 100644 index 00000000..41b23ce1 --- /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> diff --git a/privapp_whitelist_com.android.wallpaper.xml b/privapp_whitelist_com.android.wallpaper.xml new file mode 100644 index 00000000..5dee99b0 --- /dev/null +++ b/privapp_whitelist_com.android.wallpaper.xml @@ -0,0 +1,25 @@ +<?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.SET_WALLPAPER_COMPONENT"/> + <permission name="android.permission.BIND_WALLPAPER"/> + <permission name="android.permission.MODIFY_DAY_NIGHT_MODE"/> + <permission name="android.permission.CHANGE_OVERLAY_PACKAGES"/> + <permission name="android.permission.WRITE_SECURE_SETTINGS" /> + </privapp-permissions> +</permissions> |