powerstats: Add config support for AdaptiveDvfs data provider

Bug: 273415531
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I48bd1ec622680a3c93d15b571fbf21579f0e21ed
Signed-off-by: Darren Hsu <darrenhsu@google.com>
This commit is contained in:
Darren Hsu 2023-03-14 14:31:43 +08:00
parent 75a5c5dceb
commit 529b618a7c
3 changed files with 29 additions and 22 deletions

View file

@ -103,6 +103,10 @@ bool DvfsStateResidencyDataProvider::getStateResidencies(
it = residencies->find(mPowerEntities[powerEntityIndex].powerEntityName + nameSuffix);
}
// The given string is last state for each entity.
if (StartsWith(Trim(std::string(line)), "last_freq_change_time_ns:"))
it = residencies->end();
if (it != residencies->end()) {
stateId = matchState(line, mPowerEntities[powerEntityIndex]);