Merge cdm changes to android repo

Bug: 251924225
Test: GtsMediaTestCases
Change-Id: I1b4e64c0abf701fe1f5017f14dc72b72c3ea6770
This commit is contained in:
Kyle Zhang
2022-10-07 23:55:37 +00:00
parent 3cfe7c7299
commit af0168dbed
54 changed files with 295536 additions and 294359 deletions

View File

@@ -175,12 +175,23 @@ bool Properties::GetFactoryKeyboxPath(std::string* keybox) {
return true;
}
bool Properties::GetOEMCryptoPath(std::string* library_name) {
if (!library_name) {
bool Properties::GetOEMCryptoPaths(std::vector<std::string>* library_names) {
if (!library_names) {
LOGW("Properties::GetOEMCryptoPath: Invalid parameter");
return false;
}
*library_name = "liboemcrypto.so";
std::vector<std::string> library_paths = {"/vendor/", "/system/", "/odm/"};
std::string sub_dir;
#if __LP64__
sub_dir = "lib64/";
#else
sub_dir = "lib/";
#endif
const std::string library_name = "liboemcrypto.so";
for (auto& path : library_paths) {
library_names->push_back(path + sub_dir + library_name);
}
return true;
}