Merge "Fix the getForegroundActivityTotalTimeMs" into oc-dr1-dev am: 451b7edfd7

am: d3f035af0a

Change-Id: If1a3d3b931130efa18014538bc95c2d9ac41d410
This commit is contained in:
Lei Yu
2017-06-28 17:57:46 +00:00
committed by android-build-merger
2 changed files with 14 additions and 1 deletions

View File

@@ -330,7 +330,8 @@ public class BatteryUtils {
long getForegroundActivityTotalTimeMs(BatteryStats.Uid uid, long rawRealtimeMs) {
final BatteryStats.Timer timer = uid.getForegroundActivityTimer();
if (timer != null) {
return timer.getTotalTimeLocked(rawRealtimeMs, BatteryStats.STATS_SINCE_CHARGED);
return convertUsToMs(
timer.getTotalTimeLocked(rawRealtimeMs, BatteryStats.STATS_SINCE_CHARGED));
}
return 0;