Fix broken tests: com.android.settings.fuelgauge
Bug: 215064709 Fixes: 215064709 Test: make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.fuelgauge" Change-Id: I79a27b4fcef3a21207b37db422d983ae9d521b45
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