summaryrefslogtreecommitdiffstats
path: root/drm
diff options
context:
space:
mode:
Diffstat (limited to 'drm')
-rw-r--r--drm/mediadrm/plugins/clearkey/DrmPlugin.h10
-rw-r--r--drm/mediadrm/plugins/mock/MockDrmCryptoPlugin.cpp25
-rw-r--r--drm/mediadrm/plugins/mock/MockDrmCryptoPlugin.h2
3 files changed, 37 insertions, 0 deletions
diff --git a/drm/mediadrm/plugins/clearkey/DrmPlugin.h b/drm/mediadrm/plugins/clearkey/DrmPlugin.h
index 27df9cd..6139f1f 100644
--- a/drm/mediadrm/plugins/clearkey/DrmPlugin.h
+++ b/drm/mediadrm/plugins/clearkey/DrmPlugin.h
@@ -113,11 +113,21 @@ public:
return android::ERROR_DRM_CANNOT_HANDLE;
}
+ virtual status_t getSecureStop(Vector<uint8_t> const &ssid, Vector<uint8_t> &secureStop) {
+ UNUSED(ssid);
+ UNUSED(secureStop);
+ return android::ERROR_DRM_CANNOT_HANDLE;
+ }
+
virtual status_t releaseSecureStops(const Vector<uint8_t>& ssRelease) {
UNUSED(ssRelease);
return android::ERROR_DRM_CANNOT_HANDLE;
}
+ virtual status_t releaseAllSecureStops() {
+ return android::ERROR_DRM_CANNOT_HANDLE;
+ }
+
virtual status_t getPropertyString(
const String8& name, String8& value) const;
diff --git a/drm/mediadrm/plugins/mock/MockDrmCryptoPlugin.cpp b/drm/mediadrm/plugins/mock/MockDrmCryptoPlugin.cpp
index 2ea554b..7eac0a1 100644
--- a/drm/mediadrm/plugins/mock/MockDrmCryptoPlugin.cpp
+++ b/drm/mediadrm/plugins/mock/MockDrmCryptoPlugin.cpp
@@ -305,6 +305,24 @@ namespace android {
return OK;
}
+ status_t MockDrmPlugin::getSecureStop(Vector<uint8_t> const &ssid, Vector<uint8_t> &secureStop)
+ {
+ Mutex::Autolock lock(mLock);
+ ALOGD("MockDrmPlugin::getSecureStop()");
+
+ // Properties used in mock test, set by cts test app returned from mock plugin
+ // byte[] mock-secure-stop -> first secure stop in list
+
+ ssize_t index = mByteArrayProperties.indexOfKey(String8("mock-secure-stop"));
+ if (index < 0) {
+ ALOGD("Missing 'mock-secure-stop' parameter for mock");
+ return BAD_VALUE;
+ } else {
+ secureStop = mByteArrayProperties.valueAt(index);
+ }
+ return OK;
+ }
+
status_t MockDrmPlugin::getSecureStops(List<Vector<uint8_t> > &secureStops)
{
Mutex::Autolock lock(mLock);
@@ -349,6 +367,13 @@ namespace android {
return OK;
}
+ status_t MockDrmPlugin::releaseAllSecureStops()
+ {
+ Mutex::Autolock lock(mLock);
+ ALOGD("MockDrmPlugin::releaseAllSecureStops()");
+ return OK;
+ }
+
status_t MockDrmPlugin::getPropertyString(String8 const &name, String8 &value) const
{
ALOGD("MockDrmPlugin::getPropertyString(name=%s)", name.string());
diff --git a/drm/mediadrm/plugins/mock/MockDrmCryptoPlugin.h b/drm/mediadrm/plugins/mock/MockDrmCryptoPlugin.h
index 4b63299..d1d8058 100644
--- a/drm/mediadrm/plugins/mock/MockDrmCryptoPlugin.h
+++ b/drm/mediadrm/plugins/mock/MockDrmCryptoPlugin.h
@@ -88,7 +88,9 @@ namespace android {
status_t unprovisionDevice();
status_t getSecureStops(List<Vector<uint8_t> > &secureStops);
+ status_t getSecureStop(Vector<uint8_t> const &ssid, Vector<uint8_t> &secureStop);
status_t releaseSecureStops(Vector<uint8_t> const &ssRelease);
+ status_t releaseAllSecureStops();
status_t getPropertyString(String8 const &name, String8 &value ) const;
status_t getPropertyByteArray(String8 const &name,