From c55bcd7aa9dd591e7169690297a3dda227a6fac5 Mon Sep 17 00:00:00 2001 From: Gustavo Sverzut Barbieri Date: Sat, 11 Aug 2012 18:52:35 -0300 Subject: [PATCH] usability: do not return to callscreen if the call was disconnected. if we receive a "calls changed" but the changed call was a disconnection, then we should just ignore it. --- dialer/callscreen.c | 3 ++- dialer/ofono.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/dialer/callscreen.c b/dialer/callscreen.c index 74279c0..7de95c8 100644 --- a/dialer/callscreen.c +++ b/dialer/callscreen.c @@ -246,7 +246,8 @@ static void _calls_update(Callscreen *ctx) if (!ctx->calls.held) ctx->calls.held = held; - gui_call_enter(); + if (ctx->calls.active) + gui_call_enter(); } static void _call_disconnected_done(Callscreen *ctx, diff --git a/dialer/ofono.c b/dialer/ofono.c index c0f00d6..be98379 100644 --- a/dialer/ofono.c +++ b/dialer/ofono.c @@ -552,6 +552,7 @@ static void _call_disconnect_reason(void *data, DBusMessage *msg) } DBG("path=%s", c->base.path); + c->state = OFONO_CALL_STATE_DISCONNECTED; dbus_error_init(&err); if (!dbus_message_get_args(msg, &err, DBUS_TYPE_STRING, &reason, -- 2.7.4