Merge MaxNumberOfSessions changes from CDM

Bug: 18377675

Implement new OEMCrypto function to get max number of sessions
https://widevine-internal-review.googlesource.com/#/c/12980/

Add oemcrypto static adapter for v9
https://widevine-internal-review.googlesource.com/#/c/13022/

Support new property to query MaxNumberOfSessions in CDM
https://widevine-internal-review.googlesource.com/#/c/13020/

Fix GetHdcpCapabilities incorrect return if not initialized
https://widevine-internal-review.googlesource.com/#/c/13210/

Change-Id: I02738c543cedd6e38d8826f845fec6cb2b1ede3c
This commit is contained in:
KongQun Yang
2015-02-19 16:52:23 -08:00
committed by John "Juce" Bruce
parent 891bd057f4
commit 23c95a1251
11 changed files with 199 additions and 74 deletions

View File

@@ -708,6 +708,10 @@ TEST_F(WVDrmPluginTest, ReturnsExpectedPropertyValues) {
CdmQueryMap provisioningIDMap;
provisioningIDMap[QUERY_KEY_PROVISIONING_ID] = provisioningId;
static const string maxSessions = "18";
CdmQueryMap maxSessionsMap;
maxSessionsMap[QUERY_KEY_MAX_NUMBER_OF_SESSIONS] = maxSessions;
EXPECT_CALL(cdm, QueryStatus(_))
.WillOnce(DoAll(SetArgPointee<0>(l1Map),
Return(wvcdm::NO_ERROR)))
@@ -718,6 +722,8 @@ TEST_F(WVDrmPluginTest, ReturnsExpectedPropertyValues) {
.WillOnce(DoAll(SetArgPointee<0>(systemIDMap),
Return(wvcdm::NO_ERROR)))
.WillOnce(DoAll(SetArgPointee<0>(provisioningIDMap),
Return(wvcdm::NO_ERROR)))
.WillOnce(DoAll(SetArgPointee<0>(maxSessionsMap),
Return(wvcdm::NO_ERROR)));
String8 stringResult;
@@ -759,6 +765,10 @@ TEST_F(WVDrmPluginTest, ReturnsExpectedPropertyValues) {
ASSERT_EQ(OK, res);
EXPECT_THAT(vectorResult, ElementsAreArray(provisioningId.data(),
provisioningId.size()));
res = plugin.getPropertyString(String8("maxNumberOfSessions"), stringResult);
ASSERT_EQ(OK, res);
EXPECT_EQ(maxSessions, stringResult.string());
}
TEST_F(WVDrmPluginTest, DoesNotGetUnknownProperties) {