AudioService: RecordActivityMonitor: fix unbounded list growth
This CL fixes the growing list of Dispatchers in RecordActivityMonitor by comparing dispatcher callback via asBinder() method of the interface. Bug: 242056995 Test: use the repro app from the bug Change-Id: I3a2674dd339b84ecff609eef042ca41484a43255
This commit is contained in:
@@ -337,7 +337,7 @@ public final class RecordingActivityMonitor implements AudioSystem.AudioRecordin
|
||||
boolean hasPublicClients = false;
|
||||
while (clientIterator.hasNext()) {
|
||||
RecMonitorClient rmc = clientIterator.next();
|
||||
if (rcdb.equals(rmc.mDispatcherCb)) {
|
||||
if (rcdb.asBinder().equals(rmc.mDispatcherCb.asBinder())) {
|
||||
rmc.release();
|
||||
clientIterator.remove();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user