Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aee0abf0 authored by Kweku Adams's avatar Kweku Adams
Browse files

Fix %/hr printing.

The dump is supposed to print % drain per hour, but the calculation kept
the percentage as a fraction instead of out of 100, making the drain
rate look smaller than it actually was.

Bug: 240726265
Test: adb shell dumpsys tare
Change-Id: I46b38489cd41c3fc05ff7ded8b50f07465ad1404
parent c6346aa1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -408,7 +408,7 @@ public class Analyst {
            if (report.screenOffDurationMs > 0) {
                pw.print(padStringWithSpaces(String.format("%d mAh (%.2f%%/hr)",
                                report.screenOffDischargeMah,
                                1.0 * report.screenOffDischargeMah * HOUR_IN_MILLIS
                                100.0 * report.screenOffDischargeMah * HOUR_IN_MILLIS
                                        / (batteryCapacityMah * report.screenOffDurationMs)),
                        statColsLength));
            } else {