From 7394ea81985165315cd8d804df6fcb6dab048792 Mon Sep 17 00:00:00 2001 From: Gustavo Sverzut Barbieri Date: Mon, 27 Aug 2012 04:17:43 -0300 Subject: [PATCH] callscreen: do not show time for calls other than active or held. --- dialer/callscreen.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dialer/callscreen.c b/dialer/callscreen.c index 3cb65e5..1a1c320 100644 --- a/dialer/callscreen.c +++ b/dialer/callscreen.c @@ -295,9 +295,14 @@ static void _call_elapsed_update(Callscreen *ctx, unsigned int id, { Edje_Message_Float msgf = {0}; Evas_Object *ed; + OFono_Call_State state = ofono_call_state_get(c); double start, now, elapsed; char part[128], buf[128] = ""; + if ((state != OFONO_CALL_STATE_ACTIVE) && + (state != OFONO_CALL_STATE_HELD)) + goto end; + if (ofono_call_multiparty_get(c)) start = ctx->multiparty.start; else @@ -338,9 +343,14 @@ static void _activecall_elapsed_update(Callscreen *ctx) { Edje_Message_Float msgf = {0}; Evas_Object *ed; + OFono_Call_State state = ofono_call_state_get(ctx->calls.current); double start, now, elapsed; char buf[128] = ""; + if ((state != OFONO_CALL_STATE_ACTIVE) && + (state != OFONO_CALL_STATE_HELD)) + goto end; + if (ofono_call_multiparty_get(ctx->calls.current)) start = ctx->multiparty.start; else -- 2.7.4