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

Let provider plugin decide whether to automatically hang up secondary calls

Revert "manager: hang up secondary calls"

This reverts commit 94345e0916 and moves that
functionality to the ModemManager plugin.

Fixes #290
This commit is contained in:
Evangelos Ribeiro Tzaras 2021-10-14 16:17:34 +02:00
parent 21eb12e9b1
commit 94d730c3ed
2 changed files with 6 additions and 10 deletions

View file

@ -465,6 +465,12 @@ add_call (CallsMMOrigin *self,
}
g_debug ("Call `%s' added", path);
/* FIXME: Hang up the call, since accepting a secondary call does not currently work.
* CallsMMCall[28822]: WARNING: Error accepting ModemManager call to `+4916XXXXXXXX': GDBus.Error:org.freedesktop.ModemManager1.Error.Core.Failed: This call was not ringing, cannot accept
*/
if (g_hash_table_size (self->calls) > 1)
calls_call_hang_up (CALLS_CALL (call));
}

View file

@ -58,7 +58,6 @@ struct _CallsManager
CallsContactsProvider *contacts_provider;
CallsManagerState state;
CallsCall *primary_call;
CallsSettings *settings;
};
@ -200,11 +199,6 @@ add_call (CallsManager *self, CallsCall *call, CallsOrigin *origin)
g_return_if_fail (CALLS_IS_CALL (call));
g_signal_emit (self, signals[SIGNAL_CALL_ADD], 0, call, origin);
if (self->primary_call == NULL)
self->primary_call = call;
else
calls_call_hang_up (call);
}
static void
@ -216,9 +210,6 @@ remove_call (CallsManager *self, CallsCall *call, gchar *reason, CallsOrigin *or
/* We ignore the reason for now, because it doesn't give any usefull information */
g_signal_emit (self, signals[SIGNAL_CALL_REMOVE], 0, call, origin);
if (self->primary_call == call)
self->primary_call = NULL;
}
static void
@ -666,7 +657,6 @@ calls_manager_init (CallsManager *self)
const gchar *dir;
self->state = CALLS_MANAGER_STATE_NO_PROVIDER;
self->primary_call = NULL;
self->providers = g_hash_table_new_full (g_str_hash,
g_str_equal,
g_free,