Merge "Fix the getForegroundActivityTotalTimeMs" into oc-dr1-dev

am: 451b7edfd7

Change-Id: I609e926c481e991d4039e42d0872ebcfd218679b
This commit is contained in:
Lei Yu
2017-06-28 17:54:20 +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;