Commit Graph

178 Commits

Author SHA1 Message Date
Jorge Martín
8f09fd62d9 Fixes after rebase 2025-09-04 16:49:21 +02:00
Jorge Martín
36bca71a46 Improve the fix for push notifications and MessagingReceiver being unknown to the DI 2025-09-04 16:49:21 +02:00
Jorge Martín
298fda8bcf Fix push notification bindings 2025-09-04 16:49:21 +02:00
Jorge Martín
dca1c5b516 Remove dagger and anvil dependencies, try to simplify gradle build scripts a bit 2025-09-04 16:49:21 +02:00
Jorge Martín
e06bacbff3 Redo DI gradle setup code 2025-09-04 16:49:20 +02:00
Jorge Martín
fc3153bd26 Fix lint issues and restore commented out code 2025-09-04 16:49:18 +02:00
Jorge Martín
92a4b8b66b Start migrating Anvil KSP to Metro 2025-09-04 16:48:34 +02:00
Benoit Marty
a00623e490 Cleanup tests. 2025-09-01 15:03:41 +02:00
Benoit Marty
5f223f3c89 Refactor: Move InMemorySessionStore to test module
- Delete `libraries/session-storage/impl-memory` module
- Move `InMemorySessionStore.kt` to `libraries/session-storage/test`
2025-09-01 14:47:42 +02:00
ganfra
880f1e0134 deps (firebase) : bom >= 34.0.0 doesn't have ktx module anymore 2025-07-22 18:23:42 +02:00
bmarty
2e8f8ec057 Sync Strings from Localazy 2025-06-30 00:33:54 +00:00
Benoit Marty
a55a493060 Create a loggerTag val. 2025-06-11 14:54:46 +02:00
ElementBot
f32495ee58 Sync Strings from Localazy (#4842)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-06-11 14:13:33 +02:00
Benoit Marty
03e23477b7 Fix coroutine scope (#4820)
* Inject the session scope instead of the application scope where it's possible.

* Create AppCoroutineScope annotation to let developers explicitly choose the appropriate CoroutineScope when injecting one.
2025-06-04 15:33:51 +00:00
Jorge Martin Espinosa
58a3ea8b1f Add catchingExceptions method to replace runCatching (#4797)
- Add `runCatchingExceptions` and `mapCatchingExceptions` to replace `runCatching` and `mapCatching`.
- Make `tryOrNull { ... }` catch only exceptions too.
- Apply the changes to the whole project.
- Add new Rust fakes for tests to handle the code that's now unblocked - previously it just threw an `UnsatisfiedLinkError` which we ignored.
- Add a new `detekt-rules` project with a `RunCatchingRule` to prevent `runCatching` and `mapCatching` usages.
2025-06-04 09:02:26 +02:00
ElementBot
498cf15d38 Sync Strings (#4775) 2025-05-30 08:47:39 +00:00
Benoit Marty
819d9c7da0 Update UnifiedPush library (#4358)
* Upgrade `com.github.UnifiedPush:android-connector` from 2.4.0 to 3.0.4

* Do not use jitpack to get the unified push library

* implementation is ok

* Exclude com.google.crypto.tink to fix a compilation issue

* Fix tests.

* Update log.

* Revert "Exclude com.google.crypto.tink to fix a compilation issue"

This reverts commit f431ebe3b78a06282e0ee74c9f428702d463df45.

* Fix compilation issue after rebase.

* Exclude com.google.crypto.tink again.

* Try version 3.0.8

* Use latest version 3.0.9

* Replace tink exclusion with dependency resolution

---------

Co-authored-by: Jorge Martín <jorgem@element.io>
2025-05-26 14:56:54 +02:00
ElementBot
90f89b9088 Sync Strings (#4739)
* Sync Strings from Localazy

* Sync strings again

---------

Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
Co-authored-by: Benoit Marty <benoit@matrix.org>
2025-05-19 08:17:02 +00:00
ElementBot
aab5104010 Sync Strings from Localazy (#4677)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-05-05 12:11:22 +02:00
ElementBot
76c59e2eac Sync Strings from Localazy (#4648)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-04-28 10:59:35 +02:00
Benoit Marty
f916e4e3d4 Push: improve Push history screen, log and stored data (#4601)
* Add adb tools to help with doze mode and app standby

* Add info about the device state when an error occurs in push.

* Keep more events in the DB.

* Push history: add confirmation dialog when resetting the data

* Push history: add a filter to see only the errors

* Update screenshots

* Push history: print out invalid/ignored data received.

* Increase log level for push, to make such log more visible.
It also appears that sometimes Timber.d are not present in the rageshakes.

* Log priority

* Do not include device state for invalid/ignored event.

* Fix tests.

* Fix format issue.

* Fix mistake in code blocks and do not filter when not necessary.

* Improve formatting and add missing unit test.

* Reduce nesting of blocks.

---------

Co-authored-by: ElementBot <android@element.io>
2025-04-16 16:37:32 +02:00
ElementBot
270b420575 Sync Strings (#4590)
* Sync Strings from Localazy

* Fix strings usage after some were moved

* Fix Norwegian string that was causing lint to fail

* Update screenshots

---------

Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2025-04-14 11:24:28 +02:00
Benoit Marty
a1d8322738 Introduce PushHistoryService to store data about the received push (#4573)
* Introduce PushHistoryService to store data about the received push

Add a push database.

* Update screenshots

* Improve preview.

* Update screenshots

* Add missing test.

* Add test for PushHistoryView

* Fix configuration issue.

Was: w: /libraries/troubleshoot/impl/src/test/kotlin/io/element/android/libraries/troubleshoot/impl/history/PushHistoryPresenterTest.kt:35:27 Cannot access class 'PushProvider' in the expression type. While it may work, this case indicates a configuration mistake and can lead to avoidable compilation errors, so it may be forbidden soon. Check your module classpath for missing or conflicting dependencies.

---------

Co-authored-by: ElementBot <android@element.io>
2025-04-11 12:56:54 +02:00
Benoit Marty
2dfa1ab64d Merge branch 'develop' into feature/bma/customPushGateway 2025-03-13 11:39:47 +01:00
Jorge Martin Espinosa
e3dcb683b8 Fix warnings in tests for push provider modules (#4398) 2025-03-12 17:36:31 +01:00
Benoit Marty
b30e1095c9 Give ability to configure the UnifiedPush default push gateway. 2025-03-12 17:10:33 +01:00
Benoit Marty
cd48d051a8 Give ability to configure the Firebase push gateway. 2025-03-12 16:50:46 +01:00
bmarty
9456ee921d Sync Strings from Localazy 2025-03-10 00:28:38 +00:00
Benoit Marty
68a76f83a0 Do not rely only on distributor name but consider value (appId) as well.
This will fix issue when multiple UnifiedPush distributor with the same friendly name are available on the phone.
Fixes #4306
2025-02-26 10:55:33 +01:00
Benoit Marty
c9890d3073 Move build parameters to a common file 2025-02-20 17:58:41 +01:00
Benoit Marty
83ede0f774 Sync strings again.
Revert wrong change on Hungarian plurals.
2025-02-17 11:29:49 +01:00
bmarty
3dddd90d97 Sync Strings from Localazy 2025-02-17 00:30:17 +00:00
bmarty
5a4cac7d2d Sync Strings from Localazy 2025-02-03 00:29:01 +00:00
Benoit Marty
05fc76822a Apply dual licenses: AGPL + Element Commercial to file headers.
2 replace all actions have been performed:
- "SPDX-License-Identifier: AGPL-3.0-only" to "SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial"
- "Please see LICENSE in the repository root for full details." to "Please see LICENSE files in the repository root for full details."
2025-01-07 10:05:04 +01:00
Benoit Marty
b85d4bac1d UnifiedPush: extract logic to resolve the gateway url and unit test it. 2024-12-31 10:01:39 +01:00
Benoit Marty
9ada3791d7 Add test on VectorUnifiedPushMessagingReceiver.onReceive 2024-12-31 09:38:44 +01:00
Benoit Marty
4c8af0a66c Add missing tests on DefaultUnifiedPushGatewayResolver 2024-12-31 09:32:09 +01:00
Benoit Marty
e2cb0173a6 Fix issue with logger. 2024-12-30 13:20:06 +01:00
Benoit Marty
86a44b9035 Ensure that when no Matrix gateway exists, the default one is used. 2024-12-30 13:18:37 +01:00
ElementBot
411895456b Sync Strings - add translations to Finnish (#3883)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2024-11-18 11:37:17 +00:00
Benoit Marty
8e3c44b60b Change signature of getCurrentDistributor. 2024-11-15 15:18:28 +01:00
Benoit Marty
16500a4e16 Add missing test for UnifiedPushProvider 2024-11-15 14:50:56 +01:00
Benoit Marty
c8a7f530d4 Add missing test for FirebasePushProvider 2024-11-15 14:44:51 +01:00
Benoit Marty
844e0216bd Properly unregister from the ntfy app when the user logs out. 2024-11-15 12:43:57 +01:00
Benoit Marty
f406433652 UnifiedPush: also invoke UnifiedPush.unregisterApp when endpoint == null || gateway == null 2024-11-15 12:43:55 +01:00
Benoit Marty
1f3a0eb698 UnifiedPush: unregister the application using the correct instance. 2024-11-15 12:43:53 +01:00
Benoit Marty
9d8d960a98 Handle Jorge's remarks. 2024-10-30 16:37:58 +01:00
Benoit Marty
a54eee042b Now that FCM token can be rotated, let the FirebaseTokenTest observe the value. 2024-10-30 11:54:10 +01:00
Benoit Marty
a6fdb90838 Add quick fix in notification troubleshot test to perform a Firebase token rotation 2024-10-30 11:54:10 +01:00
Benoit Marty
1f60509d92 Firebase token: the beginning of the token is always the same, print out the end of it. 2024-10-30 11:54:09 +01:00