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

Commit af1b1a66 authored by Jeremy Wu's avatar Jeremy Wu Committed by Automerger Merge Worker
Browse files

Merge "Floss: add AvrcpController to connect/disconnect labels" am: 2bdd4ea4

parents f59bb552 2bdd4ea4
Loading
Loading
Loading
Loading
+15 −2
Original line number Diff line number Diff line
@@ -1714,7 +1714,10 @@ impl IBluetooth for Bluetooth {
                                }
                            }

                            Profile::A2dpSink | Profile::A2dpSource | Profile::Hfp => {
                            Profile::A2dpSink
                            | Profile::A2dpSource
                            | Profile::Hfp
                            | Profile::AvrcpController => {
                                let txl = self.tx.clone();
                                let address = device.address.clone();
                                topstack::get_runtime().spawn(async move {
@@ -1736,6 +1739,13 @@ impl IBluetooth for Bluetooth {
        // If SDP isn't completed yet, we wait for it to complete and retry the connection again.
        // Otherwise, this connection request is done, no retry is required.
        self.wait_to_connect = !has_enabled_uuids;
        if self.wait_to_connect {
            warn!(
                "[{}] SDP hasn't completed for device, wait to connect.",
                addr.unwrap().to_string()
            );
        }

        return true;
    }

@@ -1771,7 +1781,10 @@ impl IBluetooth for Bluetooth {
                                self.hh.as_ref().unwrap().disconnect(&mut addr.unwrap());
                            }

                            Profile::A2dpSink | Profile::A2dpSource | Profile::Hfp => {
                            Profile::A2dpSink
                            | Profile::A2dpSource
                            | Profile::Hfp
                            | Profile::AvrcpController => {
                                let txl = self.tx.clone();
                                let address = device.address.clone();
                                topstack::get_runtime().spawn(async move {