Merge changes from topic 'battery_smear_move' into oc-dev

am: 883db32859

Change-Id: I45d4eaadbc992663b3453b52c391d5d4d660e046
This commit is contained in:
Lei Yu
2017-06-09 21:42:25 +00:00
committed by android-build-merger

View File

@@ -3336,7 +3336,10 @@ public abstract class BatteryStats implements Parcelable {
label = "???"; label = "???";
} }
dumpLine(pw, uid, category, POWER_USE_ITEM_DATA, label, dumpLine(pw, uid, category, POWER_USE_ITEM_DATA, label,
BatteryStatsHelper.makemAh(bs.totalPowerMah)); BatteryStatsHelper.makemAh(bs.totalPowerMah),
bs.shouldHide ? 1 : 0,
BatteryStatsHelper.makemAh(bs.screenPowerMah),
BatteryStatsHelper.makemAh(bs.proportionalSmearMah));
} }
} }
@@ -4365,6 +4368,26 @@ public abstract class BatteryStats implements Parcelable {
} }
pw.print(" )"); pw.print(" )");
} }
// If there is additional smearing information, include it.
if (bs.totalSmearedPowerMah != bs.totalPowerMah) {
pw.print(" Including smearing: ");
printmAh(pw, bs.totalSmearedPowerMah);
pw.print(" (");
if (bs.screenPowerMah != 0) {
pw.print(" screen=");
printmAh(pw, bs.screenPowerMah);
}
if (bs.proportionalSmearMah != 0) {
pw.print(" proportional=");
printmAh(pw, bs.proportionalSmearMah);
}
pw.print(" )");
}
if (bs.shouldHide) {
pw.print(" Excluded from smearing");
}
pw.println(); pw.println();
} }
pw.println(); pw.println();