Merge "Fix the getForegroundActivityTotalTimeMs" into oc-dr1-dev
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user