mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 16:50:18 +00:00
Correct propagation of asynchonous events
The legacy plugin listener was not set when used in passthrough mode in Treble. This caused events (session renewal, key expired etc) not to be propagated to the app. b/35375500 Test: In progress Change-Id: I7d74b3320c82e22f67d3c804ee93f9b9791080b2
This commit is contained in:
@@ -321,6 +321,7 @@ namespace implementation {
|
||||
|
||||
Return<void> DrmPlugin::setListener(const sp<IDrmPluginListener>& listener) {
|
||||
mListener = listener;
|
||||
mLegacyPlugin->setListener(listener == NULL ? NULL : this);
|
||||
return Void();
|
||||
}
|
||||
|
||||
@@ -372,8 +373,10 @@ namespace implementation {
|
||||
break;
|
||||
}
|
||||
if (sendEvent) {
|
||||
mListener->sendEvent(eventType, toHidlVec(*sessionId),
|
||||
toHidlVec(*data));
|
||||
Vector<uint8_t> emptyVector;
|
||||
mListener->sendEvent(eventType,
|
||||
toHidlVec(sessionId == NULL ? emptyVector: *sessionId),
|
||||
toHidlVec(data == NULL ? emptyVector: *data));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user