Refine startBatteryDetailPage method to support history data

Bug: 177406865
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: Iee3b6b353c4f92bdad37fac55adad58b4f205bf6
This commit is contained in:
ykhung
2021-04-19 13:37:59 +08:00
committed by YUKAI HUNG
parent d2bffb94a7
commit 4752ea17b9
9 changed files with 187 additions and 31 deletions

View File

@@ -113,6 +113,16 @@ public class BatteryHistEntry {
return mIsValidEntry;
}
/** Whether this {@link BatteryHistEntry} is user consumer or not. */
public boolean isUserEntry() {
return mConsumerType == ConvertUtils.CONSUMER_TYPE_USER_BATTERY;
}
/** Whether this {@link BatteryHistEntry} is app consumer or not. */
public boolean isAppEntry() {
return mConsumerType == ConvertUtils.CONSUMER_TYPE_UID_BATTERY;
}
/** Gets an identifier to represent this {@link BatteryHistEntry}. */
public String getKey() {
if (mKey == null) {