powerstats: Use unique_ptr to store data providers
Pixel implementation of Power Stats HAL employs the use of data
providers. The software model is such that the HAL has sole ownership of
the various data providers.
However the implementation was using shared_ptrs for the various data
providers, which suggests multiple ownership. Moving to using unique_ptr
enforces the ownership semantics that were intended in the design of the
HAL implementation and will also hopefully prevent any bugs associated
with multiple ownership gone awry.
Bug: 183051413
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Test: atest VtsHalPowerStatsTargetTest
Change-Id: I95bc9123b5002f1b9a035d7ec2725eae5b80eacf
6 files changed