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

Commit ceb63ffd 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...

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

Change-Id: Ifabfff51c0317c9c9230be9911a6f08404c16c85
parents 1a78f68a baee2366
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -3102,11 +3102,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) {