Revert "Fix widevine drm hal resource leaks"

This reverts commit 006506278a.

It needs to be reverted to fix b/38343960 on marlin.

This change is not needed since the root cause of the
resource leak was addressed in ag/2226738. 

Change-Id: I93b64d39103d574b7dcde6b1477839a50b64aefd
This commit is contained in:
Jeff Tinker
2017-05-16 21:53:39 +00:00
parent 006506278a
commit d2080a8b9f
2 changed files with 7 additions and 11 deletions

View File

@@ -38,7 +38,6 @@ using ::android::hardware::hidl_string;
using ::android::hardware::hidl_vec; using ::android::hardware::hidl_vec;
using ::android::hardware::Return; using ::android::hardware::Return;
using ::android::sp; using ::android::sp;
using ::android::wp;
using android::status_t; using android::status_t;
using std::map; using std::map;
@@ -351,7 +350,7 @@ struct WVDrmPlugin : public IDrmPlugin, IDrmPluginListener,
sp<wvcdm::WvContentDecryptionModule> const mCDM; sp<wvcdm::WvContentDecryptionModule> const mCDM;
WVGenericCryptoInterface* mCrypto; WVGenericCryptoInterface* mCrypto;
map<CdmSessionId, CryptoSession> mCryptoSessions; map<CdmSessionId, CryptoSession> mCryptoSessions;
wp<IDrmPluginListener> mListener; sp<IDrmPluginListener> mListener;
status_t queryProperty(const std::string& property, status_t queryProperty(const std::string& property,
std::string& stringValue) const; std::string& stringValue) const;

View File

@@ -1122,9 +1122,8 @@ Return<void> WVDrmPlugin::setListener(const sp<IDrmPluginListener>& listener) {
Return<void> WVDrmPlugin::sendEvent( Return<void> WVDrmPlugin::sendEvent(
EventType eventType, EventType eventType,
const hidl_vec<uint8_t>& sessionId, const hidl_vec<uint8_t>& data) { const hidl_vec<uint8_t>& sessionId, const hidl_vec<uint8_t>& data) {
auto listener = mListener.promote(); if (mListener != NULL) {
if (listener != NULL) { mListener->sendEvent(eventType, sessionId, data);
listener->sendEvent(eventType, sessionId, data);
} else { } else {
ALOGE("Null event listener, event not sent"); ALOGE("Null event listener, event not sent");
} }
@@ -1134,9 +1133,8 @@ Return<void> WVDrmPlugin::sendEvent(
Return<void> WVDrmPlugin::sendExpirationUpdate( Return<void> WVDrmPlugin::sendExpirationUpdate(
const hidl_vec<uint8_t>& sessionId, const hidl_vec<uint8_t>& sessionId,
int64_t expiryTimeInMS) { int64_t expiryTimeInMS) {
auto listener = mListener.promote(); if (mListener != NULL) {
if (listener != NULL) { mListener->sendExpirationUpdate(sessionId, expiryTimeInMS);
listener->sendExpirationUpdate(sessionId, expiryTimeInMS);
} else { } else {
ALOGE("Null event listener, event not sent"); ALOGE("Null event listener, event not sent");
} }
@@ -1146,9 +1144,8 @@ Return<void> WVDrmPlugin::sendExpirationUpdate(
Return<void> WVDrmPlugin::sendKeysChange( Return<void> WVDrmPlugin::sendKeysChange(
const hidl_vec<uint8_t>& sessionId, const hidl_vec<uint8_t>& sessionId,
const hidl_vec<KeyStatus>& keyStatusList, bool hasNewUsableKey) { const hidl_vec<KeyStatus>& keyStatusList, bool hasNewUsableKey) {
auto listener = mListener.promote(); if (mListener != NULL) {
if (listener != NULL) { mListener->sendKeysChange(sessionId, keyStatusList, hasNewUsableKey);
listener->sendKeysChange(sessionId, keyStatusList, hasNewUsableKey);
} else { } else {
ALOGE("Null event listener, event not sent"); ALOGE("Null event listener, event not sent");
} }