Merge "Revert "Fix widevine drm hal resource leaks"" into oc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
45c98e47f2
@@ -38,7 +38,6 @@ using ::android::hardware::hidl_string;
|
||||
using ::android::hardware::hidl_vec;
|
||||
using ::android::hardware::Return;
|
||||
using ::android::sp;
|
||||
using ::android::wp;
|
||||
|
||||
using android::status_t;
|
||||
using std::map;
|
||||
@@ -351,7 +350,7 @@ struct WVDrmPlugin : public IDrmPlugin, IDrmPluginListener,
|
||||
sp<wvcdm::WvContentDecryptionModule> const mCDM;
|
||||
WVGenericCryptoInterface* mCrypto;
|
||||
map<CdmSessionId, CryptoSession> mCryptoSessions;
|
||||
wp<IDrmPluginListener> mListener;
|
||||
sp<IDrmPluginListener> mListener;
|
||||
|
||||
status_t queryProperty(const std::string& property,
|
||||
std::string& stringValue) const;
|
||||
|
||||
@@ -1122,9 +1122,8 @@ Return<void> WVDrmPlugin::setListener(const sp<IDrmPluginListener>& listener) {
|
||||
Return<void> WVDrmPlugin::sendEvent(
|
||||
EventType eventType,
|
||||
const hidl_vec<uint8_t>& sessionId, const hidl_vec<uint8_t>& data) {
|
||||
auto listener = mListener.promote();
|
||||
if (listener != NULL) {
|
||||
listener->sendEvent(eventType, sessionId, data);
|
||||
if (mListener != NULL) {
|
||||
mListener->sendEvent(eventType, sessionId, data);
|
||||
} else {
|
||||
ALOGE("Null event listener, event not sent");
|
||||
}
|
||||
@@ -1134,9 +1133,8 @@ Return<void> WVDrmPlugin::sendEvent(
|
||||
Return<void> WVDrmPlugin::sendExpirationUpdate(
|
||||
const hidl_vec<uint8_t>& sessionId,
|
||||
int64_t expiryTimeInMS) {
|
||||
auto listener = mListener.promote();
|
||||
if (listener != NULL) {
|
||||
listener->sendExpirationUpdate(sessionId, expiryTimeInMS);
|
||||
if (mListener != NULL) {
|
||||
mListener->sendExpirationUpdate(sessionId, expiryTimeInMS);
|
||||
} else {
|
||||
ALOGE("Null event listener, event not sent");
|
||||
}
|
||||
@@ -1146,9 +1144,8 @@ Return<void> WVDrmPlugin::sendExpirationUpdate(
|
||||
Return<void> WVDrmPlugin::sendKeysChange(
|
||||
const hidl_vec<uint8_t>& sessionId,
|
||||
const hidl_vec<KeyStatus>& keyStatusList, bool hasNewUsableKey) {
|
||||
auto listener = mListener.promote();
|
||||
if (listener != NULL) {
|
||||
listener->sendKeysChange(sessionId, keyStatusList, hasNewUsableKey);
|
||||
if (mListener != NULL) {
|
||||
mListener->sendKeysChange(sessionId, keyStatusList, hasNewUsableKey);
|
||||
} else {
|
||||
ALOGE("Null event listener, event not sent");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user