Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 81cbf389 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix invalidation of captors and injectors during DAP unregistration."

parents 9e9cef8d b05891dc
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -865,7 +865,7 @@ public class AudioPolicy {
                for (final WeakReference<AudioTrack> weakTrack : mInjectors) {
                    final AudioTrack track = weakTrack.get();
                    if (track == null) {
                        break;
                        continue;
                    }
                    try {
                        // TODO: add synchronous versions
@@ -876,12 +876,13 @@ public class AudioPolicy {
                        // released by the user of the AudioPolicy
                    }
                }
                mInjectors.clear();
            }
            if (mCaptors != null) {
                for (final WeakReference<AudioRecord> weakRecord : mCaptors) {
                    final AudioRecord record = weakRecord.get();
                    if (record == null) {
                        break;
                        continue;
                    }
                    try {
                        // TODO: if needed: implement an invalidate method
@@ -891,6 +892,7 @@ public class AudioPolicy {
                        // released by the user of the AudioPolicy
                    }
                }
                mCaptors.clear();
            }
        }
    }