Use device info from OS property when TEE returns empty
Some mandatory device info fields like manufacturer can be empty string when returned from TEE on devices which have not been provisioned with attestation IDs. The extraction tool also needs to check for empty string in the response, and if so, populates the field with Android property values. Test: extracting device info from new Pixel EVT 1.1 and uploading Bug: 276958001 Change-Id: I6e1b3dee8ffcd991335bc50b59a0c80f030cdc79
This commit is contained in:
@@ -33,6 +33,14 @@ bool GetAndroidProperty(const char* key, std::string* value) {
|
||||
|
||||
namespace wvcdm {
|
||||
|
||||
bool Properties::GetBrandName(std::string* brand_name) {
|
||||
if (!brand_name) {
|
||||
LOGW("Properties::GetBrandName: Invalid parameter");
|
||||
return false;
|
||||
}
|
||||
return GetAndroidProperty("ro.product.brand", brand_name);
|
||||
}
|
||||
|
||||
bool Properties::GetCompanyName(std::string* company_name) {
|
||||
if (!company_name) {
|
||||
LOGW("Properties::GetCompanyName: Invalid parameter");
|
||||
|
||||
Reference in New Issue
Block a user