Batterystats logs smeared power model values

Fixes: 62302932
Test: cts-tradefed run cts-dev -m CtsDumpsysHostTestCases -t android.dumpsys.cts.BatteryStatsDumpsysTest
Change-Id: I8942aa9bc557fada4cf0be76aee6bd0bcee9ebb6
This commit is contained in:
Bookatz
2017-06-08 14:50:46 -07:00
committed by Adam Bookatz
parent 5dad8068e2
commit 17d7d9dcdf

View File

@@ -3332,7 +3332,10 @@ public abstract class BatteryStats implements Parcelable {
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));
}
}
@@ -4362,6 +4365,26 @@ public abstract class BatteryStats implements Parcelable {
}
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();