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:
@@ -178,6 +178,8 @@ public class PowerUsageSummary extends PreferenceFragment implements Runnable {
|
||||
super.onDestroy();
|
||||
if (getActivity().isChangingConfigurations()) {
|
||||
sStatsXfer = mStats;
|
||||
} else {
|
||||
BatterySipper.sUidCache.clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user