Fix widevine drm hal resource leaks
A strong pointer cycle was preventing the drm plugin from being released. This change converts the listener to a weak pointer to break the cycle. bug:36408047 test: manual testing to verify leaks are fixed Change-Id: I2e2af392c2b263b7b0943d61dcaee5e94089ce27
This commit is contained in:
@@ -38,6 +38,7 @@ 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;
|
||||
@@ -350,7 +351,7 @@ struct WVDrmPlugin : public IDrmPlugin, IDrmPluginListener,
|
||||
sp<wvcdm::WvContentDecryptionModule> const mCDM;
|
||||
WVGenericCryptoInterface* mCrypto;
|
||||
map<CdmSessionId, CryptoSession> mCryptoSessions;
|
||||
sp<IDrmPluginListener> mListener;
|
||||
wp<IDrmPluginListener> mListener;
|
||||
|
||||
status_t queryProperty(const std::string& property,
|
||||
std::string& stringValue) const;
|
||||
|
||||
Reference in New Issue
Block a user