BatteryStats measured energy for Wifi & Bluetooth
Measured energy data for Wifi is received, processed, attributed to uids, and delivered. Same for Bluetooth. Since Wifi power analysis is done via two methods (ControllerActivity data or packet data), depending on what is available on the device, the measured energy method also takes into account these two methods for attribution purposes. For Bluetooth, the only raw data is ControllerActivity data, so it is simpler. In both cases, if that data already contains energy data from the ControllerActivity, but the device also has measured energy data, then the controller energy data is used for normalization but is otherwise replaced by the measured energy data. In other words, the measured energy data is treated preferentially. Also fixes a minor bug in BSI.initMeasuredEnergyStatsLocked() which had a stray early return line. Test: atest BatteryStatsTests Bug: 174818228 Change-Id: Id4728fcd5e6f226664e578a4c19c4aaa5246ff4b
Loading
Please register or sign in to comment