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

Skip to content
Commit cc32d2d2 authored by William Escande's avatar William Escande
Browse files

LeAudio: Do not use framework to start/stop scan

When a 3p app is calling Bluetooth framework to register a scanner,
there is an IPC call being made to the Bluetooth process, that will
register it and then perform a callback (another IPC) to the 3p app.

Binder has an optimization in which, if both side of the binder are in
the same process, there is no IPC being done and this is a direct call.

Here, LeAudioService is inside the Bluetooth app, and it is calling the
Bluetooth framework.

The issue is that the scanner is registered synchronously, the callback
is called synchronously and the notifyAll is perform before the code
start to wait. So it notify nobodies.

Theoretically, the wait can also be 2 seconds long for 3p app, if the
thread is very unlucky. And this design should be address entirely.

Bug: 348562830
Bug: 340740517
Bug: 347880944
Test: None
Flag: com.android.bluetooth.flags.leaudio_call_start_scan_directly
Change-Id: I89e409521dbca54a1c6fb7b1a968c95d247d8e8f
parent bfcf8aab
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