Never store battery stats for cache
In PowerUsageBase, it will store battery stats if it has a configuration change, which will make BatteryStatsLoaderHelper never get the correct battery stats because it uses Bundle.EMPTY as the bundle message. This cl: 1. Remove the store action even though it is configuration change. 2. Always use null to get battery stats 3. Always start a battery status check in register() Bug: 63658232 Test: RunSettingsRoboTests Change-Id: Ifbf970c63378ed66dddcdae4d952b7d1fd84216a
This commit is contained in:
@@ -370,6 +370,7 @@ public class BatteryUtils {
|
||||
public void initBatteryStatsHelper(BatteryStatsHelper statsHelper, Bundle bundle,
|
||||
UserManager userManager) {
|
||||
statsHelper.create(bundle);
|
||||
statsHelper.clearStats();
|
||||
statsHelper.refreshStats(BatteryStats.STATS_SINCE_CHARGED, userManager.getUserProfiles());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user