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

Commit bed6e09d authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by Gerrit Code Review
Browse files

Merge "BluetoothAdapterService: Add support for LeAudio getActiveDevice"

parents 4e208206 1c021307
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");
        }