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

Commit 845d3abc authored by Yiyi Shen's avatar Yiyi Shen Committed by Android (Google) Code Review
Browse files

Merge "Add util method to check for active lea device." into main

parents 7846451e f63d7368
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -594,6 +594,16 @@ public class BluetoothUtils {
                || cachedDevice.isActiveDevice(BluetoothProfile.LE_AUDIO);
    }

    /**
     * Check if the Bluetooth device is an active LE Audio device
     *
     * @param cachedDevice the CachedBluetoothDevice
     * @return if the Bluetooth device is an active LE Audio device
     */
    public static boolean isActiveLeAudioDevice(CachedBluetoothDevice cachedDevice) {
        return cachedDevice.isActiveDevice(BluetoothProfile.LE_AUDIO);
    }

    private static boolean isDeviceConnected(CachedBluetoothDevice cachedDevice) {
        if (cachedDevice == null) {
            return false;