Report High usage even in a short period
In detector, we should also catch the following case: 1. Battery draining more than 25% even though usage time is less than 2 hours. This cl stores the first time battery level, even though usage time may be short. Bug: 73012441 Test: RunSettingsRoboTests Change-Id: I7106f7203718bfe2afe9cce297ea01b8fcf0be2d
This commit is contained in:
@@ -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