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

Commit 616267bf authored by Łukasz Rymanowski's avatar Łukasz Rymanowski
Browse files

leaudio: Fix direction bits

Shall match kLeAudioDirectionSink and kLeAudioDirectionSource from
le_audio_types.h

Bug: 260540370
Tag: #feature
Test: atest BluetoothInstrumentationTests
Merged-In: Ie7c91814a3d14e735cd0c0ea94d0f864ae63fa11
Change-Id: Ie7c91814a3d14e735cd0c0ea94d0f864ae63fa11
(cherry picked from commit 5063b2f6)
parent b63a5308
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -100,14 +100,14 @@ public class LeAudioService extends ProfileService {
    private static final int AUDIO_DIRECTION_NONE = 0x00;

    /**
     * Indicates group audio support for input direction
     * Indicates group audio support for output direction
     */
    private static final int AUDIO_DIRECTION_INPUT_BIT = 0x01;
    private static final int AUDIO_DIRECTION_OUTPUT_BIT = 0x01;

    /**
     * Indicates group audio support for output direction
     * Indicates group audio support for input direction
     */
    private static final int AUDIO_DIRECTION_OUTPUT_BIT = 0x02;
    private static final int AUDIO_DIRECTION_INPUT_BIT = 0x02;

    private AdapterService mAdapterService;
    private DatabaseManager mDatabaseManager;
+8 −4
Original line number Diff line number Diff line
@@ -1045,7 +1045,8 @@ public class LeAudioServiceTest {
    @Test
    public void testGetActiveDevices() {
        int groupId = 1;
        int direction = 2;
        /* AUDIO_DIRECTION_OUTPUT_BIT = 0x01 */
        int direction = 1;
        int snkAudioLocation = 3;
        int srcAudioLocation = 4;
        int availableContexts = 5;
@@ -1295,7 +1296,8 @@ public class LeAudioServiceTest {
    @Test
    public void testLeadGroupDeviceDisconnects() {
        int groupId = 1;
        int direction = 2;
        /* AUDIO_DIRECTION_OUTPUT_BIT = 0x01 */
        int direction = 1;
        int snkAudioLocation = 3;
        int srcAudioLocation = 4;
        int availableContexts = 5;
@@ -1359,7 +1361,8 @@ public class LeAudioServiceTest {
    @Test
    public void testLeadGroupDeviceReconnects() {
        int groupId = 1;
        int direction = 2;
        /* AUDIO_DIRECTION_OUTPUT_BIT = 0x01 */
        int direction = 1;
        int snkAudioLocation = 3;
        int srcAudioLocation = 4;
        int availableContexts = 5;
@@ -1426,7 +1429,8 @@ public class LeAudioServiceTest {
    public void testVolumeCache() {
        int groupId = 1;
        int volume = 100;
        int direction = 2;
        /* AUDIO_DIRECTION_OUTPUT_BIT = 0x01 */
        int direction = 1;
        int availableContexts = 4;

        doReturn(true).when(mNativeInterface).connectLeAudio(any(BluetoothDevice.class));