Merge "Add OS Version to Properties" into lmp-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
039b984a75
@@ -48,6 +48,7 @@ class Properties {
|
|||||||
static bool GetDeviceName(std::string* device_name);
|
static bool GetDeviceName(std::string* device_name);
|
||||||
static bool GetProductName(std::string* product_name);
|
static bool GetProductName(std::string* product_name);
|
||||||
static bool GetBuildInfo(std::string* build_info);
|
static bool GetBuildInfo(std::string* build_info);
|
||||||
|
static bool GetOsVersion(std::string* os_version);
|
||||||
static bool GetDeviceFilesBasePath(CdmSecurityLevel security_level,
|
static bool GetDeviceFilesBasePath(CdmSecurityLevel security_level,
|
||||||
std::string* base_path);
|
std::string* base_path);
|
||||||
static bool GetFactoryKeyboxPath(std::string* keybox);
|
static bool GetFactoryKeyboxPath(std::string* keybox);
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ std::string kDeviceNameKey = "device_name";
|
|||||||
std::string kProductNameKey = "product_name";
|
std::string kProductNameKey = "product_name";
|
||||||
std::string kBuildInfoKey = "build_info";
|
std::string kBuildInfoKey = "build_info";
|
||||||
std::string kDeviceIdKey = "device_id";
|
std::string kDeviceIdKey = "device_id";
|
||||||
|
std::string kOsVersion = "os_version";
|
||||||
const unsigned char kServiceCertificateCAPublicKey[] = {
|
const unsigned char kServiceCertificateCAPublicKey[] = {
|
||||||
0x30, 0x82, 0x01, 0x8a, 0x02, 0x82, 0x01, 0x81,
|
0x30, 0x82, 0x01, 0x8a, 0x02, 0x82, 0x01, 0x81,
|
||||||
0x00, 0xb4, 0xfe, 0x39, 0xc3, 0x65, 0x90, 0x03,
|
0x00, 0xb4, 0xfe, 0x39, 0xc3, 0x65, 0x90, 0x03,
|
||||||
@@ -281,6 +282,11 @@ bool CdmLicense::PrepareKeyRequest(const InitializationData& init_data,
|
|||||||
client_info->set_name(kDeviceIdKey);
|
client_info->set_name(kDeviceIdKey);
|
||||||
client_info->set_value(value);
|
client_info->set_value(value);
|
||||||
}
|
}
|
||||||
|
if (Properties::GetOSVersion(&value)) {
|
||||||
|
client_info = client_id->add_client_info();
|
||||||
|
client_info->set_name(kOsVersionKey);
|
||||||
|
client_info->set_value(value);
|
||||||
|
}
|
||||||
|
|
||||||
ClientIdentification_ClientCapabilities* client_capabilities =
|
ClientIdentification_ClientCapabilities* client_capabilities =
|
||||||
client_id->mutable_client_capabilities();
|
client_id->mutable_client_capabilities();
|
||||||
|
|||||||
@@ -87,6 +87,14 @@ bool Properties::GetBuildInfo(std::string* build_info) {
|
|||||||
return GetAndroidProperty("ro.build.fingerprint", build_info);
|
return GetAndroidProperty("ro.build.fingerprint", build_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Properties::GetOsVersion(std::string* os_version) {
|
||||||
|
if (!os_version) {
|
||||||
|
LOGW("Properties::GetOsVersion: Invalid parameter");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return GetAndroidProperty("ro.build.version.release", os_version);
|
||||||
|
}
|
||||||
|
|
||||||
bool Properties::GetDeviceFilesBasePath(CdmSecurityLevel security_level,
|
bool Properties::GetDeviceFilesBasePath(CdmSecurityLevel security_level,
|
||||||
std::string* base_path) {
|
std::string* base_path) {
|
||||||
if (!base_path) {
|
if (!base_path) {
|
||||||
|
|||||||
Reference in New Issue
Block a user