Fix the prefix matching for uncrypt status.
Also change its logging statement from PLOG to LOG, since
android::base::StartsWith() doesn't set errno.
Test: Build and reboot into recovery image. Check last_log.
Change-Id: I55ac7eec24228db76a13580958b4a4330b06cf57
(cherry picked from commit ee9b95544a7af548e98f2b7a080e2eb7abaaf981)
(cherry picked from commit e30a5b3a44c6c2134750e28a88efd5876a28bfac)
diff --git a/install.cpp b/install.cpp
index 83ddc4b..aa1fe17 100644
--- a/install.cpp
+++ b/install.cpp
@@ -537,7 +537,7 @@
if (!android::base::ReadFileToString(UNCRYPT_STATUS, &uncrypt_status)) {
PLOG(WARNING) << "failed to read uncrypt status";
} else if (!android::base::StartsWith(uncrypt_status, "uncrypt_")) {
- PLOG(WARNING) << "corrupted uncrypt_status: " << uncrypt_status;
+ LOG(WARNING) << "corrupted uncrypt_status: " << uncrypt_status;
} else {
log_buffer.push_back(android::base::Trim(uncrypt_status));
}