diff options
| author | Praveen Chavan <pchavan@codeaurora.org> | 2018-10-04 10:39:33 -0700 |
|---|---|---|
| committer | Jeff Tinker <jtinker@google.com> | 2018-10-09 16:57:25 -0700 |
| commit | c7822ef90d1ddda3ef63b7d3c1a3498203e49568 (patch) | |
| tree | 28bf4bedbf66432e7914ed0b357d4194b21eac7b /drm | |
| parent | 5e0659c82240821cfa6766d33cca438a5f09ef32 (diff) | |
| download | frameworks_av-c7822ef90d1ddda3ef63b7d3c1a3498203e49568.tar.gz frameworks_av-c7822ef90d1ddda3ef63b7d3c1a3498203e49568.tar.bz2 frameworks_av-c7822ef90d1ddda3ef63b7d3c1a3498203e49568.zip | |
Fix AMediaDrm_setPropertyByteArray
Also extend clearkey plugin to allow testing
of this change.
Author: Lubin Yin <lubiny@codeaurora.org>
Change-Id: Ie9b9fcd8920a6c843845700e7bba01ffc20a9507
Diffstat (limited to 'drm')
| -rw-r--r-- | drm/mediadrm/plugins/clearkey/hidl/DrmPlugin.cpp | 3 | ||||
| -rw-r--r-- | drm/mediadrm/plugins/clearkey/hidl/include/ClearKeyDrmProperties.h | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/drm/mediadrm/plugins/clearkey/hidl/DrmPlugin.cpp b/drm/mediadrm/plugins/clearkey/hidl/DrmPlugin.cpp index 3b6108526b..d04d97648d 100644 --- a/drm/mediadrm/plugins/clearkey/hidl/DrmPlugin.cpp +++ b/drm/mediadrm/plugins/clearkey/hidl/DrmPlugin.cpp @@ -346,6 +346,9 @@ Return<Status> DrmPlugin::setPropertyByteArray( if (name == kDeviceIdKey) { ALOGD("Cannot set immutable property: %s", name.c_str()); return Status::BAD_VALUE; + } else if (name == kClientIdKey) { + mByteArrayProperties[kClientIdKey] = toVector(value); + return Status::OK; } // Setting of undefined properties is not supported diff --git a/drm/mediadrm/plugins/clearkey/hidl/include/ClearKeyDrmProperties.h b/drm/mediadrm/plugins/clearkey/hidl/include/ClearKeyDrmProperties.h index d65b25c37f..cad9222dd4 100644 --- a/drm/mediadrm/plugins/clearkey/hidl/include/ClearKeyDrmProperties.h +++ b/drm/mediadrm/plugins/clearkey/hidl/include/ClearKeyDrmProperties.h @@ -40,6 +40,10 @@ static const std::string kDeviceIdKey("deviceId"); static const uint8_t kTestDeviceIdData[] = {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf}; + +// settable byte array property +static const std::string kClientIdKey("clientId"); + // TODO stub out metrics for nw static const std::string kMetricsKey("metrics"); static const uint8_t kMetricsData[] = { 0 }; |
