Add a feature flag for the special access to the long background task

The entry should be hidden if the RUN_LONG_JOBS can't be toggled.

Bug: 255821578
Test: atest AppFilterRegistryTest
Test: make -j RunSettingsRoboTests \
ROBOTTEST_FILTER="LongBackgroundTasksDetailsTest|
LongBackgroundTasksDetailsPreferenceControllerTest"
Test: Manually check the Settings page

Change-Id: Ib1c58d93b40afefdf3ca666c661e213d01c542c6
This commit is contained in:
Jing Ji
2023-01-06 02:10:42 -08:00
parent d54c9cab7d
commit 50490a35ec
7 changed files with 83 additions and 4 deletions

View File

@@ -92,6 +92,12 @@ public interface ApplicationFeatureProvider {
return "";
}
/**
* @return {@code true} if the device supports the toggling of the long background task
* permission.
*/
boolean isLongBackgroundTaskPermissionToggleSupported();
/**
* Callback that receives the number of packages installed on the device.
*/