232 Commits

Author SHA1 Message Date
enki e752a456f7 Built-in push points at blappush.utn.lol; bump to 1.0.7
Sonar / Sonar Quality Checks (push) Has been cancelled
Post-release / post-release (push) Has been cancelled
Code Quality Checks / Search for forbidden patterns (push) Has been cancelled
Code Quality Checks / Search for invalid screenshot files (push) Has been cancelled
Code Quality Checks / Search for invalid dependencies (push) Has been cancelled
Code Quality Checks / Konsist tests (push) Has been cancelled
Code Quality Checks / Compose tests (push) Has been cancelled
Code Quality Checks / Android lint check (push) Has been cancelled
Code Quality Checks / Detekt checks (push) Has been cancelled
Code Quality Checks / Ktlint checks (push) Has been cancelled
Code Quality Checks / Doc checks (push) Has been cancelled
Code Quality Checks / Check shell scripts (push) Has been cancelled
Code Quality Checks / Run zizmor (push) Has been cancelled
Create release App Bundle and APKs / Create App Bundle (Gplay) (push) Has been cancelled
Create release App Bundle and APKs / Create App Bundle Enterprise (push) Has been cancelled
Create release App Bundle and APKs / Create APKs (FDroid) (push) Has been cancelled
Test / Runs unit tests (push) Has been cancelled
Code Quality Checks / Project Check Suite (push) Has been cancelled
ntfy.sh silently blocks Matrix gateway traffic, which is why the embedded
provider never delivered despite a sound code path. Existing installs
re-register against the new server automatically on next app open
(ensurePusherIsRegistered runs every launch).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-30 10:03:42 -07:00
enki ccc2847418 Fix space-to-space switching, hide space rooms at Home, harden ntfy reconnect
Sonar / Sonar Quality Checks (push) Has been cancelled
Code Quality Checks / Search for forbidden patterns (push) Has been cancelled
Code Quality Checks / Search for invalid screenshot files (push) Has been cancelled
Code Quality Checks / Search for invalid dependencies (push) Has been cancelled
Code Quality Checks / Konsist tests (push) Has been cancelled
Code Quality Checks / Compose tests (push) Has been cancelled
Code Quality Checks / Android lint check (push) Has been cancelled
Code Quality Checks / Detekt checks (push) Has been cancelled
Code Quality Checks / Ktlint checks (push) Has been cancelled
Code Quality Checks / Doc checks (push) Has been cancelled
Code Quality Checks / Check shell scripts (push) Has been cancelled
Code Quality Checks / Run zizmor (push) Has been cancelled
Create release App Bundle and APKs / Create App Bundle (Gplay) (push) Has been cancelled
Create release App Bundle and APKs / Create App Bundle Enterprise (push) Has been cancelled
Create release App Bundle and APKs / Create APKs (FDroid) (push) Has been cancelled
Test / Runs unit tests (push) Has been cancelled
Code Quality Checks / Project Check Suite (push) Has been cancelled
Space rail: selecting a space while another is selected kept serving the old
filter (unkeyed remember in SpaceFiltersPresenter) — key it on the space id.

Home: track child lists of all spaces (not just the selected one) and hide
space-owned rooms at Home, Discord-style. Filter chips still search everything;
the owned set is persisted so Home is clean on cold start. Voice rooms now
classify in every space without visiting it first.

ntfy: reconnect immediately when the default network returns instead of
waiting out up to 5 minutes of backoff, and surface the socket state
(Connected/Reconnecting) in the foreground-service notification.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 20:08:54 -07:00
enki 9d14530660 Blap Android port: branding, ntfy push, spoilers, Discord-style home, EC fork
Sonar / Sonar Quality Checks (push) Has been cancelled
Code Quality Checks / Search for forbidden patterns (push) Has been cancelled
Code Quality Checks / Search for invalid screenshot files (push) Has been cancelled
Code Quality Checks / Search for invalid dependencies (push) Has been cancelled
Code Quality Checks / Konsist tests (push) Has been cancelled
Code Quality Checks / Compose tests (push) Has been cancelled
Code Quality Checks / Android lint check (push) Has been cancelled
Code Quality Checks / Detekt checks (push) Has been cancelled
Code Quality Checks / Ktlint checks (push) Has been cancelled
Code Quality Checks / Doc checks (push) Has been cancelled
Code Quality Checks / Check shell scripts (push) Has been cancelled
Code Quality Checks / Run zizmor (push) Has been cancelled
Code Quality Checks / Project Check Suite (push) Has been cancelled
Create release App Bundle and APKs / Create App Bundle (Gplay) (push) Has been cancelled
Create release App Bundle and APKs / Create App Bundle Enterprise (push) Has been cancelled
Create release App Bundle and APKs / Create APKs (FDroid) (push) Has been cancelled
Test / Runs unit tests (push) Has been cancelled
Post-release / post-release (push) Has been cancelled
Everything from port rounds 1-5 plus today's fixes, on top of upstream develop:

- Branding: Blap name/id (lol.utn.blap), purple #7c66e0 accent (both colorGreen*
  and colorAlphaGreen* Compound ramps remapped), Hanken Grotesk, squircle
  avatars, five-dot notification icon, de-branded strings across all locales
- Push: new libraries/pushproviders/ntfy module — FGS websocket to an ntfy
  server's Matrix gateway, no Google. Includes base64 payload decode, restart
  on boot/update/app-open, background-FGS-start crash guard, and a proactive
  battery-optimization banner (Doze kills the socket without the exemption)
- Spoilers (MSC2010, interops with Blap desktop 1.0.3): render + tap-to-reveal,
  Discord ||text|| send syntax, SPOILER_ filename convention for media both ways
- Home: Discord-style space rail, client-side room-list sections, DM-first sort
- Calls: embedded Element Call fork 0.20.3 assets (camera-off joins, bottom strip)
- Threads on by default; RTC ping timeline items hidden; reply-quote restyle
- URLs now point at git.utn.lol/enki/blap (was codeberg); version 26.07.2

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-25 12:56:15 -07:00
ElementBot 03304b3ece Sync Strings (#7192)
* Sync Strings from Localazy

* Update screenshots

---------

Co-authored-by: jmartinesp <480955+jmartinesp@users.noreply.github.com>
2026-07-13 12:21:55 +02:00
renovate[bot] a3736786cd Update dependency com.google.firebase:firebase-bom to v34.15.0 (#7089)
* Update dependency com.google.firebase:firebase-bom to v34.15.0

* Replace deprecated FCM `token` usages with `installationId`

Renamed a few components, changed the behaviour of `FirebaseTokenRotator` so it doesn't save the new token, `FirebaseMessagingService` will do it in its `onRegistered` method

* Enable firebase messaging installation_id

* Make sure we delete the FID when unregistering the app from Firebase

* Add `runFirebaseTask` util to convert `Task<T>` into a `Result<T>` returned from a suspending function

Also, rename the use cases and make them use the `invoke` pattern

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: Benoit Marty <benoit@matrix.org>
2026-06-25 09:48:48 +02:00
Benoit Marty d4aa49f3d3 Fix small code smell (#7058)
* RolesAndPermissionsNode does not need to implement RolesAndPermissionsNavigator and simplify the code.

* Remove default implementation in `RoomMemberListNavigator`

* Remove dead code.

* Fix test compilation issue
2026-06-19 15:33:01 +02:00
Jorge Martin Espinosa e370b33771 Fix Sonar with AGP 9 (some workarounds) (#7055)
Since it'll try to resolve their output, first they need to complete.
2026-06-19 13:12:54 +02:00
Benoit Marty c430877d87 Ensure Robolectric test are run using API 36 until the library support API 37. 2026-06-18 12:18:32 +02:00
renovate[bot] f0a6cba6db fix(deps): update android.gradle.plugin to v9 (major) (#6021)
* Update android.gradle.plugin to v9

* Separate extensions between app and library ones

`CommonExtension` has been split and its properties are now duplicated in `ApplicationExtension` and `LibraryExtension` without a shared interface, so we now need to duplicate the helper extension functions

* Bump Gradle wrapper to `9.3.1`

* Remove `kotlin-android` plugin usage: it's no longer needed

* Enable `resValues` build feature for the modules that have resources in custom variants like gplay, debug, etc.

Otherwise this now fails saying the resources are there but the feature is disabled

* Remove `retrofit` dependency from `:features:call:impl`

It wasn't in use and the build was failing

* Update kotlin to v2.4.0

* Update plugin paparazzi to v2.0.0-alpha05

* Update gradle wrapper to 9.5.1

./gradlew wrapper --gradle-version 9.5.1 --gradle-distribution-sha256-sum bafc141b619ad6350fd975fc903156dd5c151998cc8b058e8c1044ab5f7b031f

* Update com.android.tools.build:gradle to 9.2.1

* Update plugin sonarqube to v7.3.1.8318

* Kotlin 2.4.0

* Context parameters are enabled by default in Kotlin 2.4.0

* Fix code issue

* Fix record screenshot issue

* Workaround for https://github.com/cashapp/paparazzi/issues/2342

* Workaround for another issue with Paparazzi

* Remove unused import

* Update screenshots

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: Benoit Marty <benoitm@element.io>
Co-authored-by: Benoit Marty <benoit@matrix.org>
Co-authored-by: ElementBot <android@element.io>
2026-06-11 09:51:47 +02:00
S1m 25264dd3e3 Fallback to the default push gateway on error (#5742)
* Add more HTTP response code returning NoMatrixGateway

Fix Push notifications with Mozilla's autopush that returns 406

* Update gateway resolver tests to match new known errors

* Use default gateway on error if no gateway is recorded yet

* Update gateway resolver tests to return default gateway on error
2026-06-04 16:19:52 +02:00
ElementBot 0aaa80cbdc Sync Strings from Localazy (#6856)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2026-05-26 08:05:07 +00:00
Benoit Marty 4d0be69b4c In the module :libraries:matrix.api, change the dependencies to:
- libraries.sessionStorage.api
- projects.libraries.architecture
from `api` to `implementation`.

Modules who need `:libraries:matrix.api` do not necessarily need to use the session storage api.
2026-04-30 09:52:10 +02:00
ElementBot 9a2ad3928a Merge pull request #6658 from element-hq/sync-localazy
Sync Strings
2026-04-27 09:17:54 +02:00
ElementBot e1b7171839 Sync Strings (#6626)
* Sync Strings from Localazy

* Use the previous plurals as plain strings

* Add extra case for 1 vs multiple users

* Update screenshots

---------

Co-authored-by: Jorge Martín <jorgem@element.io>
2026-04-20 17:09:10 +00:00
Jorge Martin Espinosa f80a140cf9 Cleanup FetchPushForegroundService (#6577)
* Rename `PushHandlingWakeLock` to `FetchPushForegroundServiceManager`. Move the start/stop logic from `FetchPushForegroundService.Companion` to it.

* Add more tests using Robolectric.

* Remove `FeatureFlags.SyncNotificationsWithWorkManager` and associated code: this should have been removed in one of the previous refactors, since we don't have the 2 ways to sync notifications anymore, everything uses the `WorkManager`

---------

Co-authored-by: Benoit Marty <benoit@matrix.org>
2026-04-20 16:03:12 +02:00
bmarty 23c1112dcf Sync Strings from Localazy 2026-04-13 00:48:40 +00:00
Jorge Martin Espinosa ad56b01e4a Try handling ForegroundServiceStartNotAllowedException better (#6483)
* Try handling `ForegroundServiceStartNotAllowedException` better

The docs mention starting a foreground service when the app is on background is allowed when FCM receives a high priority notification, so we don't do it if the priority is not high.

Also, we handle the case where starting the foreground service fails so it doesn't crash the app.
2026-03-30 18:44:08 +02:00
Jorge Martin Espinosa f1708f6366 Fix wakelock not stopping early when notifications are disabled (#6424)
If notifications for a device are disabled when there is no connection with the HS, the push registration will still exist, so the device can still receive push notifications.

In that cases, we were running into an issue where the wakelock for push notifications was started immediately after receiving a push but was never stopped and it ran for 3 minutes until its timeout, keeping the device awake for no reason.

This patch changes `DefaultPushHandler` so if we don't need the wakelock it returns `false` and we can stop the wakelock early.
2026-03-23 18:07:25 +01:00
Jorge Martin Espinosa 8e46e68630 Add a foreground service with a wakelock for fetching push notifications (#6321)
* Create `PushHandlingWakeLock` to start a foreground service:

When receiving a push and scheduling the notification fetching, several problems can happen:

1. Some async operation is waiting for a timeout and it takes way longer than that to finish (i.e. timeout of 10s but it took 30s to advance).
2. The same, but when starting new coroutines. I've seen the time between scheduling a coroutine and it running sometimes take up to 1 minute.
3. Notification fetching can be scheduled immediately, but it can take a while to actually run because the OS understands the app is now in Doze.

Having a wakelock that runs as soon as the push handling starts fixes these: it continues the previous wakelock held by either Firebase or the UnifiedPush distributor.

* Acquire the wakelock as soon as we received the pushes in both receivers

* Also release the wakelock ahead of time if possible
2026-03-17 14:24:26 +01:00
renovate[bot] 2b04c4bfc0 Update metro to v0.11.2 (#6270)
* Update metro to v0.11.2

* Bind push tests to the right scope .Add a comment so we don't forget to do it for future ones.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2026-03-03 13:39:43 +01:00
bmarty 25c723c35a Sync Strings from Localazy 2026-02-23 00:39:49 +00:00
Benoit Marty c901772145 Metro 0.10.0: Classes annotated with ContributesIntoSet do not need to be annotated with Inject. 2026-01-20 10:13:39 +01:00
Jorge Martín b91e3cfb84 Do some cleanup in VectorUnifiedPushMessagingReceiverBindings 2025-12-22 14:17:19 +01:00
Benoit Marty 4aadbed0b1 Fix test issue: "java.security.KeyStoreException: AndroidKeyStore not found" 2025-12-19 09:27:11 +01:00
ElementBot ad881c303a Sync Strings from Localazy (#5904)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-12-15 23:51:19 +01:00
Benoit Marty 54e742075d Detekt: enable rule exceptions.SwallowedException and fix existing issue. 2025-12-05 09:45:23 +01:00
S1m c4dd960e0d Fix push gateway with some push provider (Sunup/autopush) (#5741)
* Add more HTTP response code returning NoMatrixGateway

Fix Push notifications with Mozilla's autopush that returns 406

* Update gateway resolver tests to match new known errors
2025-11-17 13:34:35 +01:00
Benoit Marty 1d7d00e4bb Improve code readability and documentation. 2025-11-14 15:10:24 +01:00
Benoit Marty dbb9bb1338 Update KDoc 2025-11-14 14:23:29 +01:00
Benoit Marty f1e12c1c1c Do not attempt to restore the pusher after 2 removal in a short time. 2025-11-13 23:15:00 +01:00
Benoit Marty 358731def3 Update comment 2025-11-13 18:06:27 +01:00
Benoit Marty c453d2adac Add unit test on DefaultUnifiedPushRemovedGatewayHandler 2025-11-13 15:34:33 +01:00
Benoit Marty f9c0b9e8bb UnifiedPush: emit error when registration fails.
Note that I did not manage to have the method `onRegistrationFailed` invoked. If the network is not available for instance, unregistering the previous pusher will fail first.
2025-11-13 14:56:20 +01:00
Benoit Marty 6b7e8f72f5 Improve logs 2025-11-13 12:26:46 +01:00
Benoit Marty e706e5fa0e Unregister the pusher when the topic is deleted (unregistered) 2025-11-13 12:26:35 +01:00
Benoit Marty eb31505dc7 Copyright: Add Element Creations Ltd. copyright 2025-11-10 11:05:05 +01:00
Benoit Marty f86431e663 Copyright: Add final period 2025-11-10 10:13:41 +01:00
Benoit Marty c4e0370f41 Copyright: run command uv run license-editor --repository ../element-x-android 2025-11-10 10:09:26 +01:00
Benoit Marty afdfe28ef4 Remove dependency on AppNavigationStateService from DefaultUnifiedPushCurrentUserPushConfigProvider 2025-10-23 15:37:31 +02:00
Benoit Marty 263e761907 Remove @Inject, not necessary anymore when class is annotated with @ContributesBinding 2025-10-22 18:52:37 +02:00
Benoit Marty df48ed5a2d Introduce JsonProvider.
It will ensure that classes are using the correct Json instances in the unit tests.
2025-10-20 09:40:42 +02:00
Benoit Marty b01de9efa7 Fix tests. 2025-10-16 18:16:48 +02:00
Benoit Marty 7c437761c4 Move Json provider from Network module to AppModule to reuse it. 2025-10-16 16:37:08 +02:00
Benoit Marty a02b2283af Merge pull request #5443 from element-hq/renovate/org.unifiedpush.android-connector-3.x
fix(deps): update dependency org.unifiedpush.android:connector to v3.1.0
2025-10-10 17:52:33 +02:00
Benoit Marty 8f9115fb05 Need to be a compose library for Distributor to be considered stable. 2025-10-09 18:22:37 +02:00
Benoit Marty 7ce4b47203 Improve current push provider test: give info about the distributor. 2025-10-07 15:17:59 +02:00
Benoit Marty 9436ea55a3 Fix API break in tests. 2025-10-06 22:39:33 +02:00
ElementBot 95949e615f Sync Strings from Localazy (#5427)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-09-29 15:10:21 +00:00
Benoit Marty 8d5078904a Introduce runAndTestState extension on NotificationTroubleshootTest 2025-09-23 09:46:21 +02:00
Benoit Marty a83fc2aa1d Add default value for Failure.hasQuickFix 2025-09-23 09:13:45 +02:00