Fix ambient display time unit error

Treated return value from mStats.getScreenDozeTime as ms, but indeed it
is us.
Fixes: 77655868
Test: manual

Change-Id: Ic9838a2fca3f49a6f5a669bd1970dcc7560fb5e2
This commit is contained in:
Mike Ma
2018-04-05 17:25:51 -07:00
parent b6d4401da1
commit e074da1804

View File

@@ -657,7 +657,7 @@ public class BatteryStatsHelper {
* {@link #removeHiddenBatterySippers(List)}.
*/
private void addAmbientDisplayUsage() {
long ambientDisplayMs = mStats.getScreenDozeTime(mRawRealtimeUs, mStatsType);
long ambientDisplayMs = mStats.getScreenDozeTime(mRawRealtimeUs, mStatsType) / 1000;
double power = mPowerProfile.getAveragePower(PowerProfile.POWER_AMBIENT_DISPLAY)
* ambientDisplayMs / (60 * 60 * 1000);
if (power > 0) {