Add a new special app access screen for long background tasks.
This new screen shows apps that hold the new RUN_LONG_JOBS permission. Also add a reference to this screen in an app's info page under the "Advanced" section for apps that have requested this permission. Bug: 255821578 Test: atest AppFilterRegistryTest Test: make -j RunSettingsRoboTests \ ROBOTTEST_FILTER="LongBackgroundTasksDetailsTest| LongBackgroundTasksDetailsPreferenceControllerTest" Test: visually via the Settings page Change-Id: Idc498e52d29abc6df757c35e8bc91f00de92ba4a
This commit is contained in:
@@ -189,6 +189,12 @@
|
||||
android:summary="@string/summary_placeholder"
|
||||
settings:controller="com.android.settings.applications.appinfo.AlarmsAndRemindersDetailPreferenceController" />
|
||||
|
||||
<Preference
|
||||
android:key="long_background_tasks"
|
||||
android:title="@string/long_background_tasks_title"
|
||||
android:summary="@string/summary_placeholder"
|
||||
settings:controller="com.android.settings.applications.appinfo.LongBackgroundTasksDetailsPreferenceController" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<!-- App installer info -->
|
||||
|
30
res/xml/long_background_tasks.xml
Normal file
30
res/xml/long_background_tasks.xml
Normal file
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2022 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.
|
||||
-->
|
||||
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:title="@string/long_background_tasks_title">
|
||||
|
||||
<com.android.settings.widget.FilterTouchesRestrictedSwitchPreference
|
||||
android:key="long_background_tasks_switch"
|
||||
android:title="@string/long_background_tasks_switch_title" />
|
||||
|
||||
<com.android.settingslib.widget.FooterPreference
|
||||
android:key="long_background_tasks_description"
|
||||
android:title="@string/long_background_tasks_footer_title"
|
||||
android:selectable="false" />
|
||||
|
||||
</PreferenceScreen>
|
@@ -107,6 +107,16 @@
|
||||
settings:isPreferenceVisible="@bool/config_show_data_saver"
|
||||
settings:controller="com.android.settings.applications.specialaccess.DataSaverController" />
|
||||
|
||||
<Preference
|
||||
android:key="long_background_tasks"
|
||||
android:title="@string/long_background_tasks_title"
|
||||
android:fragment="com.android.settings.applications.manageapplications.ManageApplications"
|
||||
settings:keywords="@string/keywords_long_background_tasks">
|
||||
<extra
|
||||
android:name="classname"
|
||||
android:value="com.android.settings.Settings$LongBackgroundTasksActivity" />
|
||||
</Preference>
|
||||
|
||||
<Preference
|
||||
android:key="manage_external_sources"
|
||||
android:title="@string/install_other_apps"
|
||||
|
Reference in New Issue
Block a user