Loading drm/1.0/default/CryptoPlugin.h +1 −1 Original line number Diff line number Diff line Loading @@ -44,7 +44,7 @@ using ::android::sp; struct CryptoPlugin : public ICryptoPlugin { CryptoPlugin(android::CryptoPlugin *plugin) : mLegacyPlugin(plugin) {} virtual ~CryptoPlugin() {delete mLegacyPlugin;} ~CryptoPlugin() {delete mLegacyPlugin;} // Methods from ::android::hardware::drm::V1_0::ICryptoPlugin // follow. Loading drm/1.0/default/DrmFactory.cpp +1 −1 Original line number Diff line number Diff line /* * Copyright (C) 2016 The Android Open Source Project * ` * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at Loading drm/1.0/default/DrmPlugin.cpp +12 −24 Original line number Diff line number Diff line Loading @@ -327,27 +327,24 @@ namespace implementation { Return<void> DrmPlugin::sendEvent(EventType eventType, const hidl_vec<uint8_t>& sessionId, const hidl_vec<uint8_t>& data) { auto listener = mListener.promote(); if (listener != nullptr) { listener->sendEvent(eventType, sessionId, data); if (mListener != nullptr) { mListener->sendEvent(eventType, sessionId, data); } return Void(); } Return<void> DrmPlugin::sendExpirationUpdate( const hidl_vec<uint8_t>& sessionId, int64_t expiryTimeInMS) { auto listener = mListener.promote(); if (listener != nullptr) { listener->sendExpirationUpdate(sessionId, expiryTimeInMS); if (mListener != nullptr) { mListener->sendExpirationUpdate(sessionId, expiryTimeInMS); } return Void(); } Return<void> DrmPlugin::sendKeysChange(const hidl_vec<uint8_t>& sessionId, const hidl_vec<KeyStatus>& keyStatusList, bool hasNewUsableKey) { auto listener = mListener.promote(); if (listener != nullptr) { listener->sendKeysChange(sessionId, keyStatusList, hasNewUsableKey); if (mListener != nullptr) { mListener->sendKeysChange(sessionId, keyStatusList, hasNewUsableKey); } return Void(); } Loading Loading @@ -383,21 +380,15 @@ namespace implementation { } if (sendEvent) { Vector<uint8_t> emptyVector; auto listener = mListener.promote(); if (listener != nullptr) { listener->sendEvent(eventType, mListener->sendEvent(eventType, toHidlVec(sessionId == NULL ? emptyVector: *sessionId), toHidlVec(data == NULL ? emptyVector: *data)); } } } void DrmPlugin::sendExpirationUpdate(Vector<uint8_t> const *sessionId, int64_t expiryTimeInMS) { auto listener = mListener.promote(); if (listener != nullptr) { listener->sendExpirationUpdate(toHidlVec(*sessionId), expiryTimeInMS); } mListener->sendExpirationUpdate(toHidlVec(*sessionId), expiryTimeInMS); } void DrmPlugin::sendKeysChange(Vector<uint8_t> const *sessionId, Loading Loading @@ -433,12 +424,9 @@ namespace implementation { keyStatus.keyId = toHidlVec(legacyKeyStatus.mKeyId); keyStatusVec.push_back(keyStatus); } auto listener = mListener.promote(); if (listener != nullptr) { listener->sendKeysChange(toHidlVec(*sessionId), mListener->sendKeysChange(toHidlVec(*sessionId), toHidlVec(keyStatusVec), hasNewUsableKey); } } } // namespace implementation } // namespace V1_0 Loading drm/1.0/default/DrmPlugin.h +2 −2 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ using ::android::sp; struct DrmPlugin : public IDrmPlugin, android::DrmPluginListener { DrmPlugin(android::DrmPlugin *plugin) : mLegacyPlugin(plugin) {} virtual ~DrmPlugin() {delete mLegacyPlugin;} ~DrmPlugin() {delete mLegacyPlugin;} // Methods from ::android::hardware::drm::V1_0::IDrmPlugin follow. Loading Loading @@ -153,7 +153,7 @@ struct DrmPlugin : public IDrmPlugin, android::DrmPluginListener { private: android::DrmPlugin *mLegacyPlugin; wp<IDrmPluginListener> mListener; sp<IDrmPluginListener> mListener; DrmPlugin() = delete; DrmPlugin(const DrmPlugin &) = delete; Loading Loading
drm/1.0/default/CryptoPlugin.h +1 −1 Original line number Diff line number Diff line Loading @@ -44,7 +44,7 @@ using ::android::sp; struct CryptoPlugin : public ICryptoPlugin { CryptoPlugin(android::CryptoPlugin *plugin) : mLegacyPlugin(plugin) {} virtual ~CryptoPlugin() {delete mLegacyPlugin;} ~CryptoPlugin() {delete mLegacyPlugin;} // Methods from ::android::hardware::drm::V1_0::ICryptoPlugin // follow. Loading
drm/1.0/default/DrmFactory.cpp +1 −1 Original line number Diff line number Diff line /* * Copyright (C) 2016 The Android Open Source Project * ` * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at Loading
drm/1.0/default/DrmPlugin.cpp +12 −24 Original line number Diff line number Diff line Loading @@ -327,27 +327,24 @@ namespace implementation { Return<void> DrmPlugin::sendEvent(EventType eventType, const hidl_vec<uint8_t>& sessionId, const hidl_vec<uint8_t>& data) { auto listener = mListener.promote(); if (listener != nullptr) { listener->sendEvent(eventType, sessionId, data); if (mListener != nullptr) { mListener->sendEvent(eventType, sessionId, data); } return Void(); } Return<void> DrmPlugin::sendExpirationUpdate( const hidl_vec<uint8_t>& sessionId, int64_t expiryTimeInMS) { auto listener = mListener.promote(); if (listener != nullptr) { listener->sendExpirationUpdate(sessionId, expiryTimeInMS); if (mListener != nullptr) { mListener->sendExpirationUpdate(sessionId, expiryTimeInMS); } return Void(); } Return<void> DrmPlugin::sendKeysChange(const hidl_vec<uint8_t>& sessionId, const hidl_vec<KeyStatus>& keyStatusList, bool hasNewUsableKey) { auto listener = mListener.promote(); if (listener != nullptr) { listener->sendKeysChange(sessionId, keyStatusList, hasNewUsableKey); if (mListener != nullptr) { mListener->sendKeysChange(sessionId, keyStatusList, hasNewUsableKey); } return Void(); } Loading Loading @@ -383,21 +380,15 @@ namespace implementation { } if (sendEvent) { Vector<uint8_t> emptyVector; auto listener = mListener.promote(); if (listener != nullptr) { listener->sendEvent(eventType, mListener->sendEvent(eventType, toHidlVec(sessionId == NULL ? emptyVector: *sessionId), toHidlVec(data == NULL ? emptyVector: *data)); } } } void DrmPlugin::sendExpirationUpdate(Vector<uint8_t> const *sessionId, int64_t expiryTimeInMS) { auto listener = mListener.promote(); if (listener != nullptr) { listener->sendExpirationUpdate(toHidlVec(*sessionId), expiryTimeInMS); } mListener->sendExpirationUpdate(toHidlVec(*sessionId), expiryTimeInMS); } void DrmPlugin::sendKeysChange(Vector<uint8_t> const *sessionId, Loading Loading @@ -433,12 +424,9 @@ namespace implementation { keyStatus.keyId = toHidlVec(legacyKeyStatus.mKeyId); keyStatusVec.push_back(keyStatus); } auto listener = mListener.promote(); if (listener != nullptr) { listener->sendKeysChange(toHidlVec(*sessionId), mListener->sendKeysChange(toHidlVec(*sessionId), toHidlVec(keyStatusVec), hasNewUsableKey); } } } // namespace implementation } // namespace V1_0 Loading
drm/1.0/default/DrmPlugin.h +2 −2 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ using ::android::sp; struct DrmPlugin : public IDrmPlugin, android::DrmPluginListener { DrmPlugin(android::DrmPlugin *plugin) : mLegacyPlugin(plugin) {} virtual ~DrmPlugin() {delete mLegacyPlugin;} ~DrmPlugin() {delete mLegacyPlugin;} // Methods from ::android::hardware::drm::V1_0::IDrmPlugin follow. Loading Loading @@ -153,7 +153,7 @@ struct DrmPlugin : public IDrmPlugin, android::DrmPluginListener { private: android::DrmPlugin *mLegacyPlugin; wp<IDrmPluginListener> mListener; sp<IDrmPluginListener> mListener; DrmPlugin() = delete; DrmPlugin(const DrmPlugin &) = delete; Loading