Merge "Fix the getForegroundActivityTotalTimeMs" into oc-dr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
33c9b7a111
@@ -331,8 +331,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