summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorAdam Bookatz <bookatz@google.com>2021-01-13 19:29:22 -0800
committerAdam Bookatz <bookatz@google.com>2021-01-28 08:31:13 +0000
commit2ad7cd41697805d5236cfb01012f9fd0562c5104 (patch)
tree3d1b2b48d39c48625664f878268987c1dba9b943 /tools/aapt2/java/JavaClassGenerator_test.cpp
parent11d9d6cf7790b72f5cd5476adaa0500431f697d1 (diff)
ScreenPowerCalculator is responsible for smearing
The estimated energy used by the screen is smeared over all apps based on their foreground time. This calculation is performed by BatteryStatsHelper after most of its other processing. In this cl, we move that logic to the ScreenPowerCalculator, which is actually responsible for calculating the total and app screen energy blaming. This also allows other power calculators for screen usage (such as actual screen energy measurements) to be hooked up in the future, without BSH worrying about whether to smear. Note: Smeared energy is not included in the app's total energy usage until the very end; prior to that, it is recorded in a special field BatterySipper.screenPowerMah. This is NOT changed in this cl. NOTE: The actual smearing algorithm is NOT altered in this cl. Test: atest BatteryStatsHelperTest Bug: 174818228 Bug: 162379528 Change-Id: I30b436b736e96071a1e4167d37512d250119665c Merged-In: I30b436b736e96071a1e4167d37512d250119665c (cherry picked from commit 3754504f4b149963e08526a17274e2f702481a3a)
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions