summaryrefslogtreecommitdiffstats
path: root/drm
diff options
context:
space:
mode:
authorJeff Tinker <jtinker@google.com>2014-11-05 20:11:10 -0800
committerChristopher Ferris <cferris@google.com>2014-11-06 15:54:14 -0800
commitd556fad7475f4cd05a2199e9716ed8e01aa0ea9b (patch)
tree54ec9d3bf73ceb8647f421bd8ff095a529e4ddaa /drm
parente86c6d59dfa8aea8f321287cbb1f122623e5417a (diff)
downloadframeworks_av-d556fad7475f4cd05a2199e9716ed8e01aa0ea9b.zip
frameworks_av-d556fad7475f4cd05a2199e9716ed8e01aa0ea9b.tar.gz
frameworks_av-d556fad7475f4cd05a2199e9716ed8e01aa0ea9b.tar.bz2
Fix build, update mock drm plugin
Bug: 18280078 (cherry picked from commit 85c737a67e1b679251fce7f456ae79eefdc15e07) Change-Id: I341981e71d87be666787d9c866fc71a6b758c0e9
Diffstat (limited to 'drm')
-rw-r--r--drm/mediadrm/plugins/mock/MockDrmCryptoPlugin.cpp25
-rw-r--r--drm/mediadrm/plugins/mock/MockDrmCryptoPlugin.h2
2 files changed, 27 insertions, 0 deletions
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,