Commit 1f8e8cf8 authored by Yusuke Sato's avatar Yusuke Sato Committed by Commit Bot

arcvm: Address comments in the previous code review

See
https://chromium-review.googlesource.com/c/chromium/src/+/2344008

BUG=None
TEST=try

Change-Id: I0664ec7bd189ad1b44e83ec0391a470349844fc1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2343962
Commit-Queue: Yusuke Sato <yusukes@chromium.org>
Reviewed-by: default avatarYury Khmel <khmel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#796657}
parent a0b4b24f
......@@ -41,6 +41,8 @@ constexpr char kOEMKey1PropertyPrefix[] = "ro.oem.key1=";
constexpr char kPAIRegionsPropertyName[] = "pai-regions";
// Properties related to dynamically adding native bridge 64 bit support.
// Note that "%s" is lated replaced with a partition name which is either an
// empty string or a string that ends with '.' e.g. "system_ext.".
constexpr char kAbilistPropertyPrefixTemplate[] = "ro.%sproduct.cpu.abilist=";
constexpr char kAbilistPropertyExpected[] = "x86_64,x86,armeabi-v7a,armeabi";
constexpr char kAbilistPropertyReplacement[] =
......@@ -222,8 +224,10 @@ bool ExpandPropertyContents(const std::string& content,
} while (inserted);
if (add_native_bridge_64bit_support) {
// Special-case ro.<partition>.product.cpu.abilist and
// ro.<partition>.product.cpu.abilist64 to add ARM64.
// Special-case ro.<partition>product.cpu.abilist and
// ro.<partition>product.cpu.abilist64 to add ARM64.
// Note that <partition> is either an empty string or a string that ends
// with '.' e.g. "system_ext.".
std::string prefix = base::StringPrintf(kAbilistPropertyPrefixTemplate,
partition_name.c_str());
std::string value;
......@@ -353,7 +357,7 @@ bool ExpandPropertyContentsForTesting(const std::string& content,
std::string* expanded_content) {
return ExpandPropertyContents(content, config, expanded_content,
/*add_native_bridge_64bit_support=*/false,
false, "");
false, std::string());
}
bool TruncateAndroidPropertyForTesting(const std::string& line,
......@@ -366,7 +370,7 @@ bool ExpandPropertyFileForTesting(const base::FilePath& input,
CrosConfig* config) {
return ExpandPropertyFile(input, output, config, /*append=*/false,
/*add_native_bridge_64bit_support=*/false, false,
"");
std::string());
}
bool ExpandPropertyFiles(const base::FilePath& source_path,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment