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

Commit 68482548 authored by Sonny Sasaka's avatar Sonny Sasaka
Browse files

Pass command line args to btif initialize

Bug: 186492781
Tag: #floss
Test: manual - Build floss on Linux

Change-Id: I54770b172b9c97f37f9b6eae8c47d483774745b7
parent ba0ec1b0
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -36,7 +36,11 @@ fn main() -> Result<(), Box<dyn Error>> {
    let bluetooth = Arc::new(Mutex::new(Bluetooth::new(tx.clone(), intf.clone())));
    let bluetooth_gatt = Arc::new(Mutex::new(BluetoothGatt::new(intf.clone())));

    intf.lock().unwrap().initialize(get_bt_dispatcher(tx), vec![]);
    // Args don't include arg[0] which is the binary name
    let all_args = std::env::args().collect::<Vec<String>>();
    let args = all_args[1..].to_vec();
    intf.lock().unwrap().initialize(get_bt_dispatcher(tx), args);

    bluetooth.lock().unwrap().init_profiles();
    bluetooth.lock().unwrap().enable();