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

Skip to content
Commit 507768c2 authored by Pranav Madapurmath's avatar Pranav Madapurmath
Browse files

Resolve WhatsApp audio route switching

This CL addresses two issues with audio routing with self-managed
calling (namely, with WhatsApp).

The first issue is that when WhatsApp
requests a switch to BT (USER_SWITCH_BLUETOOTH), it never specifies a BT
address to connect to. This has always been the existing behavior and in
the legacy audio routing path, Telecom would arbitrarily connect to an
available BT device. This CL ensures that an available device is
connected to if there's no address specified in the client's request.

The second issue deals with when we receive a client request to switch
the baseline route. This occurs when the user is on speaker or on BT and
selects the button again via the UI (in which case, the baseline route
is requested to be routed into). For normal calls, this would usually
mean we route into earpiece and for video calls, we route into speaker.
This CL fixes a bug with how (USER)_SWITCH_BASLINE_ROUTE is handled to
ensure we take into account whether or not we should include BT in the
route selection or not and also ensures that we ignore selecting BT if
it's the preferred audio route and Telecom is requested to ignore it.

Bug: 339684821
Test: Manual with WhatsApp (video) calls.
Test: atest CallAudioRouteControllerTest
Change-Id: I83ae49a8d231e67a041c082388988f36241d56f0
parent 12419774
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment