Home
last modified time | relevance | path

Searched refs:ReadFileToString (Results 1 – 25 of 26) sorted by relevance

12

/hardware/google/pixel/health/test/
DTestBatteryDefender.cpp30 virtual bool ReadFileToString(const std::string &path, std::string *content,
43 MOCK_METHOD3(ReadFileToString,
57 bool ReadFileToString(const std::string &path, std::string *content, bool follow_symlinks) { in ReadFileToString() function
58 return mock->ReadFileToString(path, content, follow_symlinks); in ReadFileToString()
113 EXPECT_CALL(*mock, ReadFileToString(_, _, _)).Times(AnyNumber()); in SetUp()
118 ON_CALL(*mock, ReadFileToString(_, _, _)) in SetUp()
153 ON_CALL(*mock, ReadFileToString(kPathWirelessChargerOnline, _, _)) in powerAvailable()
155 ON_CALL(*mock, ReadFileToString(kPathWiredChargerPresent, _, _)) in powerAvailable()
165 ON_CALL(*mock, ReadFileToString(kPathBatteryCapacity, _, _)) in capacityReached()
170 ON_CALL(*mock, ReadFileToString(kPathPersistChargerPresentTime, _, _)) in initToConnectedCapacityReached()
[all …]
/hardware/google/pixel/pixelstats/
DWlcReporter.cpp28 using android::base::ReadFileToString;
48 if (!ReadFileToString(path, &file_contents)) { in readFileToInt()
130 if (!ReadFileToString(POWER_SUPPLY_SYSFS_PATH, &file_contents)) { in isWlcSupported()
141 if (!ReadFileToString(POWER_SUPPLY_SYSFS_PATH, &file_contents)) { in isWlcOnline()
DSysfsCollector.cpp41 using android::base::ReadFileToString;
84 if (!ReadFileToString(path, &file_contents)) { in ReadFileToInt()
112 if (!ReadFileToString(kCycleCountBinsPath, &file_contents)) { in logBatteryChargeCycles()
137 if (!ReadFileToString(kCodecPath, &file_contents)) { in logCodecFailed()
160 if (!ReadFileToString(kCodec1Path, &file_contents)) { in logCodec1Failed()
182 if (!ReadFileToString(path, &file_contents)) { in reportSlowIoFromFile()
219 if (!ReadFileToString(kImpedancePath, &file_contents)) { in logSpeakerImpedance()
246 if (!ReadFileToString(kSpeechDspPath, &file_contents)) { in logSpeechDspStat()
446 if (!ReadFileToString(kZramMmStatPath, &file_contents)) { in reportZramMmStat()
497 if (!ReadFileToString(kZramBdStatPath, &file_contents)) { in reportZramBdStat()
DBatteryCapacityReporter.cpp36 using android::base::ReadFileToString;
72 if (!ReadFileToString(path, &batterySSOCContents)) { in parse()
DUeventListener.cpp34 using android::base::ReadFileToString;
58 if (!ReadFileToString(path, &file_contents)) { in ReadFileToInt()
226 if (!ReadFileToString(kChargeMetricsPath.c_str(), &file_contents)) { in ReportChargeMetricsEvent()
/hardware/interfaces/health/storage/1.0/default/
DStorage.cpp34 using base::ReadFileToString;
68 if (!ReadFileToString(path, &require)) { in garbageCollect()
121 if (ReadFileToString(path, &require)) { in debug()
/hardware/google/pixel/health/
DCycleCountBackupRestore.cpp53 if (!android::base::ReadFileToString(serial_path_, &device_battery_serial)) { in CheckSerial()
58 if (!android::base::ReadFileToString(kPersistSerial, &persist_battery_serial)) { in CheckSerial()
95 if (!android::base::ReadFileToString(path, &buffer)) { in Read()
DLowBatteryShutdownMetrics.cpp29 using android::base::ReadFileToString;
76 if (!ReadFileToString(kVoltageAvg, &voltage_avg)) { in saveVoltageAvg()
DBatteryMetricsLogger.cpp90 if (!android::base::ReadFileToString(kBatteryAvgResistance, &file_content)) { in uploadAverageBatteryResistance()
162 if (!android::base::ReadFileToString(kBatteryResistance, &resistance_str)) { in recordSample()
170 if (!android::base::ReadFileToString(kBatteryOCV, &ocv_str)) { in recordSample()
DBatteryDefender.cpp81 if (!android::base::ReadFileToString(path, &buffer)) { in readFileToInt()
/hardware/google/pixel/thermal/utils/
Dthermal_files.cpp51 if (!::android::base::ReadFileToString(file_path, &sensor_reading)) { in readThermalFile()
Dconfig_parser.cpp65 if (!android::base::ReadFileToString(config_path.data(), &json_doc)) { in ParseSensorInfo()
240 if (!android::base::ReadFileToString(config_path.data(), &json_doc)) { in ParseCoolingDevice()
/hardware/google/pixel/perfstatsd/
Dcpu_usage.cpp33 if (android::base::ReadFileToString("/proc/stat", &procstat)) { in CpuUsage()
88 if (android::base::ReadFileToString("/proc/" + pidStr + "/stat", &pidStat)) { in profileProcess()
160 if (android::base::ReadFileToString("/proc/stat", &procStat)) { in getOverallUsage()
Dio_usage.cpp118 if (!android::base::ReadFileToString("/proc/" + std::to_string(pid) + "/status", &buffer)) { in update()
442 if (!android::base::ReadFileToString(UID_IO_STATS_PATH, &buffer)) { in refresh()
/hardware/google/pixel/thermal/
Dthermal-helper.cpp69 if (!android::base::ReadFileToString(kCpuPresentFile.data(), &file)) { in getNumberOfCores()
92 if (!android::base::ReadFileToString(kCpuUsageFile.data(), &data)) { in parseCpuUsagesFileAndAssignUsages()
117 if (!android::base::ReadFileToString(cpu_online_path, &is_online)) { in parseCpuUsagesFileAndAssignUsages()
156 if (!android::base::ReadFileToString(path, &name)) { in parseThermalPathMap()
428 if (!android::base::ReadFileToString(path, &tz_policy)) { in initializeTrip()
/hardware/google/pixel/power-libperfmgr/libperfmgr/
DFileNode.cc105 if (!android::base::ReadFileToString(node_path_, &node_value)) { in DumpToFd()
DHintManager.cc117 if (!android::base::ReadFileToString(config_path, &json_doc)) { in GetFromJSON()
/hardware/google/pixel/power-libperfmgr/libperfmgr/tools/
DConfigVerifier.cc35 if (!android::base::ReadFileToString(config_path, &json_doc)) { in VerifyNodes()
/hardware/interfaces/power/stats/1.0/default/
DPowerStats.cpp94 if (!android::base::ReadFileToString(spsFileName, &data)) { in parsePowerRails()
103 if (!android::base::ReadFileToString(railFileName, &data)) { in parsePowerRails()
130 if (!android::base::ReadFileToString(fileName, &data)) { in parseIioEnergyNode()
/hardware/st/secure_element/ese-spi-driver/utils-lib/
Dconfig.cc87 bool config_read = ReadFileToString(file_name, &config); in parseFromFile()
/hardware/nxp/secure_element/libese-spi/p73/utils/
Dconfig.cpp92 bool config_read = ReadFileToString(file_name, &config); in parseFromFile()
/hardware/google/pixel/power-libperfmgr/libperfmgr/tests/
DNodeLooperThreadTest.cc59 EXPECT_TRUE(android::base::ReadFileToString(path, &s)) << strerror(errno); in _VerifyPathValue()
DPropertyNodeTest.cc79 EXPECT_TRUE(android::base::ReadFileToString(dumptf.path, &s)) in TEST()
DFileNodeTest.cc37 EXPECT_TRUE(android::base::ReadFileToString(path, &s)) << strerror(errno); in _VerifyPathValue()
DHintManagerTest.cc200 EXPECT_TRUE(android::base::ReadFileToString(path, &s)) << strerror(errno); in _VerifyPathValue()

12