Revert "Use aidl interface for Widevine service."
This reverts commit 96a8ccd4a1.
Reason for revert:
Could break DeviceManifest/SingleManifestTest#ManifestAidlHalsServed
Bug: 200055138
Bug: 170964303
Bug: 217241995
Change-Id: I9c42df15defec428c9ef8c62439c63d4a603fee6
This commit is contained in:
@@ -7,20 +7,19 @@
|
||||
#ifndef WV_DRM_PLUGIN_H_
|
||||
#define WV_DRM_PLUGIN_H_
|
||||
|
||||
#include <utils/Mutex.h>
|
||||
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <list>
|
||||
|
||||
#include "HidlTypes.h"
|
||||
#include "OEMCryptoCENC.h"
|
||||
#include "WVGenericCryptoInterface.h"
|
||||
#include "WVTypes.h"
|
||||
#include "cdm_client_property_set.h"
|
||||
#include "cdm_identifier.h"
|
||||
#include "log.h"
|
||||
#include "wv_cdm_event_listener.h"
|
||||
#include "wv_content_decryption_module.h"
|
||||
#include "OEMCryptoCENC.h"
|
||||
#include "HidlTypes.h"
|
||||
#include "WVGenericCryptoInterface.h"
|
||||
#include "WVTypes.h"
|
||||
#include <utils/Mutex.h>
|
||||
|
||||
namespace wvdrm {
|
||||
namespace hardware {
|
||||
@@ -28,23 +27,24 @@ namespace drm {
|
||||
namespace V1_4 {
|
||||
namespace widevine {
|
||||
|
||||
using android::Mutex;
|
||||
using std::map;
|
||||
using android::Mutex;
|
||||
using wvcdm::CdmIdentifier;
|
||||
using wvcdm::CdmKeyStatusMap;
|
||||
using wvcdm::CdmResponseType;
|
||||
using wvcdm::CdmSessionId;
|
||||
using wvcdm::CdmResponseType;
|
||||
using wvcdm::WvContentDecryptionModule;
|
||||
|
||||
const OEMCrypto_Algorithm kInvalidCryptoAlgorithm =
|
||||
static_cast<OEMCrypto_Algorithm>(-1);
|
||||
|
||||
struct WVDrmPlugin : public ::drm::V1_4::IDrmPlugin,
|
||||
IDrmPluginListener,
|
||||
wvcdm::WvCdmEventListener {
|
||||
struct WVDrmPlugin : public ::drm::V1_4::IDrmPlugin, IDrmPluginListener,
|
||||
wvcdm::WvCdmEventListener {
|
||||
|
||||
WVDrmPlugin(const sp<WvContentDecryptionModule>& cdm,
|
||||
const std::string& appPackageName,
|
||||
WVGenericCryptoInterface* crypto, bool useSpoid);
|
||||
WVGenericCryptoInterface* crypto,
|
||||
bool useSpoid);
|
||||
|
||||
virtual ~WVDrmPlugin();
|
||||
|
||||
@@ -52,44 +52,53 @@ struct WVDrmPlugin : public ::drm::V1_4::IDrmPlugin,
|
||||
|
||||
Return<void> openSession(openSession_cb _hidl_cb) override;
|
||||
|
||||
Return<void> openSession_1_1(SecurityLevel securityLevel,
|
||||
openSession_1_1_cb _hidl_cb) override;
|
||||
Return<void> openSession_1_1(SecurityLevel securityLevel, openSession_1_1_cb _hidl_cb) override;
|
||||
|
||||
Return<Status> closeSession(const hidl_vec<uint8_t>& sessionId) override;
|
||||
|
||||
Return<void> getKeyRequest(const hidl_vec<uint8_t>& scope,
|
||||
const hidl_vec<uint8_t>& initData,
|
||||
const hidl_string& mimeType, KeyType keyType,
|
||||
const hidl_vec<KeyValue>& optionalParameters,
|
||||
getKeyRequest_cb _hidl_cb) override;
|
||||
Return<void> getKeyRequest(
|
||||
const hidl_vec<uint8_t>& scope,
|
||||
const hidl_vec<uint8_t>& initData,
|
||||
const hidl_string& mimeType,
|
||||
KeyType keyType,
|
||||
const hidl_vec<KeyValue>& optionalParameters,
|
||||
getKeyRequest_cb _hidl_cb) override;
|
||||
|
||||
Return<void> getKeyRequest_1_1(const hidl_vec<uint8_t>& scope,
|
||||
const hidl_vec<uint8_t>& initData,
|
||||
const hidl_string& mimeType, KeyType keyType,
|
||||
const hidl_vec<KeyValue>& optionalParameters,
|
||||
getKeyRequest_1_1_cb _hidl_cb) override;
|
||||
Return<void> getKeyRequest_1_1(
|
||||
const hidl_vec<uint8_t>& scope,
|
||||
const hidl_vec<uint8_t>& initData,
|
||||
const hidl_string& mimeType,
|
||||
KeyType keyType,
|
||||
const hidl_vec<KeyValue>& optionalParameters,
|
||||
getKeyRequest_1_1_cb _hidl_cb) override;
|
||||
|
||||
Return<void> getKeyRequest_1_2(const hidl_vec<uint8_t>& scope,
|
||||
const hidl_vec<uint8_t>& initData,
|
||||
const hidl_string& mimeType, KeyType keyType,
|
||||
const hidl_vec<KeyValue>& optionalParameters,
|
||||
getKeyRequest_1_2_cb _hidl_cb) override;
|
||||
Return<void> getKeyRequest_1_2(
|
||||
const hidl_vec<uint8_t>& scope,
|
||||
const hidl_vec<uint8_t>& initData,
|
||||
const hidl_string& mimeType,
|
||||
KeyType keyType,
|
||||
const hidl_vec<KeyValue>& optionalParameters,
|
||||
getKeyRequest_1_2_cb _hidl_cb) override;
|
||||
|
||||
Return<void> provideKeyResponse(const hidl_vec<uint8_t>& scope,
|
||||
const hidl_vec<uint8_t>& response,
|
||||
provideKeyResponse_cb _hidl_cb) override;
|
||||
Return<void> provideKeyResponse(
|
||||
const hidl_vec<uint8_t>& scope,
|
||||
const hidl_vec<uint8_t>& response,
|
||||
provideKeyResponse_cb _hidl_cb) override;
|
||||
|
||||
Return<Status> removeKeys(const hidl_vec<uint8_t>& sessionId) override;
|
||||
|
||||
Return<Status> restoreKeys(const hidl_vec<uint8_t>& sessionId,
|
||||
const hidl_vec<uint8_t>& keySetId) override;
|
||||
Return<Status> restoreKeys(
|
||||
const hidl_vec<uint8_t>& sessionId,
|
||||
const hidl_vec<uint8_t>& keySetId) override;
|
||||
|
||||
Return<void> queryKeyStatus(const hidl_vec<uint8_t>& sessionId,
|
||||
queryKeyStatus_cb _hidl_cb) override;
|
||||
Return<void> queryKeyStatus(
|
||||
const hidl_vec<uint8_t>& sessionId,
|
||||
queryKeyStatus_cb _hidl_cb) override;
|
||||
|
||||
Return<void> getProvisionRequest(const hidl_string& certificateType,
|
||||
const hidl_string& certificateAuthority,
|
||||
getProvisionRequest_cb _hidl_cb) override;
|
||||
Return<void> getProvisionRequest(
|
||||
const hidl_string& certificateType,
|
||||
const hidl_string& certificateAuthority,
|
||||
getProvisionRequest_cb _hidl_cb) override;
|
||||
|
||||
Return<void> getProvisionRequest_1_2(
|
||||
const hidl_string& certificateType,
|
||||
@@ -102,8 +111,9 @@ struct WVDrmPlugin : public ::drm::V1_4::IDrmPlugin,
|
||||
|
||||
Return<void> getSecureStops(getSecureStops_cb _hidl_cb) override;
|
||||
|
||||
Return<void> getSecureStop(const hidl_vec<uint8_t>& secureStopId,
|
||||
getSecureStop_cb _hidl_cb) override;
|
||||
Return<void> getSecureStop(
|
||||
const hidl_vec<uint8_t>& secureStopId,
|
||||
getSecureStop_cb _hidl_cb) override;
|
||||
|
||||
Return<Status> releaseAllSecureStops() override;
|
||||
|
||||
@@ -114,11 +124,9 @@ struct WVDrmPlugin : public ::drm::V1_4::IDrmPlugin,
|
||||
|
||||
Return<void> getSecureStopIds(getSecureStopIds_cb _hidl_cb) override;
|
||||
|
||||
Return<Status> releaseSecureStops(
|
||||
const SecureStopRelease& ssRelease) override;
|
||||
Return<Status> releaseSecureStops(const SecureStopRelease& ssRelease) override;
|
||||
|
||||
Return<Status> removeSecureStop(
|
||||
const hidl_vec<uint8_t>& secureStopId) override;
|
||||
Return<Status> removeSecureStop(const hidl_vec<uint8_t>& secureStopId) override;
|
||||
|
||||
Return<Status> removeAllSecureStops() override;
|
||||
|
||||
@@ -128,87 +136,101 @@ struct WVDrmPlugin : public ::drm::V1_4::IDrmPlugin,
|
||||
Return<void> getNumberOfSessions(getNumberOfSessions_cb _hidl_cb) override;
|
||||
|
||||
Return<void> getSecurityLevel(const hidl_vec<uint8_t>& sessionId,
|
||||
getSecurityLevel_cb _hidl_cb) override;
|
||||
getSecurityLevel_cb _hidl_cb) override;
|
||||
|
||||
Return<void> getOfflineLicenseKeySetIds(
|
||||
getOfflineLicenseKeySetIds_cb _hidl_cb) override;
|
||||
|
||||
Return<Status> removeOfflineLicense(const KeySetId& keySetId) override;
|
||||
Return<Status> removeOfflineLicense(const KeySetId &keySetId) override;
|
||||
|
||||
Return<void> getOfflineLicenseState(
|
||||
const KeySetId& keySetId, getOfflineLicenseState_cb _hidl_cb) override;
|
||||
Return<void> getOfflineLicenseState(const KeySetId &keySetId,
|
||||
getOfflineLicenseState_cb _hidl_cb) override;
|
||||
|
||||
Return<void> getPropertyString(const hidl_string& propertyName,
|
||||
getPropertyString_cb _hidl_cb) override;
|
||||
Return<void> getPropertyString(
|
||||
const hidl_string& propertyName,
|
||||
getPropertyString_cb _hidl_cb) override;
|
||||
|
||||
Return<void> getPropertyByteArray(const hidl_string& propertyName,
|
||||
getPropertyByteArray_cb _hidl_cb) override;
|
||||
Return<void> getPropertyByteArray(
|
||||
const hidl_string& propertyName,
|
||||
getPropertyByteArray_cb _hidl_cb) override;
|
||||
|
||||
Return<Status> setPropertyString(const hidl_string& propertyName,
|
||||
const hidl_string& value) override;
|
||||
Return<Status> setPropertyString(
|
||||
const hidl_string& propertyName,
|
||||
const hidl_string& value) override;
|
||||
|
||||
Return<Status> setPropertyByteArray(const hidl_string& propertyName,
|
||||
const hidl_vec<uint8_t>& value) override;
|
||||
Return<Status> setPropertyByteArray(
|
||||
const hidl_string& propertyName,
|
||||
const hidl_vec<uint8_t>& value) override;
|
||||
|
||||
Return<Status> setCipherAlgorithm(const hidl_vec<uint8_t>& sessionId,
|
||||
const hidl_string& algorithm) override;
|
||||
Return<Status> setCipherAlgorithm(
|
||||
const hidl_vec<uint8_t>& sessionId,
|
||||
const hidl_string& algorithm) override;
|
||||
|
||||
Return<Status> setMacAlgorithm(const hidl_vec<uint8_t>& sessionId,
|
||||
const hidl_string& algorithm) override;
|
||||
Return<Status> setMacAlgorithm(
|
||||
const hidl_vec<uint8_t>& sessionId,
|
||||
const hidl_string& algorithm) override;
|
||||
|
||||
Return<void> encrypt(const hidl_vec<uint8_t>& sessionId,
|
||||
const hidl_vec<uint8_t>& keyId,
|
||||
const hidl_vec<uint8_t>& input,
|
||||
const hidl_vec<uint8_t>& iv,
|
||||
encrypt_cb _hidl_cb) override;
|
||||
Return<void> encrypt(
|
||||
const hidl_vec<uint8_t>& sessionId,
|
||||
const hidl_vec<uint8_t>& keyId,
|
||||
const hidl_vec<uint8_t>& input,
|
||||
const hidl_vec<uint8_t>& iv,
|
||||
encrypt_cb _hidl_cb) override;
|
||||
|
||||
Return<void> decrypt(const hidl_vec<uint8_t>& sessionId,
|
||||
const hidl_vec<uint8_t>& keyId,
|
||||
const hidl_vec<uint8_t>& input,
|
||||
const hidl_vec<uint8_t>& iv,
|
||||
decrypt_cb _hidl_cb) override;
|
||||
Return<void> decrypt(
|
||||
const hidl_vec<uint8_t>& sessionId,
|
||||
const hidl_vec<uint8_t>& keyId,
|
||||
const hidl_vec<uint8_t>& input,
|
||||
const hidl_vec<uint8_t>& iv,
|
||||
decrypt_cb _hidl_cb) override;
|
||||
|
||||
Return<void> sign(const hidl_vec<uint8_t>& sessionId,
|
||||
const hidl_vec<uint8_t>& keyId,
|
||||
const hidl_vec<uint8_t>& message,
|
||||
sign_cb _hidl_cb) override;
|
||||
const hidl_vec<uint8_t>& keyId, const hidl_vec<uint8_t>& message,
|
||||
sign_cb _hidl_cb) override;
|
||||
|
||||
Return<void> verify(const hidl_vec<uint8_t>& sessionId,
|
||||
const hidl_vec<uint8_t>& keyId,
|
||||
const hidl_vec<uint8_t>& message,
|
||||
const hidl_vec<uint8_t>& signature,
|
||||
verify_cb _hidl_cb) override;
|
||||
Return<void> verify(
|
||||
const hidl_vec<uint8_t>& sessionId,
|
||||
const hidl_vec<uint8_t>& keyId,
|
||||
const hidl_vec<uint8_t>& message,
|
||||
const hidl_vec<uint8_t>& signature,
|
||||
verify_cb _hidl_cb) override;
|
||||
|
||||
Return<void> signRSA(const hidl_vec<uint8_t>& sessionId,
|
||||
const hidl_string& algorithm,
|
||||
const hidl_vec<uint8_t>& message,
|
||||
const hidl_vec<uint8_t>& wrappedkey,
|
||||
signRSA_cb _hidl_cb) override;
|
||||
Return<void> signRSA(
|
||||
const hidl_vec<uint8_t>& sessionId,
|
||||
const hidl_string& algorithm,
|
||||
const hidl_vec<uint8_t>& message,
|
||||
const hidl_vec<uint8_t>& wrappedkey,
|
||||
signRSA_cb _hidl_cb) override;
|
||||
|
||||
Return<void> setListener(const sp<IDrmPluginListener>& listener) override;
|
||||
|
||||
Return<void> sendEvent(EventType eventType,
|
||||
const hidl_vec<uint8_t>& sessionId,
|
||||
const hidl_vec<uint8_t>& data) override;
|
||||
Return<void> sendEvent(
|
||||
EventType eventType,
|
||||
const hidl_vec<uint8_t>& sessionId,
|
||||
const hidl_vec<uint8_t>& data) override;
|
||||
|
||||
Return<void> sendExpirationUpdate(const hidl_vec<uint8_t>& sessionId,
|
||||
int64_t expiryTimeInMS) override;
|
||||
Return<void> sendExpirationUpdate(
|
||||
const hidl_vec<uint8_t>& sessionId,
|
||||
int64_t expiryTimeInMS) override;
|
||||
|
||||
Return<void> sendKeysChange(const hidl_vec<uint8_t>& sessionId,
|
||||
const hidl_vec<KeyStatus>& keyStatusList,
|
||||
bool hasNewUsableKey) override;
|
||||
Return<void> sendKeysChange(
|
||||
const hidl_vec<uint8_t>& sessionId,
|
||||
const hidl_vec<KeyStatus>& keyStatusList,
|
||||
bool hasNewUsableKey) override;
|
||||
|
||||
Return<void> sendKeysChange_1_2(const hidl_vec<uint8_t>& sessionId,
|
||||
const hidl_vec<KeyStatus_V1_2>& keyStatusList,
|
||||
bool hasNewUsableKey) override;
|
||||
Return<void> sendKeysChange_1_2(
|
||||
const hidl_vec<uint8_t>& sessionId,
|
||||
const hidl_vec<KeyStatus_V1_2>& keyStatusList,
|
||||
bool hasNewUsableKey) override;
|
||||
|
||||
Return<void> sendSessionLostState(
|
||||
const hidl_vec<uint8_t>& sessionId) override;
|
||||
|
||||
Return<void> getLogMessages(getLogMessages_cb _hidl_cb) override;
|
||||
Return<void> getLogMessages(
|
||||
getLogMessages_cb _hidl_cb) override;
|
||||
|
||||
Return<bool> requiresSecureDecoder(const hidl_string& mime,
|
||||
SecurityLevel level) override;
|
||||
Return<bool> requiresSecureDecoder(const hidl_string& mime, SecurityLevel level)
|
||||
override;
|
||||
|
||||
Return<bool> requiresSecureDecoderDefault(const hidl_string& mime) override;
|
||||
|
||||
@@ -221,22 +243,29 @@ struct WVDrmPlugin : public ::drm::V1_4::IDrmPlugin,
|
||||
|
||||
virtual void OnSessionRenewalNeeded(const CdmSessionId& cdmSessionId);
|
||||
|
||||
template <typename KS>
|
||||
void _sendKeysChange(const hidl_vec<uint8_t>& sessionId,
|
||||
const hidl_vec<KS>& keyStatusList, bool hasNewUsableKey);
|
||||
template<typename KS>
|
||||
void _sendKeysChange(
|
||||
const hidl_vec<uint8_t>& sessionId,
|
||||
const hidl_vec<KS>& keyStatusList,
|
||||
bool hasNewUsableKey);
|
||||
|
||||
template <typename KS>
|
||||
void _OnSessionKeysChange(const CdmSessionId&, const CdmKeyStatusMap&,
|
||||
bool hasNewUsableKey);
|
||||
template<typename KS>
|
||||
void _OnSessionKeysChange(
|
||||
const CdmSessionId&,
|
||||
const CdmKeyStatusMap&,
|
||||
bool hasNewUsableKey);
|
||||
|
||||
virtual void OnSessionKeysChange(const CdmSessionId& cdmSessionId,
|
||||
const CdmKeyStatusMap& cdmKeysStatus,
|
||||
bool hasNewUsableKey);
|
||||
virtual void OnSessionKeysChange(
|
||||
const CdmSessionId& cdmSessionId,
|
||||
const CdmKeyStatusMap& cdmKeysStatus,
|
||||
bool hasNewUsableKey);
|
||||
|
||||
virtual void OnExpirationUpdate(const CdmSessionId& cdmSessionId,
|
||||
int64_t newExpiryTimeSeconds);
|
||||
virtual void OnExpirationUpdate(
|
||||
const CdmSessionId& cdmSessionId,
|
||||
int64_t newExpiryTimeSeconds);
|
||||
|
||||
virtual void OnSessionLostState(const CdmSessionId& cdmSessionId);
|
||||
virtual void OnSessionLostState(
|
||||
const CdmSessionId& cdmSessionId);
|
||||
|
||||
private:
|
||||
WVDRM_DISALLOW_COPY_AND_ASSIGN_AND_NEW(WVDrmPlugin);
|
||||
@@ -248,14 +277,14 @@ struct WVDrmPlugin : public ::drm::V1_4::IDrmPlugin,
|
||||
struct CryptoSession {
|
||||
public:
|
||||
CryptoSession()
|
||||
: mOecSessionId(-1),
|
||||
mCipherAlgorithm(kInvalidCryptoAlgorithm),
|
||||
mMacAlgorithm(kInvalidCryptoAlgorithm) {}
|
||||
: mOecSessionId(-1),
|
||||
mCipherAlgorithm(kInvalidCryptoAlgorithm),
|
||||
mMacAlgorithm(kInvalidCryptoAlgorithm) {}
|
||||
|
||||
CryptoSession(OEMCrypto_SESSION sessionId)
|
||||
: mOecSessionId(sessionId),
|
||||
mCipherAlgorithm(kInvalidCryptoAlgorithm),
|
||||
mMacAlgorithm(kInvalidCryptoAlgorithm) {}
|
||||
: mOecSessionId(sessionId),
|
||||
mCipherAlgorithm(kInvalidCryptoAlgorithm),
|
||||
mMacAlgorithm(kInvalidCryptoAlgorithm) {}
|
||||
|
||||
OEMCrypto_SESSION oecSessionId() const { return mOecSessionId; }
|
||||
|
||||
@@ -280,20 +309,22 @@ struct WVDrmPlugin : public ::drm::V1_4::IDrmPlugin,
|
||||
class WVClientPropertySet : public wvcdm::CdmClientPropertySet {
|
||||
public:
|
||||
WVClientPropertySet()
|
||||
: mUsePrivacyMode(false),
|
||||
mShareKeys(false),
|
||||
mSessionSharingId(0),
|
||||
mUseAtscMode(false) {}
|
||||
: mUsePrivacyMode(false), mShareKeys(false), mSessionSharingId(0),
|
||||
mUseAtscMode(false) {}
|
||||
|
||||
virtual ~WVClientPropertySet() {}
|
||||
|
||||
virtual const std::string& security_level() const { return mSecurityLevel; }
|
||||
virtual const std::string& security_level() const {
|
||||
return mSecurityLevel;
|
||||
}
|
||||
|
||||
void set_security_level(const std::string& securityLevel) {
|
||||
mSecurityLevel = securityLevel;
|
||||
}
|
||||
|
||||
virtual bool use_privacy_mode() const { return mUsePrivacyMode; }
|
||||
virtual bool use_privacy_mode() const {
|
||||
return mUsePrivacyMode;
|
||||
}
|
||||
|
||||
void set_use_privacy_mode(bool usePrivacyMode) {
|
||||
mUsePrivacyMode = usePrivacyMode;
|
||||
@@ -314,28 +345,42 @@ struct WVDrmPlugin : public ::drm::V1_4::IDrmPlugin,
|
||||
}
|
||||
|
||||
virtual void set_device_provisioning_service_certificate(
|
||||
const std::string&) {
|
||||
const std::string& ) {
|
||||
// Ignore. Android does not support service certificates for provisioning
|
||||
// TODO(b/69562876): Android SHOULD support service cert for provisioning
|
||||
}
|
||||
|
||||
virtual bool is_session_sharing_enabled() const { return mShareKeys; }
|
||||
virtual bool is_session_sharing_enabled() const {
|
||||
return mShareKeys;
|
||||
}
|
||||
|
||||
void set_is_session_sharing_enabled(bool shareKeys) {
|
||||
mShareKeys = shareKeys;
|
||||
}
|
||||
|
||||
virtual uint32_t session_sharing_id() const { return mSessionSharingId; }
|
||||
virtual uint32_t session_sharing_id() const {
|
||||
return mSessionSharingId;
|
||||
}
|
||||
|
||||
virtual void set_session_sharing_id(uint32_t id) { mSessionSharingId = id; }
|
||||
virtual void set_session_sharing_id(uint32_t id) {
|
||||
mSessionSharingId = id;
|
||||
}
|
||||
|
||||
virtual const std::string& app_id() const { return mAppId; }
|
||||
virtual const std::string& app_id() const {
|
||||
return mAppId;
|
||||
}
|
||||
|
||||
void set_app_id(const std::string& appId) { mAppId = appId; }
|
||||
void set_app_id(const std::string& appId) {
|
||||
mAppId = appId;
|
||||
}
|
||||
|
||||
virtual bool use_atsc_mode() const { return mUseAtscMode; }
|
||||
virtual bool use_atsc_mode() const {
|
||||
return mUseAtscMode;
|
||||
}
|
||||
|
||||
void set_use_atsc_mode(bool useAtscMode) { mUseAtscMode = useAtscMode; }
|
||||
void set_use_atsc_mode(bool useAtscMode) {
|
||||
mUseAtscMode = useAtscMode;
|
||||
}
|
||||
|
||||
private:
|
||||
DISALLOW_EVIL_CONSTRUCTORS(WVClientPropertySet);
|
||||
@@ -399,7 +444,7 @@ struct WVDrmPlugin : public ::drm::V1_4::IDrmPlugin,
|
||||
// outside this class should use getDeviceUniqueId() to get the
|
||||
// application-safe device-unique ID.
|
||||
Status getOemcryptoDeviceId(std::string* id);
|
||||
Status getOemcryptoDeviceId(wvcdm::RequestedSecurityLevel securityLevel,
|
||||
Status getOemcryptoDeviceId(wvcdm::SecurityLevel securityLevel,
|
||||
std::string* id);
|
||||
|
||||
// The unique identifier is meant to ensure that two clients with the
|
||||
@@ -420,7 +465,9 @@ struct WVDrmPlugin : public ::drm::V1_4::IDrmPlugin,
|
||||
private:
|
||||
WVDRM_DISALLOW_COPY_AND_ASSIGN(Terminator);
|
||||
|
||||
Terminator() { signal(SIGTERM, Terminate); }
|
||||
Terminator() {
|
||||
signal(SIGTERM, Terminate);
|
||||
}
|
||||
|
||||
static Terminator& instance() {
|
||||
static Terminator instance;
|
||||
@@ -463,36 +510,37 @@ struct WVDrmPlugin : public ::drm::V1_4::IDrmPlugin,
|
||||
std::string mAppPackageName;
|
||||
|
||||
Status queryProperty(const std::string& property,
|
||||
std::string& stringValue) const;
|
||||
std::string& stringValue) const;
|
||||
|
||||
Status queryProperty(wvcdm::RequestedSecurityLevel securityLevel,
|
||||
const std::string& property,
|
||||
std::string& stringValue) const;
|
||||
Status queryProperty(wvcdm::SecurityLevel securityLevel,
|
||||
const std::string& property,
|
||||
std::string& stringValue) const;
|
||||
|
||||
Status queryProperty(const std::string& property,
|
||||
std::vector<uint8_t>& vector_value) const;
|
||||
std::vector<uint8_t>& vector_value) const;
|
||||
|
||||
bool isProvisioned(wvcdm::CdmSecurityLevel securityLevel,
|
||||
const std::string& origin, const std::string& spoid,
|
||||
const std::string& origin,
|
||||
const std::string& spoid,
|
||||
bool atsc_mode_enabled) const;
|
||||
|
||||
Status mapAndNotifyOfCdmResponseType(const std::vector<uint8_t>& sessionId,
|
||||
CdmResponseType res);
|
||||
CdmResponseType res);
|
||||
|
||||
Status_V1_2 mapAndNotifyOfCdmResponseType_1_2(
|
||||
const std::vector<uint8_t>& sessionId, CdmResponseType res);
|
||||
Status_V1_2 mapAndNotifyOfCdmResponseType_1_2(const std::vector<uint8_t>& sessionId,
|
||||
CdmResponseType res);
|
||||
|
||||
void notifyOfCdmResponseType(const std::vector<uint8_t>& sessionId,
|
||||
CdmResponseType res);
|
||||
CdmResponseType res);
|
||||
|
||||
Status mapAndNotifyOfOEMCryptoResult(const std::vector<uint8_t>& sessionId,
|
||||
OEMCryptoResult res);
|
||||
OEMCryptoResult res);
|
||||
|
||||
Status mapOEMCryptoResult(OEMCryptoResult res);
|
||||
|
||||
SecurityLevel mapSecurityLevel(const std::string& level);
|
||||
|
||||
wvcdm::RequestedSecurityLevel getRequestedSecurityLevel() const;
|
||||
wvcdm::SecurityLevel getRequestedSecurityLevel() const;
|
||||
|
||||
Status openSessionCommon(std::vector<uint8_t>& sessionId);
|
||||
|
||||
@@ -507,4 +555,4 @@ struct WVDrmPlugin : public ::drm::V1_4::IDrmPlugin,
|
||||
} // namespace hardware
|
||||
} // namespace wvdrm
|
||||
|
||||
#endif // WV_DRM_PLUGIN_H_
|
||||
#endif // WV_DRM_PLUGIN_H_
|
||||
|
||||
Reference in New Issue
Block a user