am 418f4b0e: License property for company_name should come from device on android
* commit '418f4b0e607316b90be54b3d0f3c09dddc3e59b6': License property for company_name should come from device on android
This commit is contained in:
@@ -39,6 +39,7 @@ class Properties {
|
||||
static inline bool use_certificates_as_identification() {
|
||||
return use_certificates_as_identification_;
|
||||
}
|
||||
static bool GetCompanyName(std::string& company_name);
|
||||
static bool GetModelName(std::string& model_name);
|
||||
static bool GetArchitectureName(std::string& arch_name);
|
||||
static bool GetDeviceName(std::string& device_name);
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
|
||||
namespace {
|
||||
std::string kCompanyNameKey = "company_name";
|
||||
std::string kCompanyNameValueGoogle = "Google";
|
||||
std::string kModelNameKey = "model_name";
|
||||
std::string kArchitectureNameKey = "architecture_name";
|
||||
std::string kDeviceNameKey = "device_name";
|
||||
@@ -136,9 +135,11 @@ bool CdmLicense::PrepareKeyRequest(const CdmInitData& init_data,
|
||||
client_info->set_value(iter->second);
|
||||
}
|
||||
std::string value;
|
||||
client_info = client_id->add_client_info();
|
||||
client_info->set_name(kCompanyNameKey);
|
||||
client_info->set_value(kCompanyNameValueGoogle);
|
||||
if (Properties::GetCompanyName(value)) {
|
||||
client_info = client_id->add_client_info();
|
||||
client_info->set_name(kCompanyNameKey);
|
||||
client_info->set_value(value);
|
||||
}
|
||||
if (Properties::GetModelName(value)) {
|
||||
client_info = client_id->add_client_info();
|
||||
client_info->set_name(kModelNameKey);
|
||||
|
||||
@@ -19,6 +19,10 @@ namespace {
|
||||
|
||||
namespace wvcdm {
|
||||
|
||||
bool Properties::GetCompanyName(std::string& company_name) {
|
||||
return GetAndroidProperty("ro.product.manufacturer", company_name);
|
||||
}
|
||||
|
||||
bool Properties::GetModelName(std::string& model_name) {
|
||||
return GetAndroidProperty("ro.product.model", model_name);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user