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

Commit 9ad3c686 authored by Alice Kuo's avatar Alice Kuo
Browse files

Broadcast ACTION_LE_AUDIO_CONNECTION_STATE_CHANGED for LE audio

Bug: 279524528
Test: Manual
Change-Id: I017f6e9c6f1163e487835a1b1122d8577788f443
parent 5a1a64d7
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ import android.bluetooth.BluetoothHeadsetClient;
import android.bluetooth.BluetoothHearingAid;
import android.bluetooth.BluetoothHidDevice;
import android.bluetooth.BluetoothHidHost;
import android.bluetooth.BluetoothLeAudio;
import android.bluetooth.BluetoothMap;
import android.bluetooth.BluetoothMapClient;
import android.bluetooth.BluetoothPan;
@@ -194,6 +195,9 @@ class AdapterProperties {
                case BluetoothPbap.ACTION_CONNECTION_STATE_CHANGED:
                    sendConnectionStateChange(BluetoothProfile.PBAP, intent);
                    break;
                case BluetoothLeAudio.ACTION_LE_AUDIO_CONNECTION_STATE_CHANGED:
                    sendConnectionStateChange(BluetoothProfile.LE_AUDIO, intent);
                    break;
                default:
                    Log.w(TAG, "Received unknown intent " + intent);
                    break;
@@ -250,6 +254,7 @@ class AdapterProperties {
        filter.addAction(BluetoothMapClient.ACTION_CONNECTION_STATE_CHANGED);
        filter.addAction(BluetoothSap.ACTION_CONNECTION_STATE_CHANGED);
        filter.addAction(BluetoothPbapClient.ACTION_CONNECTION_STATE_CHANGED);
        filter.addAction(BluetoothLeAudio.ACTION_LE_AUDIO_CONNECTION_STATE_CHANGED);
        mService.registerReceiver(mReceiver, filter);
        mReceiverRegistered = true;
        invalidateBluetoothCaches();