Add Property to Access System ID
Adds a new property to the CDM's QueryStatus called QUERY_KEY_SYSTEM_ID that contains the System ID. (as read from OEMCrypto_GetKeyData) Adds a new property to the DrmPlugin (cleverly named "systemId") that allows the app to query for this. Also adds unit tests. Also changes the Device ID getter in crypto_engine.cpp to return a failure instead of an empty ID. Bug: 8621632 Merge of https://widevine-internal-review.googlesource.com/#/c/5010/ from widevine cdm repository to android repository. Change-Id: I8f309af18487c499e8ce25e829059e45623ea4dc
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <errno.h>
|
||||
#include <getopt.h>
|
||||
#include <sstream>
|
||||
|
||||
#include "config_test_env.h"
|
||||
#include "gtest/gtest.h"
|
||||
@@ -217,6 +218,13 @@ TEST_F(WvCdmRequestLicenseTest, QueryStatus) {
|
||||
ASSERT_TRUE(itr != query_info.end());
|
||||
EXPECT_GT((int)itr->second.size(), 0);
|
||||
|
||||
itr = query_info.find(wvcdm::QUERY_KEY_SYSTEM_ID);
|
||||
ASSERT_TRUE(itr != query_info.end());
|
||||
std::istringstream ss(itr->second);
|
||||
uint32_t system_id;
|
||||
EXPECT_TRUE(ss >> system_id);
|
||||
EXPECT_TRUE(ss.eof());
|
||||
|
||||
decryptor_.CloseSession(session_id_);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user