Merge "Hide wifi and bt in battery settings" into oc-dev

am: 05777a7918

Change-Id: If676ec0119bebed800727f618225fd355e9da74f
This commit is contained in:
jackqdyulei
2017-06-20 22:55:47 +00:00
committed by android-build-merger
2 changed files with 32 additions and 2 deletions

View File

@@ -141,8 +141,10 @@ public class BatteryUtils {
sippers.remove(i);
if (sipper.drainType != BatterySipper.DrainType.OVERCOUNTED
&& sipper.drainType != BatterySipper.DrainType.SCREEN
&& sipper.drainType != BatterySipper.DrainType.UNACCOUNTED) {
// Don't add it if it is overcounted, unaccounted or screen
&& sipper.drainType != BatterySipper.DrainType.UNACCOUNTED
&& sipper.drainType != BatterySipper.DrainType.BLUETOOTH
&& sipper.drainType != BatterySipper.DrainType.WIFI) {
// Don't add it if it is overcounted, unaccounted, wifi, bluetooth, or screen
proportionalSmearPowerMah += sipper.totalPowerMah;
}
}
@@ -196,6 +198,8 @@ public class BatteryUtils {
|| drainType == BatterySipper.DrainType.SCREEN
|| drainType == BatterySipper.DrainType.UNACCOUNTED
|| drainType == BatterySipper.DrainType.OVERCOUNTED
|| drainType == BatterySipper.DrainType.BLUETOOTH
|| drainType == BatterySipper.DrainType.WIFI
|| (sipper.totalPowerMah * SECONDS_IN_HOUR) < MIN_POWER_THRESHOLD_MILLI_AMP
|| mPowerUsageFeatureProvider.isTypeService(sipper)
|| mPowerUsageFeatureProvider.isTypeSystem(sipper);