Fix the getForegroundActivityTotalTimeMs
The parameter in timer should be microseconds, not milliseconds Bug: 63073847 Test: RunSettingsRoboTests Change-Id: I5e451aee9eb30815fbefe12c0bfdc85dff884b8e
This commit is contained in:
@@ -330,8 +330,8 @@ public class BatteryUtils {
|
||||
long getForegroundActivityTotalTimeMs(BatteryStats.Uid uid, long rawRealtimeMs) {
|
||||
final BatteryStats.Timer timer = uid.getForegroundActivityTimer();
|
||||
if (timer != null) {
|
||||
return convertUsToMs(
|
||||
timer.getTotalTimeLocked(rawRealtimeMs, BatteryStats.STATS_SINCE_CHARGED));
|
||||
return convertUsToMs(timer.getTotalTimeLocked(convertMsToUs(rawRealtimeMs),
|
||||
BatteryStats.STATS_SINCE_CHARGED));
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user