Add data validator to verify and log abnormal queried history data

Bug: 177406865
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: I331922cf0b0e946066a72eb0bfcf9885dde9a7ce
This commit is contained in:
ykhung
2021-04-21 01:09:15 +08:00
committed by YUKAI HUNG
parent e8063609eb
commit 70bef1049f
6 changed files with 128 additions and 7 deletions

View File

@@ -123,6 +123,11 @@ public class BatteryHistEntry {
return mConsumerType == ConvertUtils.CONSUMER_TYPE_UID_BATTERY;
}
/** Whether this {@link BatteryHistEntry} is system consumer or not. */
public boolean isSystemEntry() {
return mConsumerType == ConvertUtils.CONSUMER_TYPE_SYSTEM_BATTERY;
}
/** Gets an identifier to represent this {@link BatteryHistEntry}. */
public String getKey() {
if (mKey == null) {