Skip to content
Commit 4127267e authored by Adam Bookatz's avatar Adam Bookatz
Browse files

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
parent cdb0369d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment