From 77c58d8b6b0c63b8dc2201dfd9019e7f824e63e5 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Tue, 17 Apr 2007 13:55:27 +0000 Subject: Only stop indicating a call if the answer button is pressed (not e.g. if the volume button is pressed) --- audio/headset.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'audio/headset.c') diff --git a/audio/headset.c b/audio/headset.c index b1aad63d..4a7e8db4 100644 --- a/audio/headset.c +++ b/audio/headset.c @@ -408,6 +408,11 @@ static gboolean rfcomm_io_cb(GIOChannel *chan, GIOCondition cond, break; case HEADSET_EVENT_KEYPRESS: + if (hs->ring_timer) { + g_source_remove(hs->ring_timer); + hs->ring_timer = 0; + } + hs_signal(hs, "AnswerRequested"); break; @@ -438,11 +443,6 @@ static gboolean rfcomm_io_cb(GIOChannel *chan, GIOCondition cond, hs->data_start = 0; } - if (hs->ring_timer) { - g_source_remove(hs->ring_timer); - hs->ring_timer = 0; - } - return TRUE; failed: -- cgit