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

Commit 5b745e62 authored by Sonny Sasaka's avatar Sonny Sasaka
Browse files

Floss: Fix suspend callback path

Apparently `dbus-rs` doesn't support adding additional interface to an
existing object, so every callback has to have a different path.

Bug: 224606285
Tag: #floss
Test: Run `btclient` and do discovery

Change-Id: I3e25da4eb899e6c91c7d5528d72b495c13268a0b
parent 0759fc3d
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -319,6 +319,8 @@ async fn start_interactive_shell(
                    format!("/org/chromium/bluetooth/client/{}/bluetooth_callback", adapter);
                let conn_cb_objpath: String =
                    format!("/org/chromium/bluetooth/client/{}/bluetooth_conn_callback", adapter);
                let suspend_cb_objpath: String =
                    format!("/org/chromium/bluetooth/client/{}/suspend_callback", adapter);

                let dbus_connection = context.lock().unwrap().dbus_connection.clone();
                let dbus_crossroads = context.lock().unwrap().dbus_crossroads.clone();
@@ -348,7 +350,7 @@ async fn start_interactive_shell(
                // TODO(b/224606285): Implement suspend debug utils in btclient.
                context.lock().unwrap().suspend_dbus.as_mut().unwrap().register_callback(Box::new(
                    SuspendCallback::new(
                        cb_objpath,
                        suspend_cb_objpath,
                        dbus_connection.clone(),
                        dbus_crossroads.clone(),
                    ),