1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-11-10 10:31:20 +00:00
Commit graph

16 commits

Author SHA1 Message Date
Evangelos Ribeiro Tzaras
e5a6ace32d tests: Don't mock calls_contacts_provider_new()
Having set which folks backends to use the real function can be used
without causing any warnings leading to the build to fail.
2023-01-20 17:12:01 +01:00
Evangelos Ribeiro Tzaras
82c3cea464 tests: Remove unused mock-libfeedback.h 2023-01-20 17:12:01 +01:00
Evangelos Ribeiro Tzaras
1056cba62a ringer: Never cancel async DBus calls and refactor
Previously our code assumed that g_cancellable_cancel() the async DBus
calls to libfeedback would guarantee that the underlying operation would
not be performed (i.e. triggering or ending a feedback).

However the endless ringing exhibited in #470 shows this assumption not
to hold. Therefore we avoid using g_cancellable_cancel () completely and
default to waiting for the async operation to finish.

update_ring () now sets the target state by inspecting managed calls and
the main logic will now step towards the target state:
Changing from regular/loud to soft/quiet ringing (or vice versa)
requires we first end feedback before (re)triggering it.

Additionally the "is-quiet" and "is-ringing" properties are replaced by
a new "state" property to allow changing the combination atomically.

Closes: #470
2022-11-15 09:52:17 +00:00
Evangelos Ribeiro Tzaras
baee7dbc89 test-ringer: Assert object finalization
This helps catching any dangling references.
2022-11-15 09:52:17 +00:00
Evangelos Ribeiro Tzaras
4262ec8231 test-ringer: Use glib testing functions instead of mocka 2022-10-11 07:41:07 +00:00
Evangelos Ribeiro Tzaras
31a11b0abc tests: Rename functions
This is done as a follow up commit after the cancellation test was
removed in order to (slightly) ease review.
2022-10-11 07:41:07 +00:00
Evangelos Ribeiro Tzaras
280527d7a7 tests: Mock libfeedback
Copied from libfeedback as of 2e081602f627505e566cc0bdb6cd96c7642d8b65
and adjusted for our mocking needs.

The mocked library will be LD_PRELOADED for the moment,
but further changes to the build should allow us to simply link
to it in the future.
2022-10-11 07:41:07 +00:00
Evangelos Ribeiro Tzaras
b4887fa68a test-ringer: Remove cancellable test
This will get removed soon while refactoring the ringer as cancelling
the async methods would not guarantee that the requested operation would
not be performed.

It could actually already be started (e.g. starting or stopping the
feedback), but we have not yet received the reply, so it was always a
bit flaky.
2022-10-11 07:41:07 +00:00
Chris Talbot
e91d6258ad calls-ui-call-data: change DELAY_UI_MS to 100 ms
15 ms does not seem to be enough time for phosh-antispam to be able
to hang up before the incoming call screen shows up. In my experiement,
90 looks to be the minimum time needed for the incoming call to not show up.

I put it to 100 ms just to be safe.
2022-06-11 18:56:46 -04:00
Evangelos Ribeiro Tzaras
94fa13af4c settings: Convert to the singleton pattern
We only have a single source of settings, so we should reflect that by
using a singleton. This also reduces our LoC.

This doesn't impair our ability to run tests because there we run with
GSETTINGS_BACKEND=memory
2022-05-13 19:58:07 +02:00
Evangelos Ribeiro Tzaras
30c4e90499 ui-call-data: Store origin id and adapt to changes 2022-03-04 18:00:32 +01:00
Evangelos Ribeiro Tzaras
93cf894a8c ringer: Take ui-active property into account
Only start ringing once the UI is deemed active, i.e. the "pre-ring" phase has
passed.

Fixes #371
2022-02-03 12:37:05 +01:00
Evangelos Ribeiro Tzaras
5b9609c4f7 ringer: Use CallsUiCallData instead of CallsCall
This will allow us to handle pre-ringing better.
2022-02-01 06:11:58 +01:00
Evangelos Ribeiro Tzaras
a048b4c83d call: Move state property into base class
This let's us get rid of a lot of duplication in the derived classes.

Additionally we set the initial state to CALLS_CALL_STATE_INCOMING if
inbound is TRUE and CALLS_CALL_STATE_DIALING otherwise.
2021-12-20 12:25:19 +01:00
Evangelos Ribeiro Tzaras
85c23cfc3d test: ringer: Test quiet ringing 2021-12-05 10:04:05 +01:00
Evangelos Ribeiro Tzaras
7dadb3c50f tests: Add ringer tests
We mock libfeedback and CallsCall to test the ringer for the following
scenarios:
- Call state changes
- User requested silencing of ringer
- Multiple calls
2021-12-05 09:50:25 +01:00