Fix SwAudioOutputCollection indexing in closeOutput()

Incorrect index handling during mix output closure results in a failed
restoration of policy mix routing to previously available outputs.

Audio routing failure after direct output usage leads to
mono/stereo audio tracks playback failures when switching
between direct and mixed audio paths.

Ensure correct indexing when restoring the policy mix output.

Flag: EXEMPT bugfix
Bug: 411169295
Test: m
(cherry picked from https://android-review.googlesource.com/q/commit:dc6fa03b4bbd5d69f62805ce62023d2974f14d49)
Change-Id: I9daa9942baebb9a5278671a2371b48afac1fe333
1 file changed