Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

BatteryStatsImpl uid blaming for measured energy data

Adds support for blaming measured energy (rail) data on individual uids
starting with display.

1. Display measured energy data is apportioned to apps.
This is based on their relative foreground activity time and PROCESS_STATE_TOP
time, in accordance with the current BatteryStatsHelper smearing algorithm.

2. Infrastructure is in place for additional energy rails
to do likewise.

3. Fixes a bug in Bluetooth activity data not being reset properly

4. Fixes a bug in that resets didn't handle external data properly

Test: atest FrameworksServicesTests:com.android.server.am.MeasuredEnergySnapshotTest \
            FrameworksCoreTests:com.android.internal.power.MeasuredEnergyStatsTest \
            FrameworksCoreTests:com.android.internal.os.BatteryStatsNoteTest#testUpdateDisplayEnergyLocked

Bug: 174818228
Bug: 174818483
Bug: 174818545
Bug: 173652857
Change-Id: Ibade3689ad7c3c22e181c8086df25c203fe0ad6b
parent 05b2b121
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment