audiopolicy: Close the voip output before track is invalidated
With 3rd party voip application, compress voip usecase is
failed to be selected by policy when headset is inserted during
voip call.
Audio policy invalidates the track first and then closes the
direct output. Voip output count is not reset to 0 when new track
is created from restoreTrack. APM rejects voip usecae due to
this reason.
Close voip output before invalidating the track to avoid this
issue.
CRs-Fixed: 2251583
Change-Id: I9fac1974fae2565daee10fce44f4a14d6961421b
1 file changed