Merge "Hide wifi and bt in battery settings" into oc-dev am: 05777a7918 am: 9d0d6e4fcc

am: 4b5a6a5284

Change-Id: Ieff7f23d06a16ff225cea8bebc31c6b2e0d8ee97
This commit is contained in:
jackqdyulei
2017-06-20 23:29:53 +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);