From ee9b95544a7af548e98f2b7a080e2eb7abaaf981 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Thu, 13 Oct 2016 16:04:07 -0700 Subject: [PATCH] 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 --- install.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.cpp b/install.cpp index 427bea1a..72c922d5 100644 --- a/install.cpp +++ b/install.cpp @@ -377,8 +377,8 @@ install_package(const char* path, bool* wipe_cache, const char* install_file, std::string uncrypt_status; 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; + } else if (!android::base::StartsWith(uncrypt_status, "uncrypt_")) { + LOG(WARNING) << "corrupted uncrypt_status: " << uncrypt_status; } else { log_buffer.push_back(android::base::Trim(uncrypt_status)); }