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

Commit 02cc72c1 authored by Jake Hamby's avatar Jake Hamby Committed by Android (Google) Code Review
Browse files

Merge "Fix IllegalStateException when A2DP connects before boot completes."

parents dfba1773 24ca01d2
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -517,6 +517,7 @@ public class BluetoothA2dpService extends IBluetoothA2dp.Stub {
            intent.putExtra(BluetoothDevice.EXTRA_DEVICE, device);
            intent.putExtra(BluetoothProfile.EXTRA_PREVIOUS_STATE, prevState);
            intent.putExtra(BluetoothProfile.EXTRA_STATE, state);
            intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
            mContext.sendBroadcast(intent, BLUETOOTH_PERM);

            if (DBG) log("A2DP state : device: " + device + " State:" + prevState + "->" + state);
@@ -530,6 +531,7 @@ public class BluetoothA2dpService extends IBluetoothA2dp.Stub {
        intent.putExtra(BluetoothDevice.EXTRA_DEVICE, device);
        intent.putExtra(BluetoothProfile.EXTRA_PREVIOUS_STATE, prevState);
        intent.putExtra(BluetoothProfile.EXTRA_STATE, state);
        intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
        mContext.sendBroadcast(intent, BLUETOOTH_PERM);

        if (DBG) log("A2DP Playing state : device: " + device + " State:" + prevState + "->" + state);