/hardware/google/aemu/base/ |
D | FileUtils.cpp | 40 bool readFileIntoString(int fd, std::string* file_contents) { in readFileIntoString() argument 59 *file_contents = std::move(buf); in readFileIntoString() 63 bool writeStringToFile(int fd, const std::string& file_contents) { in writeStringToFile() argument 69 _write(fd, file_contents.c_str(), file_contents.size())); in writeStringToFile() 72 write(fd, file_contents.c_str(), file_contents.size())); in writeStringToFile() 74 if (result != (ssize_t)file_contents.size()) { in writeStringToFile()
|
/hardware/google/pixel/pixelstats/ |
D | PcaChargeStats.cpp | 35 bool PcaChargeStats::CheckPcaContentsAndAck(std::string *file_contents) { in CheckPcaContentsAndAck() argument 40 if (!ReadFileToString(path.c_str(), file_contents)) { in CheckPcaContentsAndAck() 41 if (!ReadFileToString(kPca94xxChargeMetricsPath.c_str(), file_contents)) { in CheckPcaContentsAndAck() 46 if (!ReadFileToString(path.c_str(), file_contents)) { in CheckPcaContentsAndAck() 51 ss.str(*file_contents); in CheckPcaContentsAndAck()
|
D | SysfsCollector.cpp | 148 std::string file_contents; in ReadFileToInt() local 150 if (!ReadFileToString(path, &file_contents)) { in ReadFileToInt() 153 } else if (StartsWith(file_contents, "0x")) { in ReadFileToInt() 154 if (sscanf(file_contents.c_str(), "0x%x", val) != 1) { in ReadFileToInt() 158 } else if (sscanf(file_contents.c_str(), "%d", val) != 1) { in ReadFileToInt() 171 std::string file_contents; in logBatteryChargeCycles() local 177 if (!ReadFileToString(kCycleCountBinsPath, &file_contents)) { in logBatteryChargeCycles() 185 std::stringstream stream(file_contents); in logBatteryChargeCycles() 200 std::replace(file_contents.begin(), file_contents.end(), ' ', ','); in logBatteryChargeCycles() 251 std::string file_contents; in logCodecFailed() local [all …]
|
D | WirelessChargeStats.cpp | 55 bool WirelessChargeStats::CheckWirelessContentsAndAck(std::string *file_contents) { in CheckWirelessContentsAndAck() argument 59 if (!ReadFileToString(kWirelessChargeMetricsPath.c_str(), file_contents)) in CheckWirelessContentsAndAck() 62 ss.str(*file_contents); in CheckWirelessContentsAndAck() 104 const std::string file_contents) { in CalculateWirelessChargeStats() argument 109 ss.str(file_contents); in CalculateWirelessChargeStats()
|
D | BatteryHealthReporter.cpp | 52 std::string file_contents, line; in reportBatteryHealthStatus() local 55 if (!ReadFileToString(path.c_str(), &file_contents)) { in reportBatteryHealthStatus() 60 ss.str(file_contents); in reportBatteryHealthStatus() 118 std::string file_contents, line; in reportBatteryHealthUsage() local 121 if (!ReadFileToString(path.c_str(), &file_contents)) { in reportBatteryHealthUsage() 126 ss.str(file_contents); in reportBatteryHealthUsage()
|
D | BatteryEEPROMReporter.cpp | 48 std::string file_contents; in checkAndReport() local 59 if (!ReadFileToString(path.c_str(), &file_contents)) { in checkAndReport() 66 const int kHistTotalLen = file_contents.size(); in checkAndReport() 74 if (history_offset > file_contents.size()) in checkAndReport() 76 history_each = file_contents.substr(history_offset, LINESIZE_V2); in checkAndReport() 135 history_each = file_contents.substr(i, LINESIZE); in checkAndReport() 276 std::string file_contents; in checkAndReportGMSR() local 290 if (!ReadFileToString(path, &file_contents)) { in checkAndReportGMSR() 295 num = sscanf(file_contents.c_str(), "rcomp0\t:%4" SCNx16 "\ntempco\t:%4" SCNx16 in checkAndReportGMSR() 318 std::string file_contents; in checkAndReportMaxfgHistory() local [all …]
|
D | TempResidencyReporter.cpp | 51 bool parse_file_contents(std::string file_contents, in parse_file_contents() argument 53 const char *data = file_contents.c_str(); in parse_file_contents() 54 int data_len = file_contents.length(); in parse_file_contents() 125 std::string file_contents; in logTempResidencyStats() local 126 if (!ReadFileToString(temperature_residency_path.data(), &file_contents)) { in logTempResidencyStats() 131 if (!parse_file_contents(file_contents, &stats_map)) { in logTempResidencyStats()
|
D | MmMetricsReporter.cpp | 185 std::string file_contents; in ReadFileToUint() local 187 if (!ReadFileToString(path, &file_contents)) { in ReadFileToUint() 194 file_contents = android::base::Trim(file_contents); in ReadFileToUint() 195 if (!android::base::ParseUint(file_contents, val)) { in ReadFileToUint() 223 std::string file_contents; in ReadFileToLongs() local 225 if (!ReadFileToString(path, &file_contents)) { in ReadFileToLongs() 233 file_contents = android::base::Trim(file_contents); in ReadFileToLongs() 234 std::vector<std::string> words = android::base::Tokenize(file_contents, delim); in ReadFileToLongs() 309 std::string file_contents; in readSysfsNameValue() local 312 if (!ReadFileToString(path, &file_contents)) { in readSysfsNameValue() [all …]
|
D | ChargeStatsReporter.cpp | 83 std::string pdo_line, file_contents; in ReportChargeStats() local 143 if (ReadFileToString(kGChargerMetricsPath.c_str(), &file_contents)) { in ReportChargeStats() 144 ss.str(file_contents); in ReportChargeStats() 265 std::string file_contents, line, wfile_contents, wline_at, wline_ac, pca_file_contents, in checkAndReport() local 270 if (!ReadFileToString(path.c_str(), &file_contents)) { in checkAndReport() 275 ss.str(file_contents); in checkAndReport() 346 bool ChargeStatsReporter::checkContentsAndAck(std::string *file_contents, const std::string &path) { in checkContentsAndAck() argument 347 if (!ReadFileToString(path.c_str(), file_contents)) { in checkContentsAndAck()
|
D | BatteryTTFReporter.cpp | 51 std::string file_contents, line; in reportBatteryTTFStats() local 54 if (!ReadFileToString(path.c_str(), &file_contents)) { in reportBatteryTTFStats() 59 ss.str(file_contents); in reportBatteryTTFStats()
|
D | ThermalStatsReporter.cpp | 45 std::string file_contents; in readDfsCount() local 52 if (!ReadFileToString(path.c_str(), &file_contents)) { in readDfsCount() 58 if (sscanf(file_contents.c_str(), in readDfsCount() 63 ALOGE("Unable to parse trip_counters %s from file %s", file_contents.c_str(), in readDfsCount()
|
D | MitigationStatsReporter.cpp | 44 std::string file_contents; in ReadFileToInt() local 46 if (!ReadFileToString(path.c_str(), &file_contents)) { in ReadFileToInt() 50 file_contents = android::base::Trim(file_contents); in ReadFileToInt() 51 if (!android::base::ParseInt(file_contents, val)) { in ReadFileToInt()
|
D | DisplayStatsReporter.cpp | 46 std::string file_contents; in readDisplayErrorCount() local 52 if (!ReadFileToString(path.c_str(), &file_contents)) { in readDisplayErrorCount() 58 file_contents = android::base::Trim(file_contents); in readDisplayErrorCount() 59 if (!android::base::ParseInt(file_contents, val)) { in readDisplayErrorCount()
|
D | MitigationDurationReporter.cpp | 167 std::string file_contents; in getIrqDurationCountHelper() local 169 if (!ReadFileToString(kMitigationDurationFile, &file_contents)) { in getIrqDurationCountHelper() 174 std::vector<std::string> lines = android::base::Split(file_contents, "\n"); in getIrqDurationCountHelper()
|
D | StatsHelper.cpp | 252 std::string file_contents, line; in readLogbuffer() local 259 if (!ReadFileToString(buf_path, &file_contents)) { in readLogbuffer() 264 ss.str(file_contents); in readLogbuffer()
|
D | BatteryFGReporter.cpp | 219 std::string file_contents; in checkAndReportFwUpdate() local 225 if (!ReadFileToString(path, &file_contents)) { in checkAndReportFwUpdate() 232 num = sscanf(file_contents.c_str(), "%" SCNu16 " %" SCNu16 " %" SCNu16, in checkAndReportFwUpdate()
|
D | UeventListener.cpp | 93 std::string file_contents; in ReadFileToInt() local 95 if (!ReadFileToString(path, &file_contents)) { in ReadFileToInt() 98 } else if (sscanf(file_contents.c_str(), "%d", val) != 1) { in ReadFileToInt()
|
/hardware/google/aemu/base/include/aemu/base/misc/ |
D | FileUtils.h | 25 bool readFileIntoString(int fd, std::string* file_contents); 32 bool writeStringToFile(int fd, const std::string& file_contents);
|
/hardware/google/pixel/pixelstats/include/pixelstats/ |
D | WirelessChargeStats.h | 31 bool CheckWirelessContentsAndAck(std::string *file_contents); 32 void CalculateWirelessChargeStats(const int soc_tmp, const std::string file_contents);
|
D | PcaChargeStats.h | 34 bool CheckPcaContentsAndAck(std::string *file_contents);
|
D | ChargeStatsReporter.h | 40 bool checkContentsAndAck(std::string *file_contents, const std::string &path);
|