Refine logic and add simple test for BatteryChartPreferenceController

Bug: 177406865
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: Ie218cf967c6f30c6eadcdfe6bfd3f37ccdc2276e
This commit is contained in:
ykhung
2021-04-15 22:47:15 +08:00
committed by YUKAI HUNG
parent ab12e78a10
commit ab5e180139
5 changed files with 261 additions and 45 deletions

View File

@@ -200,7 +200,7 @@ public final class BatteryDiffEntry {
final BatteryEntry.NameAndIcon nameAndIcon =
BatteryEntry.loadNameAndIcon(
mContext, uid, /*uid=*/ null, /*batteryEntry=*/ null,
mContext, uid, /*handler=*/ null, /*batteryEntry=*/ null,
packageName, mAppLabel, mAppIcon);
// Clears BatteryEntry internal cache since we will have another one.
BatteryEntry.clearUidCache();