Skip to content
Commit 0b8a0508 authored by Bookatz's avatar Bookatz
Browse files

Throttle fetching RPM stats

RPM stats are expensive to fetch. However, updateRpmStatsLocked can
get called over and over again. E.g. if
BatteryStatsService.getStatistics is called multiple times in quick
succession, the RPM stats would be fetched repeatedly. Because it is
expensive, if therefore makes sense to throttle it to ensure that the
fetching is not done too frequently.

The data last fetched is cached. When asked to update, it will only
actually do so if it is sufficiently old.

Bug: 62549421
Bug: 65629008
Test: manual
Change-Id: I6b7530d203deb9ad5bfb3415336a0de6a55bd89b
parent 50df711a
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