Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d325f170 authored by Edward Savage-Jones's avatar Edward Savage-Jones Committed by Ed Savage-Jones
Browse files

Fix permissions xml and provider access

ThemePicker need to add its use of permissions and declare the
priv app permission parts in an xml file to be able to start.

ThemePicker also need to declare which other apps it intends to
interact with in queries. This enables the Launcher grid/icon preview.

Test: Manual
Bug: 274634330
Change-Id: I55fb94279abeab15dd16a6cabc0bf086c621fc42
parent 9088a453
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -94,6 +94,8 @@ java_defaults {
        ":ThemePicker_src_overrides",
        ":ThemePicker_src_overrides",
    ],
    ],


    required: ["android.software.theme_picker.xml"],

    use_embedded_native_libs: true,
    use_embedded_native_libs: true,


    resource_zips: [":WallpaperPicker2_res", ":ThemePicker_res", ":ThemePicker_res_overrides"],
    resource_zips: [":WallpaperPicker2_res", ":ThemePicker_res", ":ThemePicker_res_overrides"],
@@ -108,6 +110,13 @@ java_defaults {
    system_ext_specific: true,
    system_ext_specific: true,
}
}


prebuilt_etc {
    name: "android.software.theme_picker.xml",
    system_ext_specific: true,
    sub_dir: "permissions",
    src: "android.software.theme_picker.xml",
}

//
//
// Build app code.
// Build app code.
//
//
+9 −0
Original line number Original line Diff line number Diff line
@@ -11,8 +11,17 @@
    <uses-permission android:name="android.permission.READ_DEVICE_CONFIG" />
    <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.MODIFY_DAY_NIGHT_MODE" />
    <uses-permission android:name="android.permission.CUSTOMIZE_SYSTEM_UI" />
    <uses-permission android:name="android.permission.CUSTOMIZE_SYSTEM_UI" />
    <uses-permission android:name="android.permission.BIND_WALLPAPER"/>
    <uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>
    <uses-permission android:name="android.permission.READ_WALLPAPER_INTERNAL"/>
    <uses-permission android:name="android.permission.SET_WALLPAPER"/>


    <queries>
    <queries>
        <package android:name="android"/>
        <package android:name="com.android.launcher3"/>
        <package android:name="com.android.settings"/>
        <package android:name="com.android.systemui"/>

        <!-- Specific intents Wallpaper picker query for -->
        <!-- Specific intents Wallpaper picker query for -->
        <!-- Package for theme stub -->
        <!-- Package for theme stub -->
        <package android:name="com.android.customization.themes" />
        <package android:name="com.android.customization.themes" />
+28 −0
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2023 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.CUSTOMIZE_SYSTEM_UI"/>
        <permission name="android.permission.MODIFY_DAY_NIGHT_MODE"/>
        <permission name="android.permission.READ_DEVICE_CONFIG"/>
        <permission name="android.permission.READ_WALLPAPER_INTERNAL"/>
        <permission name="android.permission.SET_WALLPAPER"/>
        <permission name="android.permission.SET_WALLPAPER_COMPONENT"/>
        <permission name="android.permission.WRITE_SECURE_SETTINGS"/>
    </privapp-permissions>
</permissions>