mirror of
https://github.com/Evolution-X-Devices/device_google_zuma
synced 2026-02-01 07:40:34 +00:00
Handle empty read from file.
Test: run /vendor/bin/dump/dump_power Bug: 312681873 Change-Id: I8c49cf7f0048190f02d35d50984abca361d517f1
This commit is contained in:
@@ -362,7 +362,7 @@ void dumpBatteryDefend() {
|
||||
|
||||
for (auto &file : files) {
|
||||
fileLocation = std::string(config[1]) + std::string(file);
|
||||
if (!android::base::ReadFileToString(fileLocation, &content)) {
|
||||
if (!android::base::ReadFileToString(fileLocation, &content) || content.empty()) {
|
||||
content = "\n";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user