Update settings for app hibernation

Created an preference in Apps & Notifcations page as the entry point for
apps that are hibernated. Also added a switch preference in AppInfo page
for users to exempt an app from hibernation.

Bug: 181172051
Test: HibernatedAppsPreferenceControllerTest;
HibernationSwitchPreferenceControllerTest;
AppInfoDashboardFragmentTest

Change-Id: I72a90ab391cd521150fc155a6d9c67c846b7360d
This commit is contained in:
Zhen Zhang
2021-03-03 13:53:34 -08:00
parent e12ad9777e
commit 48bd52e091
12 changed files with 513 additions and 0 deletions

View File

@@ -153,6 +153,9 @@ public final class Utils extends com.android.settingslib.Utils {
public static final String PROPERTY_LOCATION_INDICATOR_SETTINGS_ENABLED =
"location_indicator_settings_enabled";
/** Whether or not app hibernation is enabled on the device **/
public static final String PROPERTY_APP_HIBERNATION_ENABLED = "app_hibernation_enabled";
/**
* Finds a matching activity for a preference's intent. If a matching
* activity is not found, it will remove the preference.