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

Skip to content
Commit 72af8011 authored by Eric Laurent's avatar Eric Laurent
Browse files

audio policy: optimize preferred device selection

Several optimizations to avoid redundant track invalidation
when a preferred device is specified for an AudioTrack.
1) in AudioTrack: only invalidate the track if the preferred device
   differs from the actual device. If the track is not active,
   immediately restore it instead of waiting for next start.
2) in AudioPolicyManager: avoid invalidating the track in startSource() and
   stopSource() if another active client with the same preferred device
   exists.

Also fix a problem in getOutput() preventing MediaPlayer to open a sink
for call assistant use case.

Bug: 272560885
Test: atest RoutingTest
Change-Id: Ia3fb06eaf2e292d2795d588226c7672b7ab6722f
parent b6cf5390
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment