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

Commit 3ea6ca86 authored by Grzegorz Kolodziejczyk's avatar Grzegorz Kolodziejczyk Committed by Automerger Merge Worker
Browse files

Merge changes Ied9a53f3,Iab45ce3d,If8e420bc into main am: 001612bb

parents 96754ba9 001612bb
Loading
Loading
Loading
Loading
+14 −5
Original line number Diff line number Diff line
@@ -1247,9 +1247,6 @@ public class BassClientService extends ProfileService {
            return;
        }

        /* Store metadata for sink device */
        mBroadcastMetadataMap.put(sink, sourceMetadata);

        byte[] code = sourceMetadata.getBroadcastCode();
        for (BluetoothDevice device : devices) {
            BassClientStateMachine stateMachine = getOrCreateStateMachine(device);
@@ -1291,6 +1288,10 @@ public class BassClientService extends ProfileService {
                        enqueueSourceGroupOp(
                                device, BassClientStateMachine.ADD_BCAST_SOURCE, sourceMetadata);
                    }

                    /* Store metadata for sink device */
                    mBroadcastMetadataMap.put(device, sourceMetadata);

                    Message message =
                            stateMachine.obtainMessage(BassClientStateMachine.SWITH_BCAST_SOURCE);
                    message.obj = sourceMetadata;
@@ -1320,6 +1321,9 @@ public class BassClientService extends ProfileService {
                }
            }

            /* Store metadata for sink device */
            mBroadcastMetadataMap.put(device, sourceMetadata);

            if (isGroupOp) {
                enqueueSourceGroupOp(device, BassClientStateMachine.ADD_BCAST_SOURCE,
                        sourceMetadata);
@@ -1598,17 +1602,22 @@ public class BassClientService extends ProfileService {
            mPausedBroadcastSinks.clear();
        }

        Map<BluetoothDevice, Integer> sourcesToRemove = new HashMap<>();

        for (BluetoothDevice device : getConnectedDevices()) {
            for (BluetoothLeBroadcastReceiveState receiveState : getAllSources(device)) {
                /* Check if local/last broadcast is the synced one */
                if (receiveState.getBroadcastId() != broadcastId) continue;

                removeSource(device, receiveState.getSourceId());

                if (store && !mPausedBroadcastSinks.contains(device)) {
                    mPausedBroadcastSinks.add(device);
                }

                sourcesToRemove.put(device, receiveState.getSourceId());
            }
        }
        for (Map.Entry<BluetoothDevice, Integer> entry : sourcesToRemove.entrySet()) {
            removeSource(entry.getKey(), entry.getValue());
        }
    }

+5 −0
Original line number Diff line number Diff line
@@ -293,6 +293,11 @@ class LeAudioClientImpl : public LeAudioClient {
      return;
    }

    /* Reconfiguration to non requiring source scenario */
    if (sink_monitor_mode_) {
      notifyAudioLocalSink(UnicastMonitorModeStatus::STREAMING_SUSPENDED);
    }

    /* For sonification events we don't really need to reconfigure to HQ
     * configuration, but if the previous configuration was for HQ Media,
     * we might want to go back to that scenario.