Actually use the cache for names and icons.

Fixes the flashes in name and icon in Battery usage screen when refreshing.
Bug: 8219466

Some earlier refactoring must have messed up the cache's scope. It will now
avoid reloading name and icon if already present in the cache.

Change-Id: I99c1f14dd53828dcb74cf12c02c47628e2e64d30
This commit is contained in:
Amith Yamasani
2013-02-19 10:40:33 -08:00
parent 595a891922
commit a521d11796
2 changed files with 7 additions and 4 deletions

View File

@@ -178,6 +178,8 @@ public class PowerUsageSummary extends PreferenceFragment implements Runnable {
super.onDestroy();
if (getActivity().isChangingConfigurations()) {
sStatsXfer = mStats;
} else {
BatterySipper.sUidCache.clear();
}
}