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

Commit 0ee93c9f authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by Automerger Merge Worker
Browse files

Merge "BluetoothAdapterService: Add support for LeAudio getActiveDevice" am: bed6e09d

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/1900472

Change-Id: I7e7d9f5229bf89a75f4e98bb6585b028b1223dd9
parents b60dcf9b bed6e09d
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -2951,6 +2951,7 @@ public class AdapterService extends Service {
     *                {@link BluetoothProfile#HEADSET},
     *                {@link BluetoothProfile#A2DP},
     *                {@link BluetoothProfile#HEARING_AID}
     *                {@link BluetoothProfile#LE_AUDIO}
     * @return A list of active bluetooth devices
     */
    @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED)
@@ -2983,6 +2984,15 @@ public class AdapterService extends Service {
                            + activeDevices.get(0) + "] - Right[" + activeDevices.get(1) + "]");
                }
                break;
            case BluetoothProfile.LE_AUDIO:
                if (mLeAudioService == null) {
                Log.e(TAG, "getActiveDevices: LeAudioService is null");
                } else {
                    activeDevices = mLeAudioService.getActiveDevices();
                    Log.i(TAG, "getActiveDevices: LeAudio devices: Out["
                            + activeDevices.get(0) + "] - In[" + activeDevices.get(1) + "]");
                }
                break;
            default:
                Log.e(TAG, "getActiveDevices: profile value is not valid");
        }
+1 −1
Original line number Diff line number Diff line
@@ -760,7 +760,7 @@ public class LeAudioService extends ProfileService {
     *
     * @return the list of active devices.
     */
    List<BluetoothDevice> getActiveDevices() {
    public List<BluetoothDevice> getActiveDevices() {
        if (DBG) {
            Log.d(TAG, "getActiveDevices");
        }