Fix unregistering listener issue
Unregistering listener on MDnsEventReporter would fail because
the bringing listener is a pointer which is not existed in the
set. So compare the binder which get from listener to find out
the real listener to be removed.
Refacotr the code to store the death recipient in the set
instead. Because we need to unlink the death recipient when
unregistering listener but we do not save the death recipient
before.
Bug: 234107254
Test: atest CtsNetTestCases
cd system/netd & atest
Change-Id: Ic3bd793ba1d297188700b18b39f380cb7cc43f41
(cherry picked from commit e5ead45a046a920466a807630ccbc382eedc9b28)
Merged-In: Ic3bd793ba1d297188700b18b39f380cb7cc43f41
3 files changed