Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7a03cef5 authored by Edwin Wong's avatar Edwin Wong
Browse files

kVersionValue in clearkey service 1.1 should return 1.1.

kVersionValue should return 1.1. Also change getPropertyString
to get value from mStringProperties[] instead of using hard coded
values.

Test: CTS ClearKeySystemTest#testGetProperties

bug: 73031837
Change-Id: I9d108a42a75ac3685d2c6ef58697efffe6152284
parent 1bfabb36
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -210,16 +210,16 @@ Return<void> DrmPlugin::getPropertyString(
    std::string name(propertyName.c_str());
    std::string value;

    if (name == "vendor") {
        value = "Google";
    } else if (name == "version") {
        value = "1.1";
    } else if (name == "description") {
        value = "ClearKey CDM";
    } else if (name == "algorithms") {
        value = "";
    } else if (name == "listenerTestSupport") {
        value = mStringProperties[name];
    if (name == kVendorKey) {
        value = mStringProperties[kVendorKey];
    } else if (name == kVersionKey) {
        value = mStringProperties[kVersionKey];
    } else if (name == kPluginDescriptionKey) {
        value = mStringProperties[kPluginDescriptionKey];
    } else if (name == kAlgorithmsKey) {
        value = mStringProperties[kAlgorithmsKey];
    } else if (name == kListenerTestSupportKey) {
        value = mStringProperties[kListenerTestSupportKey];
    } else {
        ALOGE("App requested unknown string property %s", name.c_str());
        _hidl_cb(Status::ERROR_DRM_CANNOT_HANDLE, "");
+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ namespace clearkey {
static const std::string kVendorKey("vendor");
static const std::string kVendorValue("Google");
static const std::string kVersionKey("version");
static const std::string kVersionValue("1.0");
static const std::string kVersionValue("1.1");
static const std::string kPluginDescriptionKey("description");
static const std::string kPluginDescriptionValue("ClearKey CDM");
static const std::string kAlgorithmsKey("algorithms");