Remove which from BatteryStats
BatteryStats tracks three "which" states: STATS_SINCE_CHARGED, STATS_CURRENT, STATS_SINCE_UNPLUGGED However, only STATS_SINCE_CHARGED is really needed; the other two just take up a lot of unjustifiable RAM. We therefore remove them from the implementation here. We also remove mLastTime and mLastCount from Timers and Counters, since it was always zero anyway. While the other two "whiches" are left as constants, they are ignored, and all functions treat any which as STATS_SINCE_CHARGED. In particular, SystemHealthManager now uses STATS_SINCE_CHARGED, rather than STATS_SINCE_UNPLUGGED for all of its Battery statistics. This is adapted from ag/4310406, but slimmed down to just the 'which' removal parts. Bug: 70892428 Test: com.android.internal.os.BatteryStatsTests Change-Id: I86f2743ff30afc15bbaa12c68f3206ea528857a1
Loading
Please register or sign in to comment