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

Skip to content
Commit db414b90 authored by Hsin-chen Chuang's avatar Hsin-chen Chuang
Browse files

floss: btclient: Allow -c command when adapter is disabled

Before we always wait until the callbacks are registered before running
-c command. However, some commands only work when the adapter is
disabled such as `adapter enable` and `floss enable`.

In this patch we simply don't wait for the callbacks registration if the
adapter is disabled.

This patch also make it gracefully print error messages for `adapter
discoverable/connectable/set-name` commands, rather than just panic.

Bug: 315262326
Tag: #floss
Test: mmm packages/modules/Bluetooth
Test: btclient -c 'adatper disable'
      btclient -c 'floss disable'
      btclient -c 'floss enable'
      btclient -c 'adapter connectable on'  # no panic
      btclient -c 'adatper enable'
Flag: EXEMPT, Floss-only changes
Change-Id: I6d239e61bf1983675709079e8e436d6bb55f4de8
parent 68247bbc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment