Loading res/xml/app_info_settings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -193,6 +193,8 @@ android:key="long_background_tasks" android:title="@string/long_background_tasks_title" android:summary="@string/summary_placeholder" settings:isPreferenceVisible="false" settings:searchable="false" settings:controller="com.android.settings.applications.appinfo.LongBackgroundTasksDetailsPreferenceController" /> </PreferenceCategory> Loading res/xml/special_access.xml +2 −0 Original line number Diff line number Diff line Loading @@ -128,6 +128,8 @@ android:title="@string/long_background_tasks_title" android:order="-800" android:fragment="com.android.settings.applications.manageapplications.ManageApplications" settings:isPreferenceVisible="false" settings:searchable="false" settings:keywords="@string/keywords_long_background_tasks" settings:controller="com.android.settings.applications.specialaccess.applications.LongBackgroundTaskController"> <extra Loading src/com/android/settings/applications/ApplicationFeatureProviderImpl.java +4 −6 Original line number Diff line number Diff line Loading @@ -16,10 +16,6 @@ package com.android.settings.applications; import static android.Manifest.permission.RUN_USER_INITIATED_JOBS; import static android.app.AppOpsManager.OP_RUN_USER_INITIATED_JOBS; import static android.app.AppOpsManager.opToPermission; import android.Manifest; import android.app.admin.DevicePolicyManager; import android.content.ComponentName; Loading Loading @@ -345,7 +341,9 @@ public class ApplicationFeatureProviderImpl implements ApplicationFeatureProvide @Override public boolean isLongBackgroundTaskPermissionToggleSupported() { return TextUtils.equals(RUN_USER_INITIATED_JOBS, opToPermission(OP_RUN_USER_INITIATED_JOBS)); // Since the RUN_USER_INITIATED_JOBS permission related to this controller is a normal // app-op permission allowed by default, this should always return false - if it is ever // converted to a special app-op permission, this should be updated. return false; } } src/com/android/settings/applications/specialaccess/applications/LongBackgroundTaskController.java +2 −2 Original line number Diff line number Diff line /* * Copyright (C) 2022 The Android Open Source Project * 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. Loading Loading
res/xml/app_info_settings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -193,6 +193,8 @@ android:key="long_background_tasks" android:title="@string/long_background_tasks_title" android:summary="@string/summary_placeholder" settings:isPreferenceVisible="false" settings:searchable="false" settings:controller="com.android.settings.applications.appinfo.LongBackgroundTasksDetailsPreferenceController" /> </PreferenceCategory> Loading
res/xml/special_access.xml +2 −0 Original line number Diff line number Diff line Loading @@ -128,6 +128,8 @@ android:title="@string/long_background_tasks_title" android:order="-800" android:fragment="com.android.settings.applications.manageapplications.ManageApplications" settings:isPreferenceVisible="false" settings:searchable="false" settings:keywords="@string/keywords_long_background_tasks" settings:controller="com.android.settings.applications.specialaccess.applications.LongBackgroundTaskController"> <extra Loading
src/com/android/settings/applications/ApplicationFeatureProviderImpl.java +4 −6 Original line number Diff line number Diff line Loading @@ -16,10 +16,6 @@ package com.android.settings.applications; import static android.Manifest.permission.RUN_USER_INITIATED_JOBS; import static android.app.AppOpsManager.OP_RUN_USER_INITIATED_JOBS; import static android.app.AppOpsManager.opToPermission; import android.Manifest; import android.app.admin.DevicePolicyManager; import android.content.ComponentName; Loading Loading @@ -345,7 +341,9 @@ public class ApplicationFeatureProviderImpl implements ApplicationFeatureProvide @Override public boolean isLongBackgroundTaskPermissionToggleSupported() { return TextUtils.equals(RUN_USER_INITIATED_JOBS, opToPermission(OP_RUN_USER_INITIATED_JOBS)); // Since the RUN_USER_INITIATED_JOBS permission related to this controller is a normal // app-op permission allowed by default, this should always return false - if it is ever // converted to a special app-op permission, this should be updated. return false; } }
src/com/android/settings/applications/specialaccess/applications/LongBackgroundTaskController.java +2 −2 Original line number Diff line number Diff line /* * Copyright (C) 2022 The Android Open Source Project * 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. Loading