Skip to content

Commit

Permalink
sfos: bluez5: Don't react too much on oFono states.
Browse files Browse the repository at this point in the history
No need to act too much on oFono state changes, as
if the daemon disappears it's either going to appear
again shortly, or we are rebooting, or something similar.

Signed-off-by: Juho Hämäläinen <juho.hamalainen@jolla.com>
  • Loading branch information
jusa committed Feb 24, 2021
1 parent cd310b4 commit 0afa9f8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/modules/bluetooth/bluez5-util.c
Expand Up @@ -1038,6 +1038,11 @@ void pa_bluetooth_discovery_set_ofono_running(pa_bluetooth_discovery *y, bool is
if (y->headset_backend != HEADSET_BACKEND_AUTO)
return;

/* With droid backend we always assume ofono should be running, and if ofono
* disappears it (should) appear soon again anyway. */
if (pa_bluetooth_droid_backend(y))
return;

/* If ofono starts running, all devices that might be connected to the HS role
* need to be disconnected, so that the devices can be handled by ofono */
if (is_running) {
Expand Down

0 comments on commit 0afa9f8

Please sign in to comment.