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

Skip to content
Commit 7eb3349c authored by Pavlin Radoslavov's avatar Pavlin Radoslavov
Browse files

Update the A2DP Codec Config API

Previously, the JNI upcall would contain only the current codec config.
In the new API, the upcall contains:
 1. The current codec config
 2. The list of codecs containing the local codecs capabilities
 3. The list of codecs containing the selectable codecs capabilities.
    This list is the intersection of the local codecs capabilities
    and the capabilities of the paired device.

Also, refactored the Java internals to accomodate the extra information:
 * Added new class BluetoothCodecStatus that contains the extra info:
   current codec config, local codecs capabilities and selectable
   codecs capabilities
 * Renamed method getCodecConfig() to getCodecStatus() and return the
   corresponding BluetoothCodecStatus object.
 * Updates to class BluetoothCodecConfig:
   new methods isValid(), getCodecName(), and updated toString()
   so it is more user friendly
 * Removed BluetoothCodecConfig.EXTRA_CODEC_CONFIG and
   EXTRA_PREVIOUS_CODEC_CONFIG.
   The former is superseded by BluetoothCodecStatus.EXTRA_CODEC_STATUS;
   the latter is not really used.

Test: A2DP streaming with headsets and switching the codecs
Change-Id: I18536cffc5c73abc31c3d6afa54f9d3c3b1d577e
parent d550d3bc
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