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

Commit 4f7f4370 authored by Grzegorz Kołodziejczyk's avatar Grzegorz Kołodziejczyk Committed by Jakub Pawlowski
Browse files

Introduce LE Audio state machine and service test cases

Patch introduces test cases for LE Audio State Machine and service
boilerplate.

Bug: 150670922
Test: atest LeAudioServiceTest && atest LeAudioStateMachineTest
Sponsor: jpawlowski@
Change-Id: I7cf624d2f6428ab74591d6a2e26bfc700a1ff7e6
parent 83e18df2
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -344,6 +344,22 @@ public class LeAudioService extends ProfileService {
        }
    }

    /**
     * Get the list of devices that have state machines.
     *
     * @return the list of devices that have state machines
     */
    @VisibleForTesting
    List<BluetoothDevice> getDevices() {
        List<BluetoothDevice> devices = new ArrayList<>();
        synchronized (mStateMachines) {
            for (LeAudioStateMachine sm : mStateMachines.values()) {
                devices.add(sm.getDevice());
            }
            return devices;
        }
    }

    /**
     * Get the current connection state of the profile
     *