summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Melhuish <melhuishj@chromium.org>2022-03-03 21:40:30 +0000
committerJesse Melhuish <melhuishj@chromium.org>2022-03-04 19:32:28 +0000
commit22d825fc1a2b25cee35f838a493191f884af8ccc (patch)
treed365a276d5c1ba2ca6fa105bb4821ac5ba189209
parentb6e8f65a5d07e61a50eaea5f4d49f7cfa41001a0 (diff)
floss: Set connectable on startup to let devices reconnect.
When a device that disconnected from the remote side disconnects it can now reconnect without action from the host. Bug: 210486263 Tag: #floss Test: Verified that disconnected device reconnects automatically. Change-Id: I6d3940d0d556ae14da1b2433fc14466c6fc5e445
-rw-r--r--system/gd/rust/linux/stack/src/bluetooth.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/system/gd/rust/linux/stack/src/bluetooth.rs b/system/gd/rust/linux/stack/src/bluetooth.rs
index 1d221e84a2..49e9289e4d 100644
--- a/system/gd/rust/linux/stack/src/bluetooth.rs
+++ b/system/gd/rust/linux/stack/src/bluetooth.rs
@@ -498,6 +498,9 @@ impl BtifBluetoothCallbacks for Bluetooth {
// Also need to manually request some properties
self.intf.lock().unwrap().get_adapter_property(BtPropertyType::ClassOfDevice);
+
+ // Ensure device is connectable so that disconnected device can reconnect
+ self.set_connectable(true);
}
}