From 4d0317e9283a3f07dd9296f25a716e52ad3cfb86 Mon Sep 17 00:00:00 2001 From: Gustavo Sverzut Barbieri Date: Mon, 27 Aug 2012 14:54:19 -0300 Subject: [PATCH] callscreen: just allow SwapCalls if active or held. It was not breaking as ofono did the right thing, but let's not even try to do this (it could be done while dialing a second call). --- dialer/callscreen.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dialer/callscreen.c b/dialer/callscreen.c index 1a1c320..9bb4036 100644 --- a/dialer/callscreen.c +++ b/dialer/callscreen.c @@ -863,7 +863,13 @@ static void _on_clicked(void *data, Evas_Object *obj __UNUSED__, } else if (strcmp(emission, "merge") == 0) { ofono_multiparty_create(NULL, NULL); } else if (strcmp(emission, "swap") == 0) { - ofono_swap_calls(NULL, NULL); + if (ctx->calls.current) { + OFono_Call_State state; + state = ofono_call_state_get(ctx->calls.current); + if (state == OFONO_CALL_STATE_HELD || + state == OFONO_CALL_STATE_ACTIVE) + ofono_swap_calls(NULL, NULL); + } } else if (strcmp(emission, "waiting-hangup") == 0) { if (ctx->calls.waiting) ofono_call_hangup(ctx->calls.waiting, NULL, NULL); -- 2.7.4