voicecall: Don't set indicators during transitions

This commit is contained in:
Denis Kenzior 2012-03-06 09:24:54 -06:00
parent 033e518cd4
commit f8812ceb23
1 changed files with 13 additions and 0 deletions

View File

@ -825,6 +825,19 @@ static void notify_emulator_call_status(struct ofono_voicecall *vc)
}
}
/*
* Perform some basic sanity checks for transitionary states;
* if a transitionary state is detected, then ignore it. The call
* indicators will be updated properly in the follow-on calls to
* this function once the final state has been reached
*/
if (incoming && (held || call))
return;
if (waiting && (held == FALSE && call == FALSE))
return;
data.status = call || held ? OFONO_EMULATOR_CALL_ACTIVE :
OFONO_EMULATOR_CALL_INACTIVE;