power/stats: Rename readEnergyMeters to readEnergyMeter
Bug: 135067502 Test: build Change-Id: I76e73668faf248ca33a37eb221973d2164d9c9b8
This commit is contained in:
parent
dbdfdc85c8
commit
77e678ce59
5 changed files with 10 additions and 10 deletions
|
@ -38,5 +38,5 @@ interface IPowerStats {
|
|||
android.hardware.power.stats.EnergyConsumer[] getEnergyConsumerInfo();
|
||||
android.hardware.power.stats.EnergyConsumerResult[] getEnergyConsumed(in int[] energyConsumerIds);
|
||||
android.hardware.power.stats.Channel[] getEnergyMeterInfo();
|
||||
android.hardware.power.stats.EnergyMeasurement[] readEnergyMeters(in int[] channelIds);
|
||||
android.hardware.power.stats.EnergyMeasurement[] readEnergyMeter(in int[] channelIds);
|
||||
}
|
||||
|
|
|
@ -107,5 +107,5 @@ interface IPowerStats {
|
|||
* - STATUS_BAD_VALUE if an invalid channelId is provided
|
||||
* - STATUS_FAILED_TRANSACTION if any EnergyMeasurement fails to be returned
|
||||
*/
|
||||
EnergyMeasurement[] readEnergyMeters(in int[] channelIds);
|
||||
}
|
||||
EnergyMeasurement[] readEnergyMeter(in int[] channelIds);
|
||||
}
|
||||
|
|
|
@ -53,8 +53,8 @@ ndk::ScopedAStatus PowerStats::getEnergyMeterInfo(std::vector<Channel>* _aidl_re
|
|||
return ndk::ScopedAStatus::ok();
|
||||
}
|
||||
|
||||
ndk::ScopedAStatus PowerStats::readEnergyMeters(const std::vector<int32_t>& in_channelIds,
|
||||
std::vector<EnergyMeasurement>* _aidl_return) {
|
||||
ndk::ScopedAStatus PowerStats::readEnergyMeter(const std::vector<int32_t>& in_channelIds,
|
||||
std::vector<EnergyMeasurement>* _aidl_return) {
|
||||
(void)in_channelIds;
|
||||
(void)_aidl_return;
|
||||
return ndk::ScopedAStatus::ok();
|
||||
|
|
|
@ -35,8 +35,8 @@ class PowerStats : public BnPowerStats {
|
|||
ndk::ScopedAStatus getEnergyConsumed(const std::vector<int32_t>& in_energyConsumerIds,
|
||||
std::vector<EnergyConsumerResult>* _aidl_return) override;
|
||||
ndk::ScopedAStatus getEnergyMeterInfo(std::vector<Channel>* _aidl_return) override;
|
||||
ndk::ScopedAStatus readEnergyMeters(const std::vector<int32_t>& in_channelIds,
|
||||
std::vector<EnergyMeasurement>* _aidl_return) override;
|
||||
ndk::ScopedAStatus readEnergyMeter(const std::vector<int32_t>& in_channelIds,
|
||||
std::vector<EnergyMeasurement>* _aidl_return) override;
|
||||
};
|
||||
|
||||
} // namespace stats
|
||||
|
|
|
@ -262,7 +262,7 @@ TEST_P(PowerStatsAidl, ValidateChannelUniqueIds) {
|
|||
// Reading energy meter must return a valid status
|
||||
TEST_P(PowerStatsAidl, TestReadEnergyMeter) {
|
||||
std::vector<EnergyMeasurement> data;
|
||||
ASSERT_TRUE(powerstats->readEnergyMeters({}, &data).isOk());
|
||||
ASSERT_TRUE(powerstats->readEnergyMeter({}, &data).isOk());
|
||||
}
|
||||
|
||||
// Reading energy meter must return results for all available channels
|
||||
|
@ -271,7 +271,7 @@ TEST_P(PowerStatsAidl, TestGetAllEnergyMeasurements) {
|
|||
ASSERT_TRUE(powerstats->getEnergyMeterInfo(&channels).isOk());
|
||||
|
||||
std::vector<EnergyMeasurement> measurements;
|
||||
ASSERT_TRUE(powerstats->readEnergyMeters({}, &measurements).isOk());
|
||||
ASSERT_TRUE(powerstats->readEnergyMeter({}, &measurements).isOk());
|
||||
|
||||
testMatching(channels, &Channel::id, measurements, &EnergyMeasurement::id);
|
||||
}
|
||||
|
@ -291,7 +291,7 @@ TEST_P(PowerStatsAidl, TestGetSelectedEnergyMeasurements) {
|
|||
}
|
||||
|
||||
std::vector<EnergyMeasurement> selectedMeasurements;
|
||||
ASSERT_TRUE(powerstats->readEnergyMeters(selectedIds, &selectedMeasurements).isOk());
|
||||
ASSERT_TRUE(powerstats->readEnergyMeter(selectedIds, &selectedMeasurements).isOk());
|
||||
|
||||
testMatching(selectedChannels, &Channel::id, selectedMeasurements, &EnergyMeasurement::id);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue