Loading AndroidManifest.xml +31 −0 Original line number Diff line number Diff line Loading @@ -846,6 +846,37 @@ android:value="@string/menu_key_network"/> </activity> <activity android:name="Settings$LongBackgroundTasksActivity" android:exported="true" android:label="@string/long_background_tasks_label"> <intent-filter android:priority="1"> <action android:name="android.settings.MANAGE_APP_LONG_JOBS" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> <meta-data android:name="com.android.settings.FRAGMENT_CLASS" android:value="com.android.settings.applications.manageapplications.ManageApplications" /> <meta-data android:name="com.android.settings.HIGHLIGHT_MENU_KEY" android:value="@string/menu_key_apps"/> <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED" android:value="true" /> </activity> <activity android:name="Settings$LongBackgroundTasksAppActivity" android:exported="true" android:label="@string/long_background_tasks_label"> <intent-filter android:priority="1"> <action android:name="android.settings.MANAGE_APP_LONG_JOBS" /> <category android:name="android.intent.category.DEFAULT" /> <data android:scheme="package" /> </intent-filter> <meta-data android:name="com.android.settings.FRAGMENT_CLASS" android:value="com.android.settings.applications.appinfo.LongBackgroundTasksDetails" /> <meta-data android:name="com.android.settings.HIGHLIGHT_MENU_KEY" android:value="@string/menu_key_apps"/> </activity> <activity android:name="Settings$DateTimeSettingsActivity" android:label="@string/date_and_time" Loading res/values/strings.xml +18 −1 Original line number Diff line number Diff line Loading @@ -6026,7 +6026,8 @@ <string name="help_uri_about" translatable="false"></string> <!-- Help URI, manage apps that can set alarms and reminders [DO NOT TRANSLATE] --> <string name="help_uri_alarms_and_reminders" translatable="false"></string> <!-- Help URI, manage apps that can run long background tasks [DO NOT TRANSLATE] --> <string name="help_uri_long_background_tasks" translatable="false"></string> <!-- Help URL, WiFi [DO NOT TRANSLATE] --> <string name="help_url_wifi" translatable="false"></string> <!-- Help URL, WiFi Direct [DO NOT TRANSLATE] --> Loading Loading @@ -9117,6 +9118,22 @@ <!-- Title for the See more preference item in Special app access settings [CHAR LIMIT=30] --> <string name="special_access_more">See more</string> <!-- Label for the settings activity for controlling apps that can run long background tasks [CHAR LIMIT=30] --> <string name="long_background_tasks_label">Long background tasks</string> <!-- Label for the switch to toggle the permission for running long background tasks [CHAR LIMIT=50] --> <string name="long_background_tasks_switch_title">Allow long-running background tasks</string> <!-- Title for the settings screen for controlling apps that can run long background tasks [CHAR LIMIT=30] --> <string name="long_background_tasks_title">Long background tasks</string> <!-- Description that appears below the long_background_tasks switch [CHAR LIMIT=NONE] --> <string name="long_background_tasks_footer_title"> Allow this app to run long background tasks. This lets the app run tasks that might take longer than a few minutes to finish, such as downloads and uploads. \n\nIf this permission is denied, the system will limit how long the app can perform such tasks in the background. </string> <!-- Keywords for settings screen for controlling apps that can run long background tasks [CHAR LIMIT=NONE] --> <string name="keywords_long_background_tasks">long jobs, data transfer, background tasks</string> <!-- Reset rate-limiting in the system service ShortcutManager. "ShortcutManager" is the name of a system service and not translatable. If the word "rate-limit" is hard to translate, use "Reset ShortcutManager API call limit" as the source text, which means the same thing in this context. res/xml/app_info_settings.xml +6 −0 Original line number Diff line number Diff line Loading @@ -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 --> Loading res/xml/long_background_tasks.xml 0 → 100644 +30 −0 Original line number Diff line number Diff line <?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> res/xml/special_access.xml +10 −0 Original line number Diff line number Diff line Loading @@ -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" Loading Loading
AndroidManifest.xml +31 −0 Original line number Diff line number Diff line Loading @@ -846,6 +846,37 @@ android:value="@string/menu_key_network"/> </activity> <activity android:name="Settings$LongBackgroundTasksActivity" android:exported="true" android:label="@string/long_background_tasks_label"> <intent-filter android:priority="1"> <action android:name="android.settings.MANAGE_APP_LONG_JOBS" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> <meta-data android:name="com.android.settings.FRAGMENT_CLASS" android:value="com.android.settings.applications.manageapplications.ManageApplications" /> <meta-data android:name="com.android.settings.HIGHLIGHT_MENU_KEY" android:value="@string/menu_key_apps"/> <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED" android:value="true" /> </activity> <activity android:name="Settings$LongBackgroundTasksAppActivity" android:exported="true" android:label="@string/long_background_tasks_label"> <intent-filter android:priority="1"> <action android:name="android.settings.MANAGE_APP_LONG_JOBS" /> <category android:name="android.intent.category.DEFAULT" /> <data android:scheme="package" /> </intent-filter> <meta-data android:name="com.android.settings.FRAGMENT_CLASS" android:value="com.android.settings.applications.appinfo.LongBackgroundTasksDetails" /> <meta-data android:name="com.android.settings.HIGHLIGHT_MENU_KEY" android:value="@string/menu_key_apps"/> </activity> <activity android:name="Settings$DateTimeSettingsActivity" android:label="@string/date_and_time" Loading
res/values/strings.xml +18 −1 Original line number Diff line number Diff line Loading @@ -6026,7 +6026,8 @@ <string name="help_uri_about" translatable="false"></string> <!-- Help URI, manage apps that can set alarms and reminders [DO NOT TRANSLATE] --> <string name="help_uri_alarms_and_reminders" translatable="false"></string> <!-- Help URI, manage apps that can run long background tasks [DO NOT TRANSLATE] --> <string name="help_uri_long_background_tasks" translatable="false"></string> <!-- Help URL, WiFi [DO NOT TRANSLATE] --> <string name="help_url_wifi" translatable="false"></string> <!-- Help URL, WiFi Direct [DO NOT TRANSLATE] --> Loading Loading @@ -9117,6 +9118,22 @@ <!-- Title for the See more preference item in Special app access settings [CHAR LIMIT=30] --> <string name="special_access_more">See more</string> <!-- Label for the settings activity for controlling apps that can run long background tasks [CHAR LIMIT=30] --> <string name="long_background_tasks_label">Long background tasks</string> <!-- Label for the switch to toggle the permission for running long background tasks [CHAR LIMIT=50] --> <string name="long_background_tasks_switch_title">Allow long-running background tasks</string> <!-- Title for the settings screen for controlling apps that can run long background tasks [CHAR LIMIT=30] --> <string name="long_background_tasks_title">Long background tasks</string> <!-- Description that appears below the long_background_tasks switch [CHAR LIMIT=NONE] --> <string name="long_background_tasks_footer_title"> Allow this app to run long background tasks. This lets the app run tasks that might take longer than a few minutes to finish, such as downloads and uploads. \n\nIf this permission is denied, the system will limit how long the app can perform such tasks in the background. </string> <!-- Keywords for settings screen for controlling apps that can run long background tasks [CHAR LIMIT=NONE] --> <string name="keywords_long_background_tasks">long jobs, data transfer, background tasks</string> <!-- Reset rate-limiting in the system service ShortcutManager. "ShortcutManager" is the name of a system service and not translatable. If the word "rate-limit" is hard to translate, use "Reset ShortcutManager API call limit" as the source text, which means the same thing in this context.
res/xml/app_info_settings.xml +6 −0 Original line number Diff line number Diff line Loading @@ -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 --> Loading
res/xml/long_background_tasks.xml 0 → 100644 +30 −0 Original line number Diff line number Diff line <?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>
res/xml/special_access.xml +10 −0 Original line number Diff line number Diff line Loading @@ -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" Loading