Merge "Fix broken tests: com.android.settings.fuelgauge"
This commit is contained in:
@@ -67,6 +67,9 @@ public final class BatteryBackupHelper implements BackupHelper {
|
||||
static final String KEY_FULL_POWER_LIST = "full_power_list";
|
||||
static final String KEY_OPTIMIZATION_LIST = "optimization_mode_list";
|
||||
|
||||
@VisibleForTesting
|
||||
List<ApplicationInfo> mTestApplicationInfoList = null;
|
||||
|
||||
@VisibleForTesting
|
||||
PowerAllowlistBackend mPowerAllowlistBackend;
|
||||
@VisibleForTesting
|
||||
@@ -267,6 +270,9 @@ public final class BatteryBackupHelper implements BackupHelper {
|
||||
}
|
||||
|
||||
private List<ApplicationInfo> getInstalledApplications() {
|
||||
if (mTestApplicationInfoList != null) {
|
||||
return mTestApplicationInfoList;
|
||||
}
|
||||
final List<ApplicationInfo> applications = new ArrayList<>();
|
||||
final UserManager um = mContext.getSystemService(UserManager.class);
|
||||
for (UserInfo userInfo : um.getProfiles(UserHandle.myUserId())) {
|
||||
|
Reference in New Issue
Block a user