Commit Graph

45 Commits

Author SHA1 Message Date
Benoit Marty
142338be07 An interface is enough. 2024-02-27 14:42:43 +01:00
Benoit Marty
0c8631417a Add test for DatabaseSessionStore.getAllSessions(), and update data when session is not found. 2024-02-27 12:04:59 +01:00
Benoit Marty
0c6a26f6c1 Add test on DefaultSessionObserver. 2024-02-27 11:39:17 +01:00
Benoit Marty
ca35c0a800 Remove useless log. 2024-02-27 10:41:14 +01:00
Benoit Marty
5e5eddd537 Merge pull request #2244 from element-hq/feature/bma/encryptedDb2
Encrypted db
2024-01-19 17:40:23 +01:00
Jorge Martin Espinosa
b755a2584b Try mitigating unexpected logouts (#2251)
* Try mitigating unexpected logouts.

Try making getting/storing session data use a Mutex for synchronization.

Also added some more logs so we can understand exactly where it's failing.
2024-01-18 16:22:25 +01:00
Benoit Marty
95e228a993 Fix test. 2024-01-18 12:44:20 +01:00
Benoit Marty
d04f76e8cf SessionData: add the passphrase. 2024-01-18 11:50:05 +01:00
Benoit Marty
378692f743 Fix moar ktlint issues 2024-01-11 10:02:10 +01:00
renovate[bot]
7e9cda3aa9 Update plugin ktlint to v12.1.0 (#2200)
* Update plugin ktlint to v12.1.0

* Run `./gradlew ktlintFormat` and fix some issues manually.

* Fix other issues reproted by Ktlint

* Limit false positives, KtLint removes unnecessary curly brace in String templates.

* Remove useless Unit

* Minor improvements over ktlint changes

* Restore `AlertDialogContent` behaviour

* Update screenshots

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Benoit Marty <benoit@matrix.org>
Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-01-10 16:22:24 +01:00
Marco Romano
fb02f698d7 Include desugaring lib also in library modules (#1604)
## Type of change

- [ ] Feature
- [ ] Bugfix
- [x] Technical
- [ ] Other :

## Content

Includes the `coreLibraryDesugaring(libs.android.desugar)` dependency in all modules which use one of our gradle plugins.

## Motivation and context

Right now desugaring is enabled also in library modules but the desugar dependency is not included in those.
This causes some unwanted side effects such as being unable to run compose previews in an emu.

This change will also include the desugar dependency in those libraries.
2023-10-19 09:00:32 +00:00
Marco Romano
f32817e71f Other fixes as per https://cashapp.github.io/sqldelight/2.0.0/upgrading-2.0/ 2023-10-13 15:17:12 +02:00
Marco Romano
0e1a8d506d Find and replace 2023-10-13 14:55:12 +02:00
Benoit Marty
3583aed69a Improve comment. 2023-10-12 15:48:13 +02:00
Benoit Marty
11ddb4a8cc Add some comment in the files manipulating the session DB 2023-10-12 14:59:06 +02:00
Benoit Marty
8e8821ca1c Add DB versions to test all migrations 2023-10-12 14:53:14 +02:00
Benoit Marty
7797b4c48a Fix DB migration test. Does not require a migration apparently. 2023-10-12 14:53:00 +02:00
Benoit Marty
0ca144117a Fix test. 2023-10-10 10:20:49 +02:00
Benoit Marty
920626d260 Database version 4: add isTokenValid and loginType fields
Generate database with model version 4
2023-10-10 10:20:49 +02:00
Benoit Marty
4a79d1f7b2 Fix test compilation 2023-10-10 10:20:49 +02:00
Benoit Marty
039eda038e Code quality. 2023-10-10 10:20:49 +02:00
Benoit Marty
5faf706264 Add SignedOutNode, to handle session behind deleted from outside (no support for soft-logout) 2023-10-10 10:20:31 +02:00
Benoit Marty
0b3fcecbed SignedOut mode - WIP 2023-10-10 10:20:31 +02:00
Benoit Marty
fea1fe0f3c Map the new fields of SessionData. 2023-10-10 10:20:31 +02:00
Benoit Marty
87fa394b93 Need this now. 2023-10-10 10:20:31 +02:00
Benoit Marty
b930a1a573 Generate database with model version 3, to unit test database migration.
https://cashapp.github.io/sqldelight/1.5.4/multiplatform_sqlite/migrations/
2023-10-10 10:20:31 +02:00
Benoit Marty
10e8517766 Implement didRefreshTokens(): update database with updated SessionData. 2023-08-23 14:42:46 +02:00
Benoit Marty
06a9b129d0 Restore OIDC support. 2023-08-23 12:18:42 +02:00
Benoit Marty
754b4647ee Add a test to cover fix of #950 2023-07-24 15:28:36 +02:00
Jorge Martin Espinosa
280b7e32e0 Hide encryption history + FTUE flow (#839)
* First attempt at implementing encrypted history banner and removing old UTDs

* Get the right behavior in the timeline

* Implement the designs

* Extract post-processing logic, add tests

* Add encryption banner to timeline screenshots

* Create FTUE feature to handle welcome screen and analytics

* Move classes to their own packages, add tests for `DefaultFtueState`.

* Remove unnecessary private MutableStateFlow

* Move some FTUE related methods and classes back to the `impl` module

* Handle back press at each FTUE step

* Remove unneeded `TestScope` receiver for `createState` in tests.

* Use light & dark previews for the banner view.

* Move color customization from `TextStyle` to `Text` component.

* Rename `InfoList` design components, use them in `AnalyticsOptInView` too.

* Cleanup MatrixClient.

* Fix copy&paste error

Co-authored-by: Benoit Marty <benoit@matrix.org>

* Fix typo

* Fix Maestro tests

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
Co-authored-by: Benoit Marty <benoit@matrix.org>
2023-07-17 18:34:36 +02:00
Benoit Marty
8cf61eaa55 Fix detected forbidden pattern. 2023-05-31 15:31:05 +02:00
Florian Renaud
c22d181d8c Remove useless OptIn in tests 2023-05-12 10:05:39 +02:00
Jorge Martin Espinosa
afd58f1634 Update Gradle to 8.1 and AGP to v8.0 (#329)
* Update AGP to 8.0.0.

* Set JAVA_HOME to JDK17

* Update lint version.

* Use right JDK for dependency analysis, replace deprecated env var.

* Upgrade to Gradle 8.1.

* Remove `@Supress(DSL_SCOPE_VIOLATION)` as it's no longer needed.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-17 08:49:52 +00:00
Benoit Marty
c0ef4804a1 Persist notification data. Note that it will break the key storage for the session database. 2023-04-05 16:59:17 +02:00
Benoit Marty
a2dc4db684 Bad copy/paste 2023-04-05 16:59:17 +02:00
Benoit Marty
c52ad084e9 Observe session database to be able to detect new user and removed user. 2023-04-05 16:59:17 +02:00
Benoit Marty
b9276aa60b Cleanup + Add per user store. 2023-04-05 16:59:17 +02:00
Benoit Marty
b2ce80da69 Add a db query to get all the Sessions. 2023-04-05 16:31:09 +02:00
ganfra
46c7ede5dc Merge pull request #215 from vector-im/renovate/org.matrix.rustcomponents
Update dependency org.matrix.rustcomponents:sdk-android to v0.1.3
2023-03-20 14:57:36 +01:00
ganfra
6da72e2461 Fix test on SessionStore 2023-03-20 13:19:35 +01:00
ganfra
b73ff7aa45 Update code so it compiles 2023-03-20 13:07:50 +01:00
Benoit Marty
ad6a2e9595 allLibraries renamed to allLibrariesImpl and only reference implementation of the libraries. 2023-03-16 10:10:55 +01:00
Benoit Marty
ccf4cc1bc4 Move InMemorySessionStore in it's own module implementation 2023-03-06 13:10:27 +01:00
Benoit Marty
a66312d9e2 Split module session-storage into api and impl. 2023-03-06 13:10:27 +01:00
Jorge Martin Espinosa
c20013243b Store session data in a secure way (#98)
* Replace SessionData DataStore with an encrypted SQLite DB.

---------

Co-authored-by: Benoit Marty <benoit@matrix.org>
2023-03-02 16:48:54 +01:00