Merge "Report High usage even in a short period"
This commit is contained in:
committed by
Android (Google) Code Review
commit
d89e9c2e24
@@ -51,7 +51,7 @@ public class HighUsageDataParser implements BatteryInfo.BatteryDataParser {
|
||||
|
||||
@Override
|
||||
public void onDataPoint(long time, BatteryStats.HistoryItem record) {
|
||||
if (record.currentTime <= mEndTimeMs - mTimePeriodMs) {
|
||||
if (time == 0 || record.currentTime <= mEndTimeMs - mTimePeriodMs) {
|
||||
// Since onDataPoint is invoked sorted by time, so we could use this way to get the
|
||||
// closet battery level 'mTimePeriodMs' time ago.
|
||||
mLastPeriodBatteryLevel = record.batteryLevel;
|
||||
|
Reference in New Issue
Block a user