Merge "[B&R] avoid to backup & restore app which is in the PowerSaveWhitelistExceptIdle" into sc-v2-dev

This commit is contained in:
YUKAI HUNG
2021-09-23 11:24:19 +00:00
committed by Android (Google) Code Review
2 changed files with 21 additions and 3 deletions

View File

@@ -263,7 +263,9 @@ public final class BatteryBackupHelper implements BackupHelper {
private boolean isSystemOrDefaultApp(String packageName) {
final PowerAllowlistBackend powerAllowlistBackend = getPowerAllowlistBackend();
return powerAllowlistBackend.isSysAllowlisted(packageName)
|| powerAllowlistBackend.isDefaultActiveApp(packageName);
|| powerAllowlistBackend.isDefaultActiveApp(packageName)
// Optimize mode only for app which is in the allow list not idle app.
|| powerAllowlistBackend.isAllowlistedExceptIdle(packageName);
}
private List<ApplicationInfo> getInstalledApplications() {