1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-09-19 09:55:26 +00:00

calls-ringer: Don't restart when feedback got ended explicitly

If a user e.g. lowers the gobal feedback level we don't want to
retrigger the events.

Without this calls assumes events ended naturally and restarts the
ringing without any events. As that is never ended even subsequent calls
don't receive any ringing.

Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/734>
This commit is contained in:
Guido Günther 2024-06-15 18:16:33 +02:00 committed by Marge Bot
parent 2fa17c86d3
commit b5af7f5e7d

View file

@ -194,7 +194,8 @@ on_feedback_ended (LfbEvent *event,
/* When no feedback is available on the system (e.g. no vibration motor or LEDs)
* it will get ended immediately on triggering. Changing the target state will
* break loop that would otherwise occur. */
if (lfb_event_get_end_reason (event) == LFB_EVENT_END_REASON_NOT_FOUND)
if (lfb_event_get_end_reason (event) == LFB_EVENT_END_REASON_NOT_FOUND ||
lfb_event_get_end_reason (event) == LFB_EVENT_END_REASON_EXPLICIT)
self->target_state = CALLS_RING_STATE_INACTIVE;
set_ring_state (self, CALLS_RING_STATE_INACTIVE);