From: Bruna Moreira <bruna.moreira@xxxxxxxxxxxxx> Incoming and answered calls are monitored to update Ringer State field. The bit field is set to 1 when on a incoming call and it is set to 0 when the call is answered. --- test/phone-agent.py | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/test/phone-agent.py b/test/phone-agent.py index 927fdb1..b3b19a8 100755 --- a/test/phone-agent.py +++ b/test/phone-agent.py @@ -6,6 +6,7 @@ import dbus.mainloop.glib import gobject StateIncoming = 0 +StateActive = 3 StateEnded = 6 ALERT_RINGER_STATE = 1 << 0 @@ -55,8 +56,10 @@ def call_state_changed(*args, **kwargs): continue if item["state"] == StateIncoming: on_call = True - elif item["state"] == StateEnded: + set_alert_status() + elif item["state"] in [StateActive, StateEnded]: on_call = False + set_alert_status() if not silent_mode: restore_ringer() -- 1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html