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

Commit 62f0b933 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add a new special app access screen for long background tasks."

parents 77ba214b b33256a0
Loading
Loading
Loading
Loading
+31 −0
Original line number Diff line number Diff line
@@ -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"
+18 −1
Original line number Diff line number Diff line
@@ -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] -->
@@ -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.
+6 −0
Original line number Diff line number Diff line
@@ -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 −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>
+10 −0
Original line number Diff line number Diff line
@@ -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