Remove misc data in battery main page.
The removed types are: 1. DrainType.UNACCOUNTED 2. DrainType.OVERCOUNTED This cl removes the above types in PowerUsageSummary and PowerUsageAdvanced Bug: 36874846 Test: RunSettingsRoboTests Change-Id: I1807c44a2c0a9c2fa124cdef962a6411ae6830ca
This commit is contained in:
@@ -599,6 +599,8 @@ public class PowerUsageSummary extends PowerUsageBase {
|
||||
|| drainType == DrainType.WIFI
|
||||
|| drainType == DrainType.SCREEN
|
||||
|| drainType == DrainType.BLUETOOTH
|
||||
|| drainType == DrainType.UNACCOUNTED
|
||||
|| drainType == DrainType.OVERCOUNTED
|
||||
|| (sipper.totalPowerMah * SECONDS_IN_HOUR) < MIN_POWER_THRESHOLD_MILLI_AMP
|
||||
|| mPowerFeatureProvider.isTypeService(sipper)
|
||||
|| mPowerFeatureProvider.isTypeSystem(sipper);
|
||||
@@ -625,7 +627,11 @@ public class PowerUsageSummary extends PowerUsageBase {
|
||||
final BatterySipper sipper = sippers.get(i);
|
||||
if (shouldHideSipper(sipper)) {
|
||||
sippers.remove(i);
|
||||
totalPowerMah += sipper.totalPowerMah;
|
||||
if (sipper.drainType != DrainType.OVERCOUNTED
|
||||
&& sipper.drainType != DrainType.UNACCOUNTED) {
|
||||
// Don't add it if it is overcounted or unaccounted
|
||||
totalPowerMah += sipper.totalPowerMah;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user