Clean up BatteryAppListPreferenceController

Bug: 256123455
Bug: 258576047
Fix: 258576047
Test: presubmit
Change-Id: I8c3d05f76e7a6995fccc34b2cc60ee126bb3d350
This commit is contained in:
Zaiyue Xue
2022-11-10 16:58:10 +08:00
parent df25b72044
commit 7a30768503
11 changed files with 179 additions and 905 deletions

View File

@@ -23,7 +23,6 @@ import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.os.BatteryConsumer;
import android.os.BatteryStats;
import android.os.BatteryStatsManager;
import android.os.BatteryUsageStats;
@@ -200,24 +199,6 @@ public class BatteryUtils {
: uid < 0 || isHiddenSystemModule(packages);
}
/**
* Returns true if the specified device power component should be excluded from the summary
* battery consumption list.
*/
public boolean shouldHideDevicePowerComponent(BatteryConsumer consumer,
@BatteryConsumer.PowerComponent int powerComponentId) {
switch (powerComponentId) {
case BatteryConsumer.POWER_COMPONENT_IDLE:
case BatteryConsumer.POWER_COMPONENT_MOBILE_RADIO:
case BatteryConsumer.POWER_COMPONENT_SCREEN:
case BatteryConsumer.POWER_COMPONENT_BLUETOOTH:
case BatteryConsumer.POWER_COMPONENT_WIFI:
return true;
default:
return false;
}
}
/**
* Returns true if one the specified packages belongs to a hidden system module.
*/