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

Commit baee2366 authored by Andy Hung's avatar Andy Hung Committed by android-build-merger
Browse files

Merge changes from topic "am-99626481-1222-4690-a6c3-4a3db61755f9" into oc-dev am: eedc6cb6

am: d9f8d918

Change-Id: I1d10926666edae08ee5376ffb08e6bd8362b540e
parents 597ba808 d9f8d918
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -2987,11 +2987,15 @@ sp<IEffect> AudioFlinger::createEffect(
            }
            // look for the thread where the specified audio session is present
            for (size_t i = 0; i < mPlaybackThreads.size(); i++) {
                if (mPlaybackThreads.valueAt(i)->hasAudioSession(sessionId) != 0) {
                uint32_t sessionType = mPlaybackThreads.valueAt(i)->hasAudioSession(sessionId);
                if (sessionType != 0) {
                    io = mPlaybackThreads.keyAt(i);
                    // thread with same effect session is preferable
                    if ((sessionType & ThreadBase::EFFECT_SESSION) != 0) {
                        break;
                    }
                }
            }
            if (io == AUDIO_IO_HANDLE_NONE) {
                for (size_t i = 0; i < mRecordThreads.size(); i++) {
                    if (mRecordThreads.valueAt(i)->hasAudioSession(sessionId) != 0) {