Merge "Revert "Change linker config variable: VNDK_VER""

This commit is contained in:
Treehugger Robot 2019-10-17 11:50:47 +00:00 committed by Gerrit Code Review
commit 919dc05d66
3 changed files with 6 additions and 6 deletions

View file

@ -4208,7 +4208,7 @@ static std::string get_ld_config_file_vndk_path() {
if (insert_pos == std::string::npos) {
insert_pos = ld_config_file_vndk.length();
}
ld_config_file_vndk.insert(insert_pos, Config::get_vndk_version_string("."));
ld_config_file_vndk.insert(insert_pos, Config::get_vndk_version_string('.'));
return ld_config_file_vndk;
}

View file

@ -408,7 +408,7 @@ class Properties {
params.push_back({ "SDK_VER", buf });
}
static std::string vndk = Config::get_vndk_version_string("");
static std::string vndk = Config::get_vndk_version_string('-');
params.push_back({ "VNDK_VER", vndk });
for (auto& path : paths) {
@ -596,11 +596,11 @@ bool Config::read_binary_config(const char* ld_config_file_path,
return true;
}
std::string Config::get_vndk_version_string(const std::string& prefix) {
std::string Config::get_vndk_version_string(const char delimiter) {
std::string version = android::base::GetProperty("ro.vndk.version", "");
if (version != "" && version != "current") {
//add the prefix in front of the string and return it.
return version.insert(0, prefix);
//add the delimiter char in front of the string and return it.
return version.insert(0, 1, delimiter);
}
return "";
}

View file

@ -164,7 +164,7 @@ class Config {
const Config** config,
std::string* error_msg);
static std::string get_vndk_version_string(const std::string& prefix);
static std::string get_vndk_version_string(const char delimiter);
private:
void clear();