1
0
mirror of https://github.com/vector-im/riotX-android synced 2025-10-06 00:02:48 +02:00

Compare commits

..

2954 Commits

Author SHA1 Message Date
Valere
192b0ed3fb change way to compute local echo 2020-10-08 14:37:12 +02:00
Valere
c909fc50a2 Perf Tracing server support 2020-10-05 18:44:42 +02:00
ganfra
5cf1175d7f Merge branch 'develop' into feature/performance_tracking 2020-10-01 17:29:22 +02:00
ganfra
7be93e03ba Profiler: clean code 2020-10-01 17:20:51 +02:00
ganfra
98b86e977f Profile send: add one more stage 2020-10-01 16:38:14 +02:00
ganfra
3cb2873f93 Add logs for timeline build in debug 2020-10-01 15:33:57 +02:00
ganfra
bb7cd409e6 Profiler: make it generic so you can use it as you want. 2020-10-01 15:33:48 +02:00
Benoit Marty
28b039fde3 Update CHANGES.md with: Updates Gradle Wrapper from 5.6.4 to 6.6.1. (#2193) 2020-10-01 14:47:35 +02:00
Benoit Marty
762bfc4fcc Merge pull request #2193 from vector-im/gradlew-update-6.6.1
Updates Gradle Wrapper from 5.6.4 to 6.6.1.
2020-10-01 14:44:55 +02:00
gradle-update-robot
39532fc2aa Update Gradle Wrapper from 5.6.4 to 6.6.1.
Signed-off-by: gradle-update-robot <gradle-update-robot@regolo.cc>
2020-10-01 00:53:05 +00:00
ganfra
cef191f1a5 Performance tracking: add more stages in encryption 2020-09-30 19:20:38 +02:00
Valere
b6b73f2361 Merge pull request #2187 from vector-im/feature/forgot_pass_reset_all_4S
Feature/forgot pass reset all 4 s
2020-09-30 18:22:48 +02:00
Benoit Marty
37d6a9b722 ktlint 2020-09-30 18:20:42 +02:00
Benoit Marty
2a2187196f Merge pull request #2190 from vector-im/feature/utd_pagination
Feature/utd pagination
2020-09-30 18:19:00 +02:00
Benoit Marty
881ebff015 Changelog and small improvement 2020-09-30 18:11:30 +02:00
ganfra
f0272fd283 UTD pagination: clean up and add developer settings to enable complete history 2020-09-30 17:56:50 +02:00
ganfra
0a0330a48c UTD : when reaching UTD and invite state event, stop back pagination 2020-09-30 17:54:16 +02:00
Benoit Marty
c09d308df8 Merge pull request #2176 from vector-im/feature/fix_dm_wordings
Wording differentiation for DM "chat" instead of "room"
2020-09-30 17:50:58 +02:00
Benoit Marty
482bb51640 More cleanup 2020-09-30 17:50:36 +02:00
Benoit Marty
ee56307ccc No warning when cancelling the Reset of 4s 2020-09-30 16:47:34 +02:00
Benoit Marty
18950a6b46 Some cleanup 2020-09-30 16:36:17 +02:00
Valere
a4e163885d Better rotation support 2020-09-30 16:17:28 +02:00
Benoit Marty
108a31eca3 Avoid long lines 2020-09-30 15:31:33 +02:00
Benoit Marty
7f26dbe260 Fix compil issue 2020-09-30 15:23:27 +02:00
Benoit Marty
5e2f65ab7a Split long lines 2020-09-30 12:46:28 +02:00
Benoit Marty
c5459cdde4 Use RoomSummaryHolder if available 2020-09-30 12:39:36 +02:00
Benoit Marty
f58829130a More cleanup 2020-09-30 12:30:21 +02:00
Benoit Marty
42a3a64b0d Better way to get direct state of the room (using view state) 2020-09-30 12:26:25 +02:00
Benoit Marty
1986de36a6 Better wording for DM creation (note: this event is hidden in the timeline by default) 2020-09-30 12:12:44 +02:00
Benoit Marty
84202adc5b Add braces to multiline if else 2020-09-30 11:54:23 +02:00
Benoit Marty
07446d2d41 Embedded if 2020-09-30 11:50:07 +02:00
Benoit Marty
14162ecaa0 Add missing case 2020-09-30 11:47:37 +02:00
Benoit Marty
2f054cd438 Fix mistake 2020-09-30 11:45:21 +02:00
Benoit Marty
b5311aa3df Simple code 2020-09-30 11:42:07 +02:00
Valere
3642ca5b4a cleaning 2020-09-30 11:05:06 +02:00
Valere
2908a5d345 Added first ui bootstrap test 2020-09-30 10:13:59 +02:00
Benoit Marty
d225fb7df0 Update Changelog 2020-09-30 10:08:26 +02:00
Onuray Sahin
5d18a7cc82 Lint fixes. 2020-09-30 10:07:20 +02:00
Onuray Sahin
07976988d9 Use RoomSummary to check if the room is direct. 2020-09-30 10:07:20 +02:00
Onuray Sahin
2a96b2c68e Differentiate wordings for the room profile screen. 2020-09-30 10:07:20 +02:00
Onuray Sahin
3a9e6fa97f Changelog added. 2020-09-30 10:07:20 +02:00
Onuray Sahin
24fcb3f58f Differentiate wordings for direct rooms. 2020-09-30 10:07:20 +02:00
Benoit Marty
5beaa93437 Merge pull request #2162 from gradle-update/develop
Add workflow for Update Gradle Wrapper Action.
2020-09-30 09:49:00 +02:00
Benoit Marty
415fb3a432 Merge pull request #2186 from vector-im/feature/bma_intent
Finish what has been started on #1376: use Intent.ACTION_GET_CONTENT …
2020-09-30 09:48:10 +02:00
ganfra
2ab2c5c94b Performance tracker: start implementing send tracking 2020-09-29 21:07:58 +02:00
Valere
1e3bdd6a2e Fix test 2020-09-29 18:00:15 +02:00
Cristian Greco
68907ff6c0 Merge remote-tracking branch 'upstream/develop' into develop 2020-09-29 17:40:55 +02:00
Valere
9f26d015ba Update change log
Fixes #2052
2020-09-29 17:07:56 +02:00
Valere
c20517599e Add option to reset 4S if lost pass/key 2020-09-29 17:05:29 +02:00
Benoit Marty
0bb75eed1f Finish what has been started on #1376: use Intent.ACTION_GET_CONTENT instead of Intent.ACTION_OPEN_DOCUMENT for other pickers 2020-09-29 16:41:55 +02:00
Benoit Marty
2b90f1395f Merge pull request #1376 from dkanada/patch-1
Fix gallery intent for certain apps
2020-09-29 16:29:21 +02:00
Benoit Marty
51f225056c Merge branch 'develop' into patch-1 2020-09-29 16:28:58 +02:00
Benoit Marty
7a494db40b Merge pull request #2167 from vector-im/feature/ui_test
Feature/ui test
2020-09-29 16:13:54 +02:00
Benoit Marty
487bbe42a9 Merge branch 'develop' into feature/ui_test 2020-09-29 16:13:44 +02:00
Benoit Marty
ab74f6c1a8 Merge pull request #2165 from vector-im/feature/timeline_scroll_opti
Feature/timeline scroll opti
2020-09-29 16:11:57 +02:00
Benoit Marty
2def7f3910 PR Review 2020-09-29 16:10:54 +02:00
ganfra
11a4704161 Clean files and update CHANGES 2020-09-29 15:42:48 +02:00
ganfra
8bc0afa75e Timeline: add glide preloading 2020-09-29 15:42:21 +02:00
ganfra
3f5b1083f3 Timeline: add a prefetch backward item 2020-09-29 15:42:21 +02:00
Benoit Marty
435724ffa9 Merge pull request #2182 from vector-im/feature/bma_hs_diag
Create a script to help getting public information form any homeserver
2020-09-29 15:39:15 +02:00
Benoit Marty
b14d22550b PR Review
Cleanup and Add command line to run the UI tests
2020-09-29 15:12:25 +02:00
Valere
f79784bc8c Stabilisation
Hide keyboard before entering text
2020-09-29 12:51:27 +02:00
Valere
6ac401db9b Doc + change log 2020-09-29 12:51:27 +02:00
Valere
bc2c345e21 First automated UI tests 2020-09-29 12:51:27 +02:00
Benoit Marty
577f0e0d9a Create a script to help getting public information form any homeserver 2020-09-29 11:38:19 +02:00
Benoit Marty
a3570a69dd Merge pull request #2181 from vector-im/feature/bma_pin_fix
PIN code: request PIN code if phone has been locked
2020-09-29 10:03:02 +02:00
Benoit Marty
77f06b962d PIN code: request PIN code if phone has been locked 2020-09-28 16:57:36 +02:00
Benoit Marty
d0ec5a13f3 Merge pull request #2166 from vector-im/feature/bma_splash_quick_fix
Fix Splash screen layout, especially on small screens
2020-09-28 13:52:03 +02:00
Benoit Marty
1ed0ef0948 Disable animation on title 2020-09-26 12:02:22 +02:00
Benoit Marty
21f1848499 Fix Splash screen layout, especially on small screens 2020-09-26 11:30:13 +02:00
Benoit Marty
6958d114a9 Version++ 2020-09-25 14:09:25 +02:00
Benoit Marty
1bc42959d0 Merge branch 'release/1.0.8' into develop 2020-09-25 14:08:24 +02:00
Benoit Marty
22cfb64348 Prepare release 1.0.8 2020-09-25 14:08:15 +02:00
Benoit Marty
056405939b Merge pull request #2170 from vector-im/feature/bma_fix_wellknown_redirect
Fix crash when wellknown are malformed
2020-09-25 13:56:41 +02:00
Benoit Marty
2dcaabe4c4 Fix crash when wellknown are malformed, or redirect to some HTML content (reported by rageshakes) 2020-09-25 11:25:27 +02:00
Benoit Marty
bbd86661a4 Merge pull request #2159 from vector-im/feature/bma_pin_settings
Feature/bma pin settings
2020-09-24 17:16:05 +02:00
Benoit Marty
d684c11c65 Iterate on wording 2020-09-24 15:14:08 +02:00
Benoit Marty
a2fb6d5664 Split long line 2020-09-24 12:47:58 +02:00
Benoit Marty
31029e90cc Fix test compilation issue (no detected since Olm was not available) 2020-09-24 12:46:14 +02:00
Benoit Marty
2e95c78f4e Iterate on wording 2020-09-24 12:40:37 +02:00
Cristian Greco
62f620f79b Add workflow for Update Gradle Wrapper Action.
This action keeps Gradle Wrapper up-to-date to the latest release. It
will run every day at midnight (UTC) and create a pull request if a new
Gradle version is available. The updated Wrapper script is validated
(with checksum verification) during the update process, and the Wrapper
is setup so that it will validate the Gradle binary itself on first run
of the new version.

Signed-off-by: Cristian Greco <cristian@regolo.cc>
2020-09-24 11:19:28 +02:00
Benoit Marty
f271968238 Upgrade library PFLockScreen-Android 2020-09-24 08:20:17 +02:00
Benoit Marty
27d3a36c1b Use same animation for all Fragment transaction 2020-09-23 22:12:02 +02:00
Benoit Marty
dfa0308db6 Pin code: user has to enter pin code twice (#2005) 2020-09-23 21:58:21 +02:00
Benoit Marty
299bcc2bc7 Kill the task if PinActivity is cancelled 2020-09-23 21:58:21 +02:00
Benoit Marty
03c66315cb Ganfra's review 2020-09-23 21:58:21 +02:00
Benoit Marty
9f154748ae Avoid using 1, prefer %d (for translation) 2020-09-23 21:58:21 +02:00
Benoit Marty
5eb66c4617 Small fix and avoid using 1, prefer %d (for translation) 2020-09-23 21:58:21 +02:00
Benoit Marty
44b2673848 PIN: Add a setting to hide notification content when PIN code is configured 2020-09-23 21:58:21 +02:00
Benoit Marty
a6cf2b0685 First test if resultCode == Activity.RESULT_OK 2020-09-23 21:57:58 +02:00
Benoit Marty
b8c350488b Avoid code duplication and let the Activity manage the Fragments 2020-09-23 21:57:58 +02:00
Benoit Marty
fb74628aa8 Protect access to pin code setting, and so remove protection to disable the pin code 2020-09-23 21:57:58 +02:00
Benoit Marty
fdedfc954c PIN Code Improvements. Add more settings (#1985)
- enable/disable biometrics
- enbale/disable grace period
2020-09-23 21:57:58 +02:00
Benoit Marty
b8cbafa75d PIN: move setting to a dedicated screen (no other change) 2020-09-23 21:57:36 +02:00
Benoit Marty
9ab053d702 Merge pull request #2145 from vector-im/feature/login_ui
Login ui
2020-09-23 17:00:28 +02:00
Benoit Marty
6e2c733319 Fix lint issue (MissingConstraints). Use a simple FrameLayout 2020-09-23 16:59:42 +02:00
Benoit Marty
ad2191a76e Fix scrolling issue.
Sign in and log in tested ok
2020-09-23 16:59:42 +02:00
Benoit Marty
ecc189aeac Restore logo on login screens
This reverts commit 4cc3e87d64.
2020-09-23 16:59:23 +02:00
Benoit Marty
34d2c3d391 Merge pull request #2152 from vector-im/feature/various_fixes
Redcude requested permission to access file on the phone
2020-09-23 16:57:20 +02:00
Benoit Marty
1699a57850 Merge branch 'develop' into feature/various_fixes 2020-09-23 16:56:13 +02:00
Benoit Marty
ea9b99b38b Merge pull request #2146 from vector-im/feature/outdated_warning
Allow using an outdated homeserver, at user's risk (#1972)
2020-09-23 16:25:23 +02:00
Benoit Marty
8edecf5937 Allow using an outdated homeserver, at user's risk (#1972)
Just warn the user using a non blocking popup
2020-09-23 16:25:01 +02:00
Benoit Marty
cede7b1dc1 Merge pull request #2155 from vector-im/feature/bma_show_timestamp
Add a setting to show timestamp for all messages (#2123)
2020-09-23 16:21:44 +02:00
Benoit Marty
1464f5aa02 Merge branch 'develop' into feature/bma_show_timestamp 2020-09-23 16:21:36 +02:00
Benoit Marty
5ab7ec0bc8 Merge pull request #2154 from vector-im/feature/bma_user_color_cache
Use cache for user color
2020-09-23 16:20:37 +02:00
Benoit Marty
7f85331448 Add a setting to show timestamp for all messages (#2123) 2020-09-22 18:40:37 +02:00
Benoit Marty
7c063972ac Use cache for user color 2020-09-22 17:05:25 +02:00
Benoit Marty
bd72c0ca8d Merge pull request #2153 from vector-im/feature/wl
Feature/wl
2020-09-22 16:04:08 +02:00
Benoit Marty
91fe308113 Import SAS strings 2020-09-22 15:39:56 +02:00
Benoit Marty
78a76a8038 Remove from string resource 2020-09-22 15:38:37 +02:00
Benoit Marty
759974d9a8 Format resource 2020-09-22 15:33:58 +02:00
Benoit Marty
00a3e802fc Merge pull request #2151 from RiotTranslateBot/weblate-element-android-element-app
Update from Weblate
2020-09-22 15:29:43 +02:00
Benoit Marty
160c1b49a1 It work on on Android 10, to check on Android 5 2020-09-22 14:58:47 +02:00
Benoit Marty
5b1737ae46 It work on on Android 10, to check on Android 5 2020-09-22 14:58:47 +02:00
Benoit Marty
fee7701d26 Better management of requested permissions (#2048) 2020-09-22 14:58:47 +02:00
Benoit Marty
1e5122f741 Rename ids 2020-09-22 14:58:25 +02:00
Weblate
d6ba653c21 Merge branch 'origin/develop' into Weblate. 2020-09-22 12:55:48 +00:00
LinAGKar
51b1d1fa87 Translated using Weblate (Swedish)
Currently translated at 100.0% (1872 of 1872 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/sv/
2020-09-22 12:55:38 +00:00
Marcelo Filho
4249d9d906 Translated using Weblate (Portuguese (Brazil))
Currently translated at 98.7% (1848 of 1872 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/pt_BR/
2020-09-22 12:55:38 +00:00
Kahina Messaoudi
a7e33e9c0a Translated using Weblate (Kabyle)
Currently translated at 99.8% (1868 of 1872 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/kab/
2020-09-22 12:55:38 +00:00
@a2sc:matrix.org
7a2e70ee2d Translated using Weblate (German)
Currently translated at 99.9% (1870 of 1872 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/de/
2020-09-22 12:55:37 +00:00
Priit Jõerüüt
416c153d2e Translated using Weblate (Estonian)
Currently translated at 100.0% (1872 of 1872 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/et/
2020-09-22 12:55:37 +00:00
Benoit Marty
23d911cc2c Merge pull request #2135 from vector-im/feature/safe_workers
Create parent class for all MatrixWorker
2020-09-22 14:35:15 +02:00
Benoit Marty
d868ef0168 Create parent class for all MatrixWorker 2020-09-22 12:06:01 +02:00
Benoit Marty
48b10e6d08 Merge pull request #2139 from enzingerm/callbuttons
Visually disable call buttons/prohibit calling on insufficient permissions
2020-09-21 21:24:36 +02:00
Benoit Marty
4d9bd57336 Fix compilation issue after merge 2020-09-21 21:20:06 +02:00
Benoit Marty
30ab6d5ee7 Merge pull request #2147 from vector-im/feature/quick_fix
Safe call to awaitCallback
2020-09-21 21:18:36 +02:00
Benoit Marty
622faf5471 Merge pull request #2144 from vector-im/feature/fix_filtering_redacted
Feature/fix filtering redacted
2020-09-21 21:17:00 +02:00
ganfra
4d558c5f95 Merge branch 'develop' into feature/fix_filtering_redacted 2020-09-21 20:25:49 +02:00
ganfra
a29ca2ae09 Clean after Benoit's review 2020-09-21 20:25:16 +02:00
Marinus Enzinger
84df86df37 Visually disable call buttons/prohibit calling on insufficient permissions
Signed-off-by: Marinus Enzinger <marinus@enzingerm.de>
2020-09-21 20:20:06 +02:00
Benoit Marty
22e03b14d1 Merge pull request #2138 from enzingerm/widget_permission
Fix widget creation permission check on group calls
2020-09-21 18:32:02 +02:00
Benoit Marty
d1fed08764 Rename tryThis to tryOrNull 2020-09-21 18:26:35 +02:00
Benoit Marty
bca24c0198 Safe call to awaitCallback 2020-09-21 17:51:35 +02:00
Marinus Enzinger
822c47d15f Fix widget creation permission check
Signed-off-by: Marinus Enzinger <marinus@enzingerm.de>
2020-09-21 17:35:44 +02:00
ganfra
03b3b82e0a Update CHANGES 2020-09-21 15:00:53 +02:00
ganfra
8279191339 Fix filtering of redacted events 2020-09-21 14:57:58 +02:00
Benoit Marty
6486b9e5cd Merge pull request #2129 from vector-im/feature/fix_sending_too_long
Feature/fix sending too long
2020-09-21 12:09:13 +02:00
ganfra
4d7b0e3e68 Merge branch 'develop' into feature/fix_sending_too_long 2020-09-21 10:17:52 +02:00
Benoit Marty
66b0e6c68f Merge pull request #2134 from vector-im/feature/fix_regression_verif_dm
Fix / Verification in DM not working
2020-09-21 09:53:26 +02:00
Benoit Marty
69a4312613 Merge branch 'develop' into feature/fix_regression_verif_dm 2020-09-21 09:52:58 +02:00
Benoit Marty
293f867988 Merge pull request #2132 from vector-im/feature/delete_account_data
Add possibility to delete account data and fix bug
2020-09-21 09:52:10 +02:00
LinAGKar
8d2c0dcb48 Translated using Weblate (Swedish)
Currently translated at 100.0% (168 of 168 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.riot.im/projects/element-android/element-sdk/sv/
2020-09-21 05:43:08 +00:00
LinAGKar
bdaecc5b2e Translated using Weblate (Swedish)
Currently translated at 100.0% (1872 of 1872 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/sv/
2020-09-21 05:43:08 +00:00
notramo
fa9ff86ab2 Translated using Weblate (Hungarian)
Currently translated at 100.0% (3 of 3 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.riot.im/projects/element-android/element-store/hu/
2020-09-21 05:43:07 +00:00
Nikita Epifanov
f8e3e33e49 Translated using Weblate (Russian)
Currently translated at 100.0% (1872 of 1872 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/ru/
2020-09-18 16:43:06 +00:00
Priit Jõerüüt
73778f8669 Translated using Weblate (Estonian)
Currently translated at 100.0% (1872 of 1872 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/et/
2020-09-18 16:43:05 +00:00
zeritti
cd5a146f1a Translated using Weblate (Czech)
Currently translated at 100.0% (1872 of 1872 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/cs/
2020-09-18 16:43:05 +00:00
Jeff Huang
3c45b84474 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (1872 of 1872 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/zh_Hant/
2020-09-18 16:43:04 +00:00
ganfra
d4682e504c Clean after Benoit's review 2020-09-18 18:34:40 +02:00
ganfra
2717cca267 Room sending: fix again loss of number type 2020-09-18 18:33:49 +02:00
Valere
28d37f0106 Fix / Verification in DM not working
CheckNumberType crashing on timestamp number
2020-09-18 18:03:09 +02:00
Benoit Marty
30b51449ce Manual import of Megolm keys does back up the imported keys 2020-09-18 15:28:06 +02:00
Benoit Marty
4b66ffcd5b Add "show password" in import Megolm keys dialog 2020-09-18 15:00:36 +02:00
Benoit Marty
0e85a3d59f Add an advanced action to reset an account data entry (there is no API to completely delete it) 2020-09-18 12:49:14 +02:00
ganfra
72f8c8ef72 Clean and update CHANGES 2020-09-18 12:25:29 +02:00
ganfra
b227dc3e5c Sending: remove events from Worker params by fetching in db instead 2020-09-17 18:37:33 +02:00
ganfra
144d0e56cc Realm transaction, use semaphore as suggested by Dominaezzz 2020-09-17 18:31:47 +02:00
Benoit Marty
d29d1ead9b Update issue templates 2020-09-17 16:58:43 +02:00
Benoit Marty
216138394f Version++ 2020-09-17 09:32:35 +02:00
Benoit Marty
719189bd90 Merge branch 'release/1.0.7' into develop 2020-09-17 09:31:35 +02:00
Benoit Marty
01af5115a2 Prepare release 1.0.7 2020-09-17 09:31:09 +02:00
Benoit Marty
7761376306 Merge pull request #2120 from vector-im/feature/post_weblate
Feature/post weblate
2020-09-16 22:28:49 +02:00
Benoit Marty
43f34f6330 Fix issue on test compilation 2020-09-16 20:40:05 +02:00
Benoit Marty
a77069297d Remove R.string.copy, use R.string.action_copy (Fix clash with androidx.preferences private resource) 2020-09-16 19:51:43 +02:00
Benoit Marty
36899af36b Strings has been replaced by a plurals 2020-09-16 19:41:24 +02:00
Benoit Marty
bfa4e00fe7 Hyphen can be replaced with dash 2020-09-16 19:38:08 +02:00
Benoit Marty
4c6bb93eaf ellipsis 2020-09-16 19:36:26 +02:00
Benoit Marty
7e62e8e2cd Fix typo 2020-09-16 19:35:39 +02:00
Benoit Marty
762fd02eb7 Format strings.xml 2020-09-16 19:35:27 +02:00
Benoit Marty
825592e443 Merge pull request #2118 from RiotTranslateBot/weblate-element-android-element-app
Update from Weblate
2020-09-16 19:28:17 +02:00
Benoit Marty
4c6234796d Merge pull request #2111 from vector-im/feature/bma_raw_service
Raw service
2020-09-16 17:55:42 +02:00
Weblate
d6dd2a02b5 Merge branch 'origin/develop' into Weblate. 2020-09-16 15:55:23 +00:00
Benoit Marty
b97aed0723 Ganfra's review 2020-09-16 17:00:14 +02:00
Benoit Marty
1614707943 Ganfra's review 2020-09-16 16:58:27 +02:00
Benoit Marty
88b806326e Merge pull request #2117 from vector-im/feature/event_type_filtering
Feature/event type filtering
2020-09-16 16:28:45 +02:00
Benoit Marty
82bf0dcae9 Create a RawService SDK side, to avoid that the SDK manage client needs 2020-09-16 16:17:10 +02:00
ganfra
0ada12e646 Merge branch 'develop' into feature/event_type_filtering 2020-09-16 15:49:16 +02:00
ganfra
a7ae66e0de Clean files and update CHANGES 2020-09-16 15:48:09 +02:00
ganfra
a1f98eb6bf Allow to filter all room member state events in timeline 2020-09-16 15:36:48 +02:00
Benoit Marty
f882986f7d Remove unused member 2020-09-16 13:43:45 +02:00
linsui
9b8bcc4464 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (3 of 3 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.riot.im/projects/element-android/element-store/zh_Hans/
2020-09-16 03:43:01 +00:00
linsui
487a90fba5 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (1867 of 1867 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/zh_Hans/
2020-09-16 03:43:00 +00:00
ganfra
abb9a0839a Room summary : change displayable events types 2020-09-15 18:13:09 +02:00
Benoit Marty
7a01be9c0d Merge pull request #2109 from vector-im/feature/fragment_transaction
Feature/fragment transaction
2020-09-15 17:44:54 +02:00
Benoit Marty
23aaa58834 Merge pull request #2101 from vector-im/feature/clean_call
Feature/clean call
2020-09-15 17:43:49 +02:00
ganfra
0077091175 Update CHANGES and clean files 2020-09-15 12:56:37 +02:00
ganfra
624a8ff04c Fragment transaction: allow state loss when needed 2020-09-15 12:36:27 +02:00
Benoit Marty
94a7db26f5 Merge pull request #2104 from ginnyTheCat/develop
Only front camera is mirrored now
2020-09-15 12:33:00 +02:00
Benoit Marty
58edc83e11 Merge branch 'develop' into develop 2020-09-15 12:32:31 +02:00
Valere
653d6c6050 Merge pull request #2108 from vector-im/feature/fix_cannnot_play_video
output stream not closed
2020-09-15 10:33:56 +02:00
Valere
5e39d3c6fb output stream not closed 2020-09-15 10:03:49 +02:00
discapacidad5
ebde029cce Translated using Weblate (Spanish)
Currently translated at 100.0% (3 of 3 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.riot.im/projects/element-android/element-store/es/
2020-09-14 23:43:30 +00:00
discapacidad5
dd4391941e Translated using Weblate (Spanish)
Currently translated at 100.0% (168 of 168 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.riot.im/projects/element-android/element-sdk/es/
2020-09-14 23:43:30 +00:00
discapacidad5
6e1fc4d84e Translated using Weblate (Spanish)
Currently translated at 100.0% (1867 of 1867 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/es/
2020-09-14 23:43:29 +00:00
AnonymousWebHacker
86603ed1a6 Translated using Weblate (Spanish)
Currently translated at 100.0% (1867 of 1867 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/es/
2020-09-14 23:43:12 +00:00
ziriSut
a246993df3 Translated using Weblate (Kabyle)
Currently translated at 100.0% (1867 of 1867 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/kab/
2020-09-14 23:43:11 +00:00
random
2e88275766 Translated using Weblate (Italian)
Currently translated at 100.0% (1867 of 1867 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/it/
2020-09-14 23:43:09 +00:00
zeritti
eb2166dd4c Translated using Weblate (Czech)
Currently translated at 100.0% (1867 of 1867 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/cs/
2020-09-14 23:43:08 +00:00
Safa Alfulaij
b088c23ea2 Translated using Weblate (Arabic)
Currently translated at 66.1% (111 of 168 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.riot.im/projects/element-android/element-sdk/ar/
2020-09-14 23:42:59 +00:00
ginnyTheCat
95eb6926d4 Removed unnecessary semicolon 2020-09-14 21:48:26 +02:00
Constantin Wartenburger
b6454b70a6 Only front camera is mirrored now 2020-09-14 21:09:52 +02:00
ziriSut
a61b9ce1e1 Translated using Weblate (Kabyle)
Currently translated at 97.8% (1826 of 1867 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/kab/
2020-09-12 22:39:55 +00:00
Slimane Selyan AMIRI
a265ff3fbe Translated using Weblate (Kabyle)
Currently translated at 97.8% (1826 of 1867 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/kab/
2020-09-12 22:39:53 +00:00
Slimane Selyan AMIRI
fc993cb724 Translated using Weblate (Kabyle)
Currently translated at 97.0% (1811 of 1867 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/kab/
2020-09-12 13:55:32 +00:00
ziriSut
808eb9a12a Translated using Weblate (Kabyle)
Currently translated at 97.0% (1811 of 1867 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/kab/
2020-09-12 13:55:32 +00:00
Kahina Messaoudi
d429800162 Translated using Weblate (Kabyle)
Currently translated at 97.0% (1811 of 1867 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/kab/
2020-09-12 11:25:20 +00:00
Kahina Messaoudi
709e9daf40 Translated using Weblate (Kabyle)
Currently translated at 97.0% (1811 of 1867 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/kab/
2020-09-12 10:50:18 +00:00
ziriSut
82a1b8b4c0 Translated using Weblate (Kabyle)
Currently translated at 97.0% (1811 of 1867 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/kab/
2020-09-12 10:50:17 +00:00
ziriSut
fbe6a2ac80 Translated using Weblate (Kabyle)
Currently translated at 62.5% (1167 of 1867 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/kab/
2020-09-11 23:50:43 +00:00
Kahina Messaoudi
89af162c5a Translated using Weblate (Kabyle)
Currently translated at 62.5% (1167 of 1867 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/kab/
2020-09-11 23:50:42 +00:00
Benoit Marty
1e0bc51fa2 Remove singletin instance from callback param 2020-09-11 17:09:30 +02:00
Benoit Marty
21a42e310f Show branch name in debug build 2020-09-11 16:49:11 +02:00
Benoit Marty
ba163dbf5c Split into 4 files 2020-09-11 16:27:11 +02:00
Benoit Marty
236f7f8e28 Private and typo 2020-09-11 16:25:30 +02:00
Benoit Marty
ab2a55d417 Rename member for code clarity (we also have an AudioManager) 2020-09-11 16:24:30 +02:00
Benoit Marty
2c96a79a08 Merge pull request #2090 from vector-im/feature/fix_silent_call_ringing
Always use loudspeaker while ringing and a headset is not connected
2020-09-11 16:18:02 +02:00
Benoit Marty
61b91f4015 Merge pull request #2080 from vector-im/feature/polling_work
Feature/polling work
2020-09-11 15:39:49 +02:00
yuuki-san
c274f9b23c Translated using Weblate (Slovak)
Currently translated at 100.0% (3 of 3 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.riot.im/projects/element-android/element-store/sk/
2020-09-11 11:43:03 +00:00
yuuki-san
2148411307 Translated using Weblate (Slovak)
Currently translated at 97.6% (164 of 168 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.riot.im/projects/element-android/element-sdk/sk/
2020-09-11 11:43:03 +00:00
Kahina Messaoudi
0c34521791 Translated using Weblate (Kabyle)
Currently translated at 56.3% (1052 of 1867 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/kab/
2020-09-11 11:43:02 +00:00
Slimane Selyan AMIRI
ad969b999d Translated using Weblate (Kabyle)
Currently translated at 56.3% (1052 of 1867 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/kab/
2020-09-11 11:43:02 +00:00
@a2sc:matrix.org
3bb2034254 Translated using Weblate (German)
Currently translated at 100.0% (1867 of 1867 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/de/
2020-09-11 11:42:53 +00:00
Onuray Sahin
ef16485eac Always use loudspeaker while ringing and a headset is not connected. 2020-09-11 13:30:00 +03:00
Benoit Marty
8abff412d0 Create constant for default value and so fix a bug when setting bad value for delay. 2020-09-11 11:56:25 +02:00
Benoit Marty
b26d379d20 Refresh push pref after diagnostic 2020-09-11 11:49:14 +02:00
Benoit Marty
2ed7be243b Restore TestBatteryOptimization 2020-09-11 11:31:37 +02:00
Benoit Marty
7efc58cb42 Avoid duplication of code and fix issue on OnApplicationUpgradeOrRebootReceiver: background starts even if notification are disabled 2020-09-11 11:13:30 +02:00
Benoit Marty
da09df0e42 format 2020-09-11 10:49:54 +02:00
Benoit Marty
e997610ef2 Add documentation from PR description 2020-09-11 10:47:21 +02:00
Benoit Marty
c2be97741e Restore listener after device rotation 2020-09-11 10:12:56 +02:00
Benoit Marty
db977b8109 Simplify Dialog UI and code 2020-09-11 09:43:10 +02:00
Benoit Marty
6f1875c13a Merge pull request #2089 from vector-im/feature/dendrite_test
Show M_WEAK_PASSWORD error in the password field
2020-09-10 18:10:45 +02:00
Benoit Marty
4dc28a9d62 Reorder settings 2020-09-10 18:08:35 +02:00
Benoit Marty
23f13b092f Plurals 2020-09-10 18:00:06 +02:00
Benoit Marty
f4c4e84ffe Fix false positive from code quality analysis 2020-09-10 17:13:11 +02:00
Valere
8ac3af327b Update change log 2020-09-10 17:11:13 +02:00
Valere
3ff475af7a Avoid scheduling alarm until network is back 2020-09-10 17:10:47 +02:00
Valere
43c24e55ab Restart fdroid sync on application boot 2020-09-10 17:10:47 +02:00
Valere
971b425e17 F-Droid background sync modes 2020-09-10 17:10:47 +02:00
Benoit Marty
b9e8d7187c Merge pull request #2075 from vector-im/feature/strict_mode_tracking
Feature/strict mode tracking
2020-09-10 13:46:44 +02:00
Onuray Sahin
926ff80525 Merge pull request #2086 from vector-im/feature/fix_event_read_elsewhere
Clear the notification when the event is read elsewhere
2020-09-10 13:24:57 +03:00
Onuray Sahin
0cba8f3aa1 Start background sync even if the eventId or roomId is null. 2020-09-10 12:08:05 +03:00
Benoit Marty
11fb2bcdfa ktlint... 2020-09-09 13:34:57 +02:00
Benoit Marty
94e43475e2 Merge pull request #2040 from vector-im/feature/date_formatting
Feature/date formatting
2020-09-09 12:16:18 +02:00
Benoit Marty
01a4905dc8 Changelog 2020-09-09 12:15:27 +02:00
Benoit Marty
8cb7260375 Small changes (PR review) 2020-09-09 12:10:46 +02:00
ganfra
dc04d2848d Default pref: make sure to use app context 2020-09-09 11:52:05 +02:00
ganfra
c2880a5832 Strict mode: add a build entry to enable whenever we want to check 2020-09-09 11:52:05 +02:00
ganfra
979c0832cf Use realmSessionProvider in localEchoRepository 2020-09-09 11:52:05 +02:00
ganfra
fa381cc06d Use a singleton for default shared pref 2020-09-09 11:45:47 +02:00
ganfra
f1d902b9ad Enable strict mode and remove some stuff from the main thread 2020-09-09 11:45:47 +02:00
Benoit Marty
b97d922808 ktlint 2020-09-09 11:33:22 +02:00
ganfra
18dcd6b9b1 Date format: add more comments and fix wrong format kind usage 2020-09-09 11:32:56 +02:00
ganfra
c6178e504f Clean files and update CHANGES 2020-09-09 11:32:56 +02:00
ganfra
0ff28c4f50 Date formatting: try to generalise usage of VectorDateFormatter and get proper formatting for Date + Time 2020-09-09 11:32:16 +02:00
ganfra
73ab32fd92 Start reworking date formatting 2020-09-09 11:32:16 +02:00
LinAGKar
925d4d077f Translated using Weblate (Swedish)
Currently translated at 100.0% (3 of 3 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.riot.im/projects/element-android/element-store/sv/
2020-09-09 07:42:55 +00:00
LinAGKar
4581efa4c3 Translated using Weblate (Swedish)
Currently translated at 100.0% (1867 of 1867 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/sv/
2020-09-09 07:42:55 +00:00
Nikita Epifanov
09ccf7cdde Translated using Weblate (Russian)
Currently translated at 100.0% (3 of 3 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.riot.im/projects/element-android/element-store/ru/
2020-09-09 07:42:54 +00:00
Nikita Epifanov
d1fedcac7c Translated using Weblate (Russian)
Currently translated at 100.0% (1867 of 1867 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/ru/
2020-09-09 07:42:54 +00:00
@a2sc:matrix.org
a7ee451705 Translated using Weblate (German)
Currently translated at 100.0% (3 of 3 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.riot.im/projects/element-android/element-store/de/
2020-09-09 07:42:53 +00:00
@a2sc:matrix.org
11fc0fed75 Translated using Weblate (German)
Currently translated at 100.0% (1867 of 1867 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/de/
2020-09-09 07:42:53 +00:00
Priit Jõerüüt
f932100388 Translated using Weblate (Estonian)
Currently translated at 100.0% (1867 of 1867 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/et/
2020-09-09 07:42:52 +00:00
Jeff Huang
f0b582fef0 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (1867 of 1867 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/zh_Hant/
2020-09-09 07:42:51 +00:00
Benoit Marty
bf0b6d738a Version++ 2020-09-08 17:49:26 +02:00
Benoit Marty
83a06b9657 Merge branch 'release/1.0.6' into develop 2020-09-08 17:47:15 +02:00
Benoit Marty
9b5bd3e226 Prepare release 1.0.6 2020-09-08 17:47:03 +02:00
Benoit Marty
135fcab558 Merge pull request #2074 from vector-im/feature/cleanup
Cleanup and documentation after #2047
2020-09-08 17:39:02 +02:00
Benoit Marty
f990600aea Cleanup and documentation after #2047 2020-09-08 12:40:21 +02:00
Benoit Marty
22cd6ae239 Merge pull request #2047 from vector-im/feature/universal_link_navigation
Handle room, user, group, email verification links by converting them to permalinks.
2020-09-08 12:21:54 +02:00
Benoit Marty
00b53ee577 Merge pull request #2053 from vector-im/feature/fix_poll_reply
Feature/fix poll reply
2020-09-08 12:19:32 +02:00
Benoit Marty
f65e96e7b4 Merge pull request #2069 from etherealvisage/develop
Support data-mx-[bg-]color attribute on <font> tags in formatted messages.
2020-09-08 10:09:25 +02:00
Benoit Marty
f98844db02 Privacy 2020-09-08 10:04:27 +02:00
Benoit Marty
c59665e017 typo 2020-09-08 09:52:51 +02:00
Valere
7fe4148384 update change log 2020-09-08 09:51:55 +02:00
Valere
a544ae264b Avoid showing debug notice format for event preview 2020-09-08 09:51:35 +02:00
Valere
c895f87e26 Prevent reply to poll local echo (relation to echo not supported yet) 2020-09-08 09:51:35 +02:00
Onuray Sahin
e65558958d Code review refactoring. 2020-09-08 10:45:00 +03:00
Valere
eb5088c699 Fix / sending poll event appears forever 2020-09-08 09:32:37 +02:00
Benoit Marty
3755d866b1 Merge pull request #2067 from vector-im/feature/contact_crash
Android 6: App crash when read Contact permission is granted (#2064)
2020-09-08 08:46:27 +02:00
ethereal
8291dfc188 Support data-mx-color attribute in <font> tags as well. 2020-09-07 14:52:30 -04:00
Onuray Sahin
c41c91b0e7 Update changelog. 2020-09-07 20:53:11 +03:00
Onuray Sahin
3367ed6765 Fix support of riot.im/develop urls. 2020-09-07 20:02:06 +03:00
Benoit Marty
4654e39417 Update after Ganfra's review 2020-09-07 17:14:09 +02:00
Onuray Sahin
6dd4d4d906 Merge branch 'develop' into feature/universal_link_navigation 2020-09-07 17:48:52 +03:00
Onuray Sahin
cf3fecd425 Changelog added.
Fixes #1795
2020-09-07 17:48:12 +03:00
Benoit Marty
be9a91e3fe Android 6: App crash when read Contact permission is granted (#2064) 2020-09-07 16:33:12 +02:00
Onuray Sahin
fc51097ed8 develop and staging subdomains are added. 2020-09-07 17:17:58 +03:00
Benoit Marty
751c870a4a Merge pull request #2049 from vector-im/feature/image_compression
Image compression
2020-09-07 15:21:26 +02:00
Benoit Marty
de8e325193 Merge branch 'develop' into feature/image_compression 2020-09-07 15:21:15 +02:00
Benoit Marty
e2feac3dde Merge pull request #2056 from vector-im/feature/small_doc_change
Feature/small doc change
2020-09-07 15:19:55 +02:00
Benoit Marty
d7b0b2f785 Merge pull request #2072 from vector-im/feature/weblate_fixes
Weblate fixes and other stuff done during locked Weblate
2020-09-07 15:00:04 +02:00
Benoit Marty
326c863148 Emoji SAS: Step 4: changelog (#1909) 2020-09-07 14:30:21 +02:00
Benoit Marty
c42920d9aa Emoji SAS: Step 3: Make the code compile (#1909) 2020-09-07 14:28:43 +02:00
Benoit Marty
fb5c1bb163 Emoji SAS: Step 2: Run import_sas_strings.py (#1909) 2020-09-07 14:21:10 +02:00
Benoit Marty
4f695a6d8f Emoji SAS: Step 1: Remove legacy strings (#1909) 2020-09-07 14:19:55 +02:00
Benoit Marty
bc389d371d Move string def to app module instead of SDK (#1994) 2020-09-07 13:38:12 +02:00
Benoit Marty
3756c3a191 Fix lint issues 2020-09-07 13:32:32 +02:00
Benoit Marty
9e3caf603d Lint: "..." -> 2020-09-07 13:25:11 +02:00
Benoit Marty
74e2ffc4c4 Format string files 2020-09-07 13:24:33 +02:00
Benoit Marty
6e019dbd44 Merge pull request #2071 from RiotTranslateBot/weblate-element-android-element-app
Update from Weblate
2020-09-07 13:13:13 +02:00
Onuray Sahin
4d7cd7319b Handle new mobile config url. 2020-09-07 12:19:34 +03:00
Weblate
edf7761d49 Merge branch 'origin/develop' into Weblate. 2020-09-07 08:57:45 +00:00
LinAGKar
a590bc96cd Translated using Weblate (Swedish)
Currently translated at 100.0% (235 of 235 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.riot.im/projects/element-android/element-sdk/sv/
2020-09-07 08:57:34 +00:00
Benoit Marty
6c6bba68ff Merge pull request #2062 from vector-im/feature/fix_no_verif
Feature/fix no verif
2020-09-07 10:49:38 +02:00
ethereal
5fbcf348f5 Support data-mx-bg-color attribute on <font> tags in formatted messages.
Signed-off-by: Kestrel Williams-King <ethereal@ethv.net>
2020-09-07 01:13:32 -04:00
LinAGKar
58f5baa5f6 Added translation using Weblate (Swedish) 2020-09-06 06:49:13 +00:00
PPNplus
398dcb1036 Translated using Weblate (Thai)
Currently translated at 66.7% (2 of 3 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.riot.im/projects/element-android/element-store/th/
2020-09-05 09:42:47 +00:00
PPNplus
30e7b761ae Translated using Weblate (Thai)
Currently translated at 4.7% (87 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/th/
2020-09-05 09:42:47 +00:00
Eduardo F
4d105c278b Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (1849 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/pt_BR/
2020-09-05 09:42:44 +00:00
Benoit Marty
f019e4a246 Merge pull request #1995 from notramo/patch-1
Mention thousands of public servers in Play Store
2020-09-04 21:35:10 +02:00
Benoit Marty
4499e34f44 Merge pull request #2030 from vector-im/feature/fix_call_proximity_sensor
Turn the screen off while using ear speaker
2020-09-04 21:25:59 +02:00
Benoit Marty
fd1bb84770 typo 2020-09-04 20:47:19 +02:00
Benoit Marty
ac4c111ad3 Refacto: let's matrixItem be part of the constructor 2020-09-04 20:42:35 +02:00
Benoit Marty
254eb26211 Verification popup won't show 2020-09-04 20:38:32 +02:00
Benoit Marty
f689871fc0 Code symmetry 2020-09-04 18:45:49 +02:00
Benoit Marty
8ead371603 Fix crash with WakeLock 2020-09-04 18:43:59 +02:00
Benoit Marty
8045d61e1f Code cleanup 2020-09-04 18:41:13 +02:00
Onuray Sahin
e790c35270 Use stringProvider. 2020-09-04 17:19:54 +02:00
Onuray Sahin
914ec895ee Use ContextCompat.getSystemService function. 2020-09-04 17:19:54 +02:00
Onuray Sahin
bd05484b2d Initialize fields in the constructor. 2020-09-04 17:19:54 +02:00
Onuray Sahin
7872838056 Changelog added. 2020-09-04 17:19:54 +02:00
Onuray Sahin
b89b3db077 Use proximity manager to turn the screen off while the ear speaker is used. 2020-09-04 17:19:18 +02:00
Onuray Sahin
8e3d83579b Remove attachBaseContext to fix the crash. 2020-09-04 17:19:18 +02:00
Onuray Sahin
96845d31db Proximity sensor implementation. 2020-09-04 17:19:18 +02:00
Benoit Marty
89fa2ece43 Fix compilation issue (I'm tired) 2020-09-04 15:46:16 +02:00
Benoit Marty
82e3adebbc Improve wording and fix typo 2020-09-04 14:23:56 +02:00
Benoit Marty
2490d4d638 Generic email-provider hots. 2020-09-04 14:18:47 +02:00
Benoit Marty
55f04906ac Correct markdown formatting 2020-09-04 14:17:15 +02:00
dkanada
3442ebc1c3 improve gallery intent for certain apps 2020-09-04 21:01:49 +09:00
Onuray Sahin
f186a00515 Support legacy riot.im url. 2020-09-04 14:20:03 +03:00
Benoit Marty
0bd7e40a22 Rework: split long method, extract thumbnail management 2020-09-04 12:33:10 +02:00
Benoit Marty
ad984b26fb Move variable declaration 2020-09-04 12:22:38 +02:00
Benoit Marty
3a659a9f3b Ensure temporary files are deleted even in case of Exception 2020-09-04 12:03:20 +02:00
Benoit Marty
0217e79324 Ensure input stream is closed 2020-09-04 11:08:44 +02:00
Benoit Marty
544bff9f4f For only with Files now 2020-09-04 11:07:06 +02:00
PPNplus
a4fdf1802b Translated using Weblate (Thai)
Currently translated at 1.5% (28 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/th/
2020-09-04 08:43:08 +00:00
LinAGKar
2c4f7d38a2 Translated using Weblate (Swedish)
Currently translated at 100.0% (1849 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/sv/
2020-09-04 08:43:07 +00:00
Peter Vágner
48a9e1ff9f Translated using Weblate (Slovak)
Currently translated at 70.0% (1294 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/sk/
2020-09-04 08:43:06 +00:00
rkfg
c4b6d52657 Translated using Weblate (Russian)
Currently translated at 100.0% (1849 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/ru/
2020-09-04 08:42:43 +00:00
call_xz
43b291d2d0 Translated using Weblate (Japanese)
Currently translated at 49.9% (923 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/ja/
2020-09-04 08:42:43 +00:00
Benoit Marty
b31178683c typo 2020-09-04 09:37:49 +02:00
Benoit Marty
38631eb70e Format 2020-09-04 09:37:10 +02:00
Benoit Marty
6246fd98c3 Cleanup 2020-09-04 09:36:18 +02:00
Benoit Marty
71aa315f2a Cleanup 2020-09-04 09:36:18 +02:00
Benoit Marty
af6a94d08e Support for image compression on Android 10 2020-09-04 09:36:18 +02:00
Valere
f6c7f3eed1 Merge pull request #1889 from vector-im/feature/enhance_big_files
Feature/enhance big files
2020-09-03 17:09:55 +02:00
Valere
e0c5377968 Merge branch 'develop' into feature/enhance_big_files 2020-09-03 17:09:40 +02:00
Benoit Marty
8aada10f0d Show M_WEAK_PASSWORD error in the password field 2020-09-03 15:21:21 +02:00
Valere
0c39495e3f FIx / unneeded code 2020-09-03 15:03:07 +02:00
Valere
7c638798c7 Code review 2020-09-03 14:53:13 +02:00
Benoit Marty
05ec5bde93 Merge pull request #2020 from vector-im/feature/add_email
Add email and phone numbers
2020-09-03 14:33:09 +02:00
Benoit Marty
d2d372d140 Merge pull request #2043 from vector-im/feature/cleanup_after_2002
Cleanup after #2002
2020-09-03 11:15:45 +02:00
Benoit Marty
e9b3ab91a0 Merge pull request #1902 from vector-im/feature/verify_one_session
Feature/verify one session
2020-09-03 11:11:22 +02:00
Benoit Marty
633b12f66d Propose to verify the current session if the 4S contains secret, even if there is no other sessions 2020-09-03 10:00:01 +02:00
Benoit Marty
2efe5a420c Do not propose to verify the current session if there is only one session (#1901) 2020-09-03 09:54:03 +02:00
Benoit Marty
96c7f57ea0 Remove useless member 2020-09-03 09:52:57 +02:00
Benoit Marty
6af879fe2a Rename class 2020-09-03 09:52:14 +02:00
Benoit Marty
b935a6557f Move state to a dedicated file 2020-09-03 09:46:17 +02:00
Valere
8340d5e71f Fix tests 2020-09-03 09:38:40 +02:00
Valere
8103081e0e Fix / Support open and view of sending attachment 2020-09-03 09:31:53 +02:00
Benoit Marty
be3157b6f5 Do not strip new lines. Many tests are not passing, we should work more on it... 2020-09-03 09:24:44 +02:00
Benoit Marty
ae9afcc393 Add test to cover line break 2020-09-03 09:16:37 +02:00
Benoit Marty
e73480c0ef Riot -> Element 2020-09-03 09:06:12 +02:00
Benoit Marty
e02b9b7736 Changelog 2020-09-02 19:02:36 +02:00
Benoit Marty
8c801ae078 API change: encrypted files are now decrypted internally, no need to expose decryptStream() anymore 2020-09-02 19:01:26 +02:00
Onuray Sahin
a151f42495 Handle room, user, group links by converting them to permalinks. 2020-09-02 18:26:08 +03:00
Valere
40f7dc4824 Merge remote-tracking branch 'origin/feature/enhance_big_files' into feature/enhance_big_files 2020-09-02 16:42:54 +02:00
Valere
3b8c61a87e FIx / interceptors and stream closed 2020-09-02 16:06:48 +02:00
Benoit Marty
4ef1f9c4d9 Avoid copy paste of code 2020-09-02 12:47:41 +02:00
Benoit Marty
93cb6bd26e Avoid null type 2020-09-02 12:37:06 +02:00
Benoit Marty
7c33bf2742 Remove Done TODO 2020-09-02 12:31:22 +02:00
Benoit Marty
e5e67fbcbb Internal class and Copyright 2020-09-02 12:29:53 +02:00
Benoit Marty
95219c7934 typo 2020-09-02 12:29:39 +02:00
Benoit Marty
53744982f0 Update Javadoc 2020-09-02 12:29:18 +02:00
Benoit Marty
6d24aa75d0 Format file (no other change) 2020-09-02 12:25:50 +02:00
Benoit Marty
76c79f9f75 Move Base64 methods to a dedicated file 2020-09-02 12:06:21 +02:00
Benoit Marty
28081aa7d2 Cleanup: rename parameters, make some fields private, add Javadoc, fix copy paste error 2020-09-02 12:03:03 +02:00
Benoit Marty
d0532bb9a9 Revert some change from #2002 2020-09-02 09:06:34 +02:00
Benoit Marty
9389cfe7a3 Add comment for history 2020-09-02 09:04:16 +02:00
Benoit Marty
484fd61706 Make MarkdownParserTest tests pass again 2020-09-02 09:04:16 +02:00
Benoit Marty
6c943571fc Remove useless TextContentRenderer 2020-09-01 22:22:27 +02:00
Leon Schmidt
29123ac726 Bugfix/markdown parsing (#2002)
Removed replacing of newlines in already parsed HTML documents

Signed-off-by: Leon Schmidt <mail@leon.wtf>

Co-authored-by: Benoit Marty <benoitm@matrix.org>
2020-09-01 22:02:16 +02:00
Benoit Marty
44cb8cdeca Merge pull request #2042 from vector-im/feature/builkite_location_and_pipeline_location_change
Update of Buildkite configuration
2020-09-01 21:53:11 +02:00
Benoit Marty
9e20f7db1a Update of Buildkite configuration:
New pipeline location: https://github.com/matrix-org/pipelines/blob/master/element-android/pipeline.yml
New build location: https://buildkite.com/matrix-dot-org/element-android
2020-09-01 18:52:03 +02:00
Benoit Marty
971320a56c Restore setting removed by mistake 2020-09-01 18:38:38 +02:00
Benoit Marty
4290d22465 Merge pull request #2035 from vector-im/feature/fix_crashes_attachment_viewer
Crash / Attachment viewer: Cannot draw a recycled Bitmap
2020-09-01 18:33:39 +02:00
Benoit Marty
96a3b25adb Merge branch 'develop' into feature/fix_crashes_attachment_viewer 2020-09-01 18:32:55 +02:00
Valere
3dc69b60c4 Fix / Log could leak file name 2020-09-01 17:31:54 +02:00
Benoit Marty
bdde638967 Merge pull request #2028 from vector-im/feature/relax_is_discovery
Relax IS dicovery
2020-09-01 15:39:28 +02:00
Benoit Marty
8157644ff8 Merge pull request #2014 from vector-im/feature/fix_call_sound_device
Fix: Loudspeaker is always used
2020-09-01 15:33:06 +02:00
ziriSut
4008339963 Translated using Weblate (Kabyle)
Currently translated at 56.7% (1049 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/kab/
2020-09-01 13:08:35 +00:00
Benoit Marty
c6bd6c17fc Auto review 2020-09-01 14:55:12 +02:00
Benoit Marty
1a452a6cd7 Improve error for non supported SSO flow to delete device or add MSISDN 2020-09-01 12:58:53 +02:00
Benoit Marty
35f854de5d Also request focus (keyboard is not shown on my device :/) 2020-09-01 10:45:48 +02:00
Benoit Marty
99343294c6 Rename class 2020-09-01 10:09:28 +02:00
Benoit Marty
56261bd741 Add a trick to reset EditText field when recycled. 2020-09-01 10:07:04 +02:00
Benoit Marty
1d53b48c8a Inline wrong token error 2020-08-31 23:11:58 +02:00
Benoit Marty
5594489b69 Optimisation and cleanup 2020-08-31 22:20:59 +02:00
Benoit Marty
ddb858380e Code quality 2020-08-31 21:46:55 +02:00
Benoit Marty
bf5c1e9d8f Add phone numbers to account 2020-08-31 20:53:37 +02:00
Benoit Marty
931eeac548 Add MSISDN (WIP) 2020-08-31 18:07:25 +02:00
Valere
f34c5d6674 Crash / Attachment viewer: Cannot draw a recycled Bitmap 2020-08-31 17:50:17 +02:00
Benoit Marty
9c05efa15d Fix migration issue. Also do not delete Realm file in case of migration issue when debugging. 2020-08-31 16:46:56 +02:00
Benoit Marty
bd12c89a3c Move the DB version number to the Migration class, I think it has more sense. Also increase the value. 2020-08-31 16:29:34 +02:00
Valere
bf4f869524 rebase fix 2020-08-31 16:25:40 +02:00
Valere
dd09c4a72d post rebase fix 2020-08-31 16:21:27 +02:00
Valere
55dcba6f36 Fix progress of message with attachment 2020-08-31 16:21:27 +02:00
Valere
4e7790966f Always use temp file before sending 2020-08-31 16:21:27 +02:00
Valere
bfcbb9ff4f Rebase post matrix sdk package renaming 2020-08-31 16:21:27 +02:00
Benoit Marty
cc57a73f23 Cleanup and split long lines 2020-08-31 16:20:12 +02:00
Valere
d6f96e3d64 Fix test + cleaning 2020-08-31 16:20:12 +02:00
Valere
5f76f182f6 Fix clear glide in recycler view 2020-08-31 16:20:12 +02:00
Valere
31eccf5f1c Cleaning 2020-08-31 16:20:12 +02:00
Valere
9d2ea19d7d Upgrade to worker 2.4.0 2020-08-31 16:20:12 +02:00
Valere
a888e1e80e Support cancel sending and resend event with attachments
Avoid auto retry for medium and big files
2020-08-31 16:20:12 +02:00
Valere
8b8855d2d5 FIx / Audio icon not shown after download 2020-08-31 16:20:12 +02:00
Valere
de53166193 Use file service in glide loader (avoid re-dl after send) 2020-08-31 16:20:12 +02:00
Valere
caf0ac1c9f Add event sending indicator for attachment 2020-08-31 16:20:12 +02:00
Valere
299cd9ced3 Fix / preview/edit was shown for movies and gif 2020-08-31 16:20:12 +02:00
Valere
11c8da3717 Improve upload/dl mem for big files + report ecryption progress 2020-08-31 16:20:12 +02:00
Benoit Marty
e309b30203 Implement: Adding MSISDN (WIP) 2020-08-31 16:16:18 +02:00
Benoit Marty
5a21249022 Doc: Adding MSISDN 2020-08-31 15:08:59 +02:00
Benoit Marty
3c3c51e6fd Doc: more generic to handle MSISDN 2020-08-31 14:48:48 +02:00
Benoit Marty
ee3e10a4b0 Add threePid: improve UI for phone numbers 2020-08-31 14:46:05 +02:00
Benoit Marty
e92cf38cde Add threePid: improve UX (remove dialog) 2020-08-31 14:30:47 +02:00
Benoit Marty
dbd080ca6c Merge pull request #2018 from vector-im/feature/moar_sonar_fixes
Feature/moar sonar fixes
2020-08-31 12:10:00 +02:00
Valere
aedcf3006a Relax IS dicovery
fixes #2027
2020-08-31 12:08:37 +02:00
LinAGKar
6a475ae85c Translated using Weblate (Swedish)
Currently translated at 100.0% (1849 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/sv/
2020-08-30 07:42:56 +00:00
ziriSut
0ad637fa16 Translated using Weblate (Kabyle)
Currently translated at 100.0% (235 of 235 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.riot.im/projects/element-android/element-sdk/kab/
2020-08-30 07:42:56 +00:00
ziriSut
ee98a2da03 Translated using Weblate (Kabyle)
Currently translated at 54.1% (1001 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/kab/
2020-08-30 07:42:55 +00:00
Balázs Meskó
183d928e21 Translated using Weblate (Hungarian)
Currently translated at 100.0% (1849 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/hu/
2020-08-30 07:42:43 +00:00
Rww Folo
807c6f0cb5 Added translation using Weblate (Bengali (Bangladesh)) 2020-08-29 15:53:08 +00:00
Kahina Messaoudi
72bb140b70 Translated using Weblate (Kabyle)
Currently translated at 41.3% (763 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/kab/
2020-08-29 13:46:02 +00:00
ziriSut
a5678a752b Translated using Weblate (Kabyle)
Currently translated at 41.3% (763 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/kab/
2020-08-29 13:46:02 +00:00
Benoit Marty
58938a239e Format phone number 2020-08-28 19:07:41 +02:00
Benoit Marty
da4695ff2a Improve UI of threePid screen 2020-08-28 18:35:04 +02:00
Benoit Marty
9fecc1b992 Reduce button width 2020-08-28 18:05:59 +02:00
Benoit Marty
e8e1330cd5 Cleanup 2020-08-28 18:05:07 +02:00
Benoit Marty
1af45ede62 Add some guard, and allow to cancel adding 3pid 2020-08-28 17:55:38 +02:00
Benoit Marty
f6f9373aeb Cleanup 2020-08-28 17:06:17 +02:00
Benoit Marty
36a9b80040 i18n for M_THREEPID_AUTH_FAILED 2020-08-28 17:05:40 +02:00
Benoit Marty
175a5ab824 List phone numbers and emails added to the Matrix account, and add Email to account (#44) 2020-08-28 16:45:09 +02:00
Benoit Marty
46d3608ccb RiotX -> Element 2020-08-28 11:25:16 +02:00
Benoit Marty
b11eced4f1 Fix a refresh problem on the user avatar 2020-08-28 11:12:29 +02:00
Benoit Marty
66dfcbc2f8 Add documentation on the flows 2020-08-28 10:59:51 +02:00
Benoit Marty
71de2d9adc Update README.md 2020-08-28 09:23:55 +02:00
Benoit Marty
3f30636808 Matrix SDK is now exported 2020-08-28 09:23:08 +02:00
Benoit Marty
ee9c73fde1 Sonar: rename variables and parameter to follow naming convention 2020-08-28 08:58:57 +02:00
Onuray Sahin
7d76264b25 Merge branch 'develop' into feature/fix_call_sound_device 2020-08-28 02:53:46 +03:00
Marcelo Filho
22771a84f1 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (235 of 235 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.riot.im/projects/element-android/element-sdk/pt_BR/
2020-08-27 22:42:34 +00:00
Marcelo Filho
a107bdd849 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (1849 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/pt_BR/
2020-08-27 22:42:34 +00:00
random
9fbf97f4cb Translated using Weblate (Italian)
Currently translated at 100.0% (1849 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/it/
2020-08-27 22:42:34 +00:00
Tirifto
812563f68b Translated using Weblate (Esperanto)
Currently translated at 25.5% (471 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/eo/
2020-08-27 22:42:33 +00:00
Benoit Marty
d3f50ee6c3 Fix a crash that would occur if it was not dead code 2020-08-27 22:46:30 +02:00
Benoit Marty
9dbe9c7286 Typo in comment 2020-08-27 22:44:55 +02:00
Benoit Marty
fbcc7aa211 Merge pull request #1993 from vector-im/feature/fix_call_in_background
Don't pause the sync thread if there is an active or pending call.
2020-08-27 22:41:46 +02:00
Benoit Marty
a0af769d7c Merge pull request #2016 from vector-im/feature/sonar_fixes
Sonar fixes
2020-08-27 21:39:56 +02:00
Benoit Marty
ef4f930ba2 Don't pause the sync thread if there is an active or pending call.
But pause the sync thread when there is no active call and the app is the background.
Authors: Onuray, I just rebased and squashed all the commit
2020-08-27 18:20:06 +02:00
Benoit Marty
8369003bdf Sonar: rename project name and project key 2020-08-27 18:16:29 +02:00
Benoit Marty
02145eaa06 Github repository has been renamed 2020-08-27 18:16:29 +02:00
Benoit Marty
a857d8e306 Fix bugs detected by sonar 2020-08-27 18:16:29 +02:00
Benoit Marty
cb64f472fe Remove commented out code and useless code 2020-08-27 18:15:53 +02:00
Benoit Marty
cd28ad4c07 Remove dead code (QrCode animation) 2020-08-27 18:15:53 +02:00
Benoit Marty
b69616117f Sonar: skip project diff-match-patch 2020-08-27 18:15:53 +02:00
Benoit Marty
59fa2e28c2 Fix sonar analysis version name issue 2020-08-27 18:15:53 +02:00
Benoit Marty
0f1e348ac4 Merge pull request #2010 from vector-im/feature/fix_send_room_v6
Feature/fix send room v6
2020-08-27 18:14:58 +02:00
Benoit Marty
67bde947f9 Merge pull request #2009 from vector-im/feature/joining_room
Feature/joining room
2020-08-27 18:11:42 +02:00
Onuray Sahin
d9009540dd Don't try to use bluetooth headset if it is not connected. 2020-08-27 16:43:11 +03:00
ganfra
28a1cf6982 Join room: clean up after benoit's remarks 2020-08-27 11:44:21 +02:00
ganfra
9c1c9f96e1 Room v6: finish cleaning up 2020-08-27 10:34:40 +02:00
aevw
7657c0f905 Translated using Weblate (Portuguese (Brazil))
Currently translated at 99.9% (1848 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/pt_BR/
2020-08-27 00:29:21 +00:00
Marcelo Filho
d8a0142aee Translated using Weblate (Portuguese (Brazil))
Currently translated at 99.9% (1848 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/pt_BR/
2020-08-27 00:29:20 +00:00
strix aluco
eddc681d64 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (3 of 3 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.riot.im/projects/element-android/element-store/uk/
2020-08-26 20:42:44 +00:00
vejetaryenvampir
87a97bc8ec Translated using Weblate (Turkish)
Currently translated at 64.4% (1191 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/tr/
2020-08-26 20:42:44 +00:00
LinAGKar
ae81ea2bbc Translated using Weblate (Swedish)
Currently translated at 100.0% (1849 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/sv/
2020-08-26 20:42:44 +00:00
Marcelo Filho
90e580245a Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (235 of 235 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.riot.im/projects/element-android/element-sdk/pt_BR/
2020-08-26 20:42:44 +00:00
aevw
8372c9e3ed Translated using Weblate (Portuguese (Brazil))
Currently translated at 99.7% (1843 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/pt_BR/
2020-08-26 20:42:43 +00:00
Marcelo Filho
1fcb8d712b Translated using Weblate (Portuguese (Brazil))
Currently translated at 99.7% (1843 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/pt_BR/
2020-08-26 20:42:42 +00:00
Imre Kristoffer Eilertsen
9761566b28 Translated using Weblate (Norwegian Bokmål)
Currently translated at 44.1% (815 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/nb_NO/
2020-08-26 20:42:41 +00:00
Kahina Messaoudi
f26c58fa22 Translated using Weblate (Kabyle)
Currently translated at 100.0% (3 of 3 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.riot.im/projects/element-android/element-store/kab/
2020-08-26 20:42:31 +00:00
Tirifto
6d73f7b767 Translated using Weblate (Esperanto)
Currently translated at 25.1% (465 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/eo/
2020-08-26 20:42:31 +00:00
ganfra
3c0177c2dd Update CHANGES 2020-08-26 19:25:20 +02:00
ganfra
dc4135b506 Remove unnecessary code now we have an other way to keep number types 2020-08-26 19:21:41 +02:00
ganfra
cefdbe1d08 Add CheckNumberType in json to fix sending in room v6 2020-08-26 19:21:14 +02:00
Benoit Marty
95e80f0263 Merge pull request #2001 from vector-im/feature/mention_display_name
Fix mention display name
2020-08-26 17:35:23 +02:00
Benoit Marty
013f51f0c4 Merge branch 'develop' into feature/mention_display_name 2020-08-26 17:35:16 +02:00
Benoit Marty
75911ba4c0 Merge pull request #2008 from vector-im/feature/sas_emoji
Create a script to import SAS strings (#1909)
2020-08-26 17:34:43 +02:00
Benoit Marty
b3edc439cf Merge pull request #1997 from vector-im/feature/switch_language
Switch language and font size settings fixes
2020-08-26 17:34:26 +02:00
Benoit Marty
7ef08579ef Merge branch 'develop' into feature/switch_language 2020-08-26 17:34:17 +02:00
ganfra
b39a86edbd Merge branch 'develop' into feature/joining_room 2020-08-26 17:06:31 +02:00
ganfra
9c151417a8 Update CHANGES 2020-08-26 17:03:51 +02:00
ganfra
5d8d9cb19c Clean files 2020-08-26 17:02:24 +02:00
ganfra
b986bfd509 Permalink: handle via parameters 2020-08-26 16:37:48 +02:00
Benoit Marty
28ae10a4aa Merge pull request #2007 from vector-im/feature/icons
Feature/icons
2020-08-26 16:04:36 +02:00
Benoit Marty
39fa7d850a Merge branch 'develop' into feature/icons 2020-08-26 16:04:27 +02:00
Benoit Marty
25ea221d47 Create a script to import SAS strings (#1909)
It will be run at the next Weblate sync, since we have to remove previous translations
2020-08-26 16:02:58 +02:00
Benoit Marty
a4e495edd3 Merge pull request #2006 from vector-im/feature/long_click
Add long click gesture to copy userId, user display name, room name, …
2020-08-26 13:23:31 +02:00
Benoit Marty
8b009304ad Merge pull request #2004 from vector-im/feature/fix_ucrop
Increase version of uCrop library which supports Android 10.
2020-08-26 13:22:56 +02:00
Benoit Marty
249f268fb5 Fix bad color for settings icon on Android < 24 (#1786) 2020-08-26 12:55:49 +02:00
Benoit Marty
9f3f981ab0 Use cached Views 2020-08-26 12:54:01 +02:00
Benoit Marty
ef912e066b Remove unused resource 2020-08-26 12:29:46 +02:00
Benoit Marty
d014872e3b Add long click gesture to copy userId, user display name, room name, room topic and room alias (#1774) 2020-08-26 11:57:27 +02:00
Onuray Sahin
776d892d27 Increase version of uCrop library which supports Android 10. 2020-08-26 12:27:12 +03:00
ganfra
9970398cf2 Join room: add "UnknownItem" to public room list 2020-08-25 20:20:14 +02:00
Benoit Marty
a5f537f251 Merge pull request #1996 from johnjohndoe/file-extensions
Use File extension functions to make code more concise.
2020-08-25 18:09:00 +02:00
Benoit Marty
6376ba2516 Improve wording (visible in debug screen) 2020-08-25 17:48:12 +02:00
Benoit Marty
5e0fc3e17f Rename class 2020-08-25 17:34:43 +02:00
Benoit Marty
1a068ee191 Add more tests 2020-08-25 17:34:02 +02:00
Benoit Marty
8226f60fad Refactor test to avoid duplicated code 2020-08-25 17:31:51 +02:00
Benoit Marty
2e618999d9 Words containing my name should not trigger notifications (Fixes #1781)
It adds a specific behavior for rule with id RuleIds.RULE_ID_CONTAIN_USER_NAME
2020-08-25 17:26:54 +02:00
Benoit Marty
bf7a096a18 Refactor: Remove duplicated declaration for Actions 2020-08-25 17:01:55 +02:00
Benoit Marty
0d9885a1e0 Refactor: Remove duplicated declaration for RuleIds 2020-08-25 16:53:12 +02:00
Benoit Marty
aca8fd7f3d Refactor: Kotlin style 2020-08-25 16:18:44 +02:00
Benoit Marty
f5ea4fb6ac Refactor: Extract method to dedicated files 2020-08-25 16:15:42 +02:00
Benoit Marty
7b5c74f81c Refactor: Condition is now an interface 2020-08-25 16:14:14 +02:00
Benoit Marty
558e11a364 Refactor: move Kind to its own file 2020-08-25 16:01:34 +02:00
Weblate
3d5b3c65de Merge branch 'origin/develop' into Weblate. 2020-08-25 11:15:37 +00:00
LinAGKar
ed9e590498 Translated using Weblate (Swedish)
Currently translated at 100.0% (1849 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/sv/
2020-08-25 11:15:37 +00:00
tctovsli
70fda1009b Translated using Weblate (Norwegian Bokmål)
Currently translated at 33.1% (612 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/nb_NO/
2020-08-25 11:15:36 +00:00
Kahina Messaoudi
ceae1f1ad8 Translated using Weblate (Kabyle)
Currently translated at 25.2% (466 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/kab/
2020-08-25 11:15:33 +00:00
ganfra
8f1eff8782 Start reusing RoomPreview for joining room not joined 2020-08-25 12:35:35 +02:00
ganfra
c1c8c04567 Room detail: Fix roomId not set up when activity is restored 2020-08-25 12:31:55 +02:00
LinAGKar
31b4785a4d Translated using Weblate (Swedish)
Currently translated at 100.0% (1849 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/sv/
2020-08-24 17:43:19 +00:00
Kahina Messaoudi
8e5656729b Translated using Weblate (Kabyle)
Currently translated at 33.3% (1 of 3 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.riot.im/projects/element-android/element-store/kab/
2020-08-24 17:42:31 +00:00
ziriSut
51893fff09 Translated using Weblate (Kabyle)
Currently translated at 99.1% (233 of 235 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.riot.im/projects/element-android/element-sdk/kab/
2020-08-24 17:42:31 +00:00
Kahina Messaoudi
25d8ba2699 Translated using Weblate (Kabyle)
Currently translated at 99.1% (233 of 235 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.riot.im/projects/element-android/element-sdk/kab/
2020-08-24 17:42:31 +00:00
Kahina Messaoudi
fd5e4b78da Translated using Weblate (Kabyle)
Currently translated at 24.6% (454 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/kab/
2020-08-24 17:42:31 +00:00
@a2sc:matrix.org
f45d0122b0 Translated using Weblate (German)
Currently translated at 100.0% (1849 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/de/
2020-08-24 17:42:30 +00:00
aWeinzierl
01cfa4496c Translated using Weblate (German)
Currently translated at 100.0% (1849 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/de/
2020-08-24 17:42:30 +00:00
linsui
82c8b532c0 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (1849 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/zh_Hans/
2020-08-24 17:42:30 +00:00
Slavi Pantaleev
ee7f79b40c Translated using Weblate (Bulgarian)
Currently translated at 72.3% (170 of 235 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.riot.im/projects/element-android/element-sdk/bg/
2020-08-24 17:42:28 +00:00
Benoit Marty
cb7a1bc9c3 Fix FontSize issue (#1483, #1787) 2020-08-24 18:32:08 +02:00
Benoit Marty
52cf4d24d3 Fix switch language issue 2020-08-24 18:32:08 +02:00
Tobias Preuss
ed98613b2d Use File extension functions to make code more concise.
+ This change replaces a few usages of ByteArrayInputStream, FileInputStream,
  FileOutputStream with their equivalent Kotlin extension functions.
2020-08-24 18:01:30 +02:00
notramo
252df0f7a9 Mention thousands of public servers in Play Store 2020-08-24 14:51:10 +00:00
Benoit Marty
116e6fb3c0 Call restart() extension 2020-08-24 15:50:47 +02:00
Benoit Marty
efa3aa5cf8 Stop using internal context of VectorLocal in CallHeadsUpActionReceiver... 2020-08-24 15:08:52 +02:00
Benoit Marty
69e9a79ac1 Inject StringProvider instead of Context 2020-08-24 14:49:42 +02:00
Benoit Marty
96cf5d2105 Cleanup: propoerly inject things to PushRulesFragment and move PushRulesController to its own file 2020-08-24 14:32:43 +02:00
Benoit Marty
f745e22a52 Merge pull request #1983 from vector-im/feature/live_display_name
Make user displayName live in the setting, it should fix #1926
2020-08-24 13:43:08 +02:00
Benoit Marty
50495ef604 Improve algo 2020-08-24 11:12:19 +02:00
Benoit Marty
84854d9382 Add entry in changelog 2020-08-24 10:14:00 +02:00
Benoit Marty
328dc9ea5b Merge pull request #1979 from vector-im/feature/update_dependencies
Update some dependencies, including coroutines for working debugging
2020-08-24 10:11:57 +02:00
Kahina Messaoudi
30b92efcc6 Translated using Weblate (Kabyle)
Currently translated at 24.4% (452 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/kab/
2020-08-23 17:15:04 +00:00
ziriSut
e87bd16b6b Translated using Weblate (Kabyle)
Currently translated at 24.4% (452 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/kab/
2020-08-23 17:15:02 +00:00
Kahina Messaoudi
8b41b014ee Translated using Weblate (Kabyle)
Currently translated at 96.6% (227 of 235 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.riot.im/projects/element-android/element-sdk/kab/
2020-08-23 15:46:17 +00:00
ziriSut
601cf10fb4 Translated using Weblate (Kabyle)
Currently translated at 96.6% (227 of 235 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.riot.im/projects/element-android/element-sdk/kab/
2020-08-23 15:46:16 +00:00
Kahina Messaoudi
f02ee2af27 Translated using Weblate (Kabyle)
Currently translated at 72.3% (170 of 235 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.riot.im/projects/element-android/element-sdk/kab/
2020-08-23 14:38:55 +00:00
ziriSut
c490d6bcd1 Translated using Weblate (Kabyle)
Currently translated at 72.3% (170 of 235 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.riot.im/projects/element-android/element-sdk/kab/
2020-08-23 14:38:55 +00:00
ziriSut
64b6b069a4 Translated using Weblate (Kabyle)
Currently translated at 69.4% (163 of 235 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.riot.im/projects/element-android/element-sdk/kab/
2020-08-23 14:32:38 +00:00
Kahina Messaoudi
edd455a772 Translated using Weblate (Kabyle)
Currently translated at 69.4% (163 of 235 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.riot.im/projects/element-android/element-sdk/kab/
2020-08-23 14:32:38 +00:00
Kahina Messaoudi
a54c1af7cc Translated using Weblate (Kabyle)
Currently translated at 39.6% (93 of 235 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.riot.im/projects/element-android/element-sdk/kab/
2020-08-23 12:09:01 +00:00
ziriSut
9e1fe22c19 Translated using Weblate (Kabyle)
Currently translated at 39.6% (93 of 235 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.riot.im/projects/element-android/element-sdk/kab/
2020-08-23 12:09:01 +00:00
Kahina Messaoudi
bd033ed5f4 Translated using Weblate (Kabyle)
Currently translated at 7.2% (17 of 235 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.riot.im/projects/element-android/element-sdk/kab/
2020-08-23 06:37:58 +00:00
Slimane Selyan AMIRI
2fd9333fb0 Translated using Weblate (Kabyle)
Currently translated at 7.2% (17 of 235 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.riot.im/projects/element-android/element-sdk/kab/
2020-08-23 06:37:57 +00:00
Slimane Selyan AMIRI
6249d5a85e Translated using Weblate (Kabyle)
Currently translated at 0.3% (5 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/kab/
2020-08-23 06:35:09 +00:00
Slimane Selyan AMIRI
385de03f40 Added translation using Weblate (Kabyle) 2020-08-22 18:05:34 +00:00
Slimane Selyan AMIRI
5bfb2c211a Added translation using Weblate (Kabyle) 2020-08-22 18:04:55 +00:00
LinAGKar
7ee4a8fc0a Translated using Weblate (Swedish)
Currently translated at 61.0% (1127 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/sv/
2020-08-22 15:42:55 +00:00
AnonymousWebHacker
c73f544a01 Translated using Weblate (Spanish)
Currently translated at 81.6% (1508 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/es/
2020-08-22 15:42:38 +00:00
Nikita Epifanov
370d57cfbc Translated using Weblate (Russian)
Currently translated at 100.0% (1849 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/ru/
2020-08-22 15:42:28 +00:00
Marcelo Filho
4380d34645 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (3 of 3 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.riot.im/projects/element-android/element-store/pt_BR/
2020-08-22 15:42:27 +00:00
aWeinzierl
471497e721 Translated using Weblate (German)
Currently translated at 99.7% (1843 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/de/
2020-08-22 15:42:27 +00:00
Jeff Huang
16809a53ab Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (1849 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/zh_Hant/
2020-08-22 15:42:26 +00:00
Slavi Pantaleev
6ad0098767 Translated using Weblate (Bulgarian)
Currently translated at 75.4% (1394 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/bg/
2020-08-22 15:42:25 +00:00
Priit Jõerüüt
eea17f0905 Translated using Weblate (Estonian)
Currently translated at 100.0% (1849 of 1849 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/et/
2020-08-22 11:08:31 +00:00
Benoit Marty
bd238dcbfa Make user displayName live in the setting, it should fix #1926 2020-08-21 22:24:29 +02:00
Benoit Marty
20e2b3beb8 Merge pull request #1978 from vector-im/feature/ttl
Improve #1971, especially be robust about system time change
2020-08-21 18:12:35 +02:00
ganfra
1f890324b4 Update some dependencies, including coroutines for working debugging 2020-08-21 17:17:51 +02:00
Benoit Marty
04fa7d9628 Version++ 2020-08-21 17:04:05 +02:00
Benoit Marty
7fd7970ec1 Merge branch 'release/1.0.5' into develop 2020-08-21 17:02:46 +02:00
Benoit Marty
81dece5516 Prepare release 1.0.5 2020-08-21 17:02:32 +02:00
Benoit Marty
52e66b09dc Merge pull request #1977 from vector-im/feature/networkonmainthread
Avoid NetworkOnMainThreadException when setting a user avatar
2020-08-21 16:48:19 +02:00
Benoit Marty
06f4b95dc0 Merge branch 'develop' into feature/networkonmainthread 2020-08-21 16:48:11 +02:00
Benoit Marty
008bc0116d Improve #1971, especially be robust about system time change 2020-08-21 16:36:45 +02:00
Benoit Marty
de728f6c36 Merge pull request #1971 from tzeitlho/turn_fix
Turn fix
2020-08-21 16:28:52 +02:00
Benoit Marty
a8c6678efc Avoid NetworkOnMainThreadException when setting a user avatar 2020-08-21 16:11:22 +02:00
Benoit Marty
35dbab2ff5 Merge pull request #1976 from vector-im/feature/post_weblate_merge
Feature/post weblate merge
2020-08-21 14:47:25 +02:00
Thomas Zeitlhofer
a732d8856b change var -> val according to review comment
Signed-off-by: Thomas Zeitlhofer <tz+github@ze-it.at>
2020-08-21 14:28:18 +02:00
Benoit Marty
80f7ffd7a6 Fix Potential Plurals - 3 2020-08-21 14:19:06 +02:00
Benoit Marty
d86536c949 Fix Potential Plurals (removing unused resource) - 2 2020-08-21 13:07:37 +02:00
Benoit Marty
f84ea0ad5b Fix Potential Plurals - 1 2020-08-21 12:55:15 +02:00
Benoit Marty
28ed6cb3b6 Fix typos reported by Lint 2020-08-21 12:47:39 +02:00
Benoit Marty
927c3e7e94 Update element web url (Fixes #1974) 2020-08-21 12:31:06 +02:00
Benoit Marty
5416f4194c Fix lint issue 2020-08-21 12:27:57 +02:00
Benoit Marty
b09c1e3cbf Format strings 2020-08-21 12:23:25 +02:00
Benoit Marty
66ac03a021 Merge pull request #1975 from RiotTranslateBot/weblate-element-android-element-app
Update from Weblate
2020-08-21 12:16:25 +02:00
Weblate
43d0a11cba Merge branch 'origin/develop' into Weblate. 2020-08-21 09:30:51 +00:00
notramo
a27b22a972 Translated using Weblate (Hungarian)
Currently translated at 100.0% (3 of 3 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.riot.im/projects/element-android/element-store/hu/
2020-08-21 09:30:37 +00:00
Priit Jõerüüt
338c569c0b Translated using Weblate (Estonian)
Currently translated at 89.8% (1649 of 1836 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/et/
2020-08-21 09:30:37 +00:00
Lua
f7db14fb02 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (3 of 3 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.riot.im/projects/element-android/element-store/pt_BR/
2020-08-21 00:42:34 +00:00
Lua
cfd0e00c0c Translated using Weblate (Portuguese)
Currently translated at 44.5% (817 of 1836 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/pt/
2020-08-21 00:42:34 +00:00
Priit Jõerüüt
7c4afd922c Translated using Weblate (Estonian)
Currently translated at 87.4% (1605 of 1836 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/et/
2020-08-21 00:42:34 +00:00
Thomas Zeitlhofer
bd1a0361be Changelog entry for turnserver related fix
Signed-off-by: Thomas Zeitlhofer <tz+github@ze-it.at>
2020-08-20 19:46:20 +02:00
Thomas Zeitlhofer
a7ee7d5bad Renew turnserver credentials when ttl runs out
The previous implementation caches the turnserver response indefinitely.
This breaks VoIP calls as soon as the ttl of the received turnserver
credentials runs out. So, take care to renew the turnserver credentials
by allowing the cache to expire.

Fixes: d8cf44fdc9 ("Simple cache of turn server response")
Signed-off-by: Thomas Zeitlhofer <tz+github@ze-it.at>
2020-08-20 19:43:52 +02:00
Benoit Marty
29e4a64475 Merge pull request #1970 from vector-im/feature/highlight
Highlighted Event when opening a permalink from another room
2020-08-20 19:04:15 +02:00
Benoit Marty
f07bf43ada Merge branch 'develop' into feature/highlight 2020-08-20 19:04:03 +02:00
Onuray Sahin
80551fc0c2 Fix IllegalArgumentException: Receiver not registered: NetworkInfoReceiver (#1961)
Fix IllegalArgumentException: Receiver not registered: NetworkInfoReceiver (#1961)

Co-authored-by: Onuray Sahin <onurays@element.io>
2020-08-20 18:31:03 +02:00
Benoit Marty
2acda2c5da Merge pull request #1962 from vector-im/feature/membership_state_event
A Kick appears has "someone has made no change" (Fixes #1959)
2020-08-20 18:29:23 +02:00
Benoit Marty
9582b9c0fb Merge pull request #1965 from vector-im/feature/share
Share button in rooms gives room ID link without via parameters (#1927)
2020-08-20 18:28:30 +02:00
Benoit Marty
cbe093fe77 Highlighted Event when opening a permalink from another room (Fixes #1033) 2020-08-20 18:20:53 +02:00
Benoit Marty
112a7913d4 Improve (unused) code 2020-08-20 17:57:48 +02:00
Benoit Marty
cab447e44e Add missing copyright 2020-08-20 17:50:43 +02:00
Benoit Marty
fde2bdf304 Create a PermalinkFactory to avoid injecting the service in SDK classes 2020-08-20 17:41:01 +02:00
Benoit Marty
2c90e33ceb Move package 2020-08-20 17:33:55 +02:00
Benoit Marty
af10344b6b Share button in rooms gives room ID link without via parameters (#1927)
Following the algorithm described in #1927
Create a PermalinkService
2020-08-20 17:33:55 +02:00
Benoit Marty
187edbd32a Merge pull request #1968 from vector-im/feature/biometrics
Improve PIN code feature
2020-08-20 17:16:27 +02:00
Benoit Marty
3bce0be96e Merge pull request #1969 from vector-im/feature/dm_creation
DM creation: handled denied federation error
2020-08-20 17:15:44 +02:00
Benoit Marty
828bf44b2b Better handling DM creation when invitees cannot be inviting due to denied federation
As we do not know the created roomId, we cannot add it to the DM list though. But at least the user is informed that a room has been created and won't retry because the screen will be closed.
2020-08-20 15:44:28 +02:00
Benoit Marty
c6c8ef07a6 Fail first (before creating the room) when trying to create a DM without at least one invitee 2020-08-20 15:34:58 +02:00
Benoit Marty
a6150beed2 Stuff added by AS 4.0.1 2020-08-20 15:32:45 +02:00
Benoit Marty
b090468109 Logout after 3 wrong PIN codes 2020-08-20 14:21:24 +02:00
Benoit Marty
4cba1388f9 Add support for biometrics (not only Fingerprint) 2020-08-20 14:11:23 +02:00
Benoit Marty
61caa3474b Merge pull request #1956 from vector-im/feature/fix_package_renaming_issues
Some cleanup after the package renaming thing
2020-08-20 13:58:13 +02:00
Benoit Marty
cd08c919e9 Merge pull request #1963 from vector-im/feature/cleanup
Improve user avatar setting
2020-08-20 13:56:43 +02:00
Benoit Marty
45ca480de1 Ganfra's review 2020-08-20 13:56:23 +02:00
Benoit Marty
95d05a9c28 Make the user's Avatar live in the general settings
Also remove unused class RoomAvatarPreference
2020-08-19 18:32:06 +02:00
Benoit Marty
db9c418622 We are already in a Coroutine scope, we can directly call execute() on the task.
-> It will prevent the callback from being called twice.
2020-08-19 18:04:22 +02:00
Ege Sertçetin
e860062553 Translated using Weblate (Turkish)
Currently translated at 66.7% (2 of 3 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.riot.im/projects/element-android/element-store/tr/
2020-08-19 15:42:50 +00:00
Ege Sertçetin
80fc66e097 Translated using Weblate (Turkish)
Currently translated at 65.0% (1194 of 1836 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/tr/
2020-08-19 15:42:49 +00:00
Peter Vágner
6b89dfdc8d Translated using Weblate (Slovak)
Currently translated at 100.0% (3 of 3 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.riot.im/projects/element-android/element-store/sk/
2020-08-19 15:42:46 +00:00
Marcelo Filho
97fa087496 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (235 of 235 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.riot.im/projects/element-android/element-sdk/pt_BR/
2020-08-19 15:42:46 +00:00
Marcelo Filho
312a5855c6 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (1836 of 1836 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/pt_BR/
2020-08-19 15:42:46 +00:00
Priit Jõerüüt
c8d95f701d Translated using Weblate (Estonian)
Currently translated at 76.4% (1403 of 1836 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/et/
2020-08-19 15:42:45 +00:00
Benoit Marty
9b6c45e112 A Kick appears has "someone has made no change" (Fixes #1959) 2020-08-19 15:54:46 +02:00
Benoit Marty
482a8f1fb8 Merge pull request #1955 from vector-im/feature/fix_unique_filename
Fix save media error: Failed to build unique file
2020-08-19 14:44:37 +02:00
Onuray Sahin
eb109aa755 ktlint fix. 2020-08-19 13:15:42 +03:00
aethralis
4a4a544860 Translated using Weblate (Estonian)
Currently translated at 51.6% (948 of 1836 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/et/
2020-08-18 18:17:42 +00:00
Benoit Marty
72f5f8b64b Merge pull request #1945 from vector-im/feature/update_element_config_file_parsing
Feature/update element config file parsing
2020-08-18 18:31:39 +02:00
Benoit Marty
0a296908a8 Merge branch 'develop' into feature/update_element_config_file_parsing 2020-08-18 18:31:28 +02:00
Benoit Marty
08292c874b Merge pull request #1943 from vector-im/feature/design_quick_win
Feature/design quick win
2020-08-18 18:30:25 +02:00
Benoit Marty
e76c32b74e Add missing copyright mention for PFLockScreen-Android 2020-08-18 18:21:20 +02:00
Benoit Marty
7613073373 Some cleanup after the package renaming thing 2020-08-18 18:15:48 +02:00
Onuray Sahin
2b0051887a Append current time to the filename before saving. 2020-08-18 18:54:59 +03:00
Peter Vágner
413c21505c Translated using Weblate (Slovak)
Currently translated at 100.0% (235 of 235 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.riot.im/projects/element-android/element-sdk/sk/
2020-08-18 09:23:31 +00:00
Benoit Marty
8581d06931 Merge pull request #1948 from tilosp/api-21-cleanup
Remove old code that was used on devices with api level <21
2020-08-18 10:11:15 +02:00
Benoit Marty
9385bd2a10 Merge branch 'develop' into api-21-cleanup 2020-08-18 10:11:02 +02:00
Benoit Marty
131f4d1757 Merge pull request #1949 from tilosp/gradle-wrapper-validation
Official Gradle Wrapper Validation Action
2020-08-18 09:56:36 +02:00
Tilo Spannagel
861b379992 Official Gradle Wrapper Validation Action
See: https://github.com/gradle/wrapper-validation-action

Signed-off-by: Tilo Spannagel <development@tilosp.de>
2020-08-18 00:49:17 +02:00
Tilo Spannagel
87bc0c6c7a Set severity of ObsoleteSdkInt to error
Signed-off-by: Tilo Spannagel <development@tilosp.de>
2020-08-18 00:46:37 +02:00
Nikita Epifanov
5f3d6a6905 Translated using Weblate (Russian)
Currently translated at 100.0% (3 of 3 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.riot.im/projects/element-android/element-store/ru/
2020-08-17 22:42:25 +00:00
Marcelo Filho
ce367f6e17 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (235 of 235 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.riot.im/projects/element-android/element-sdk/pt_BR/
2020-08-17 22:42:25 +00:00
Marcelo Filho
9660e147d4 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (1836 of 1836 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/pt_BR/
2020-08-17 22:42:25 +00:00
call_xz
5c2b4309cf Translated using Weblate (Japanese)
Currently translated at 50.4% (925 of 1836 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/ja/
2020-08-17 22:42:25 +00:00
Tuomas Hietala
788d72d6ca Translated using Weblate (Finnish)
Currently translated at 66.7% (2 of 3 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.riot.im/projects/element-android/element-store/fi/
2020-08-17 22:42:23 +00:00
Priit Jõerüüt
c982ebaca9 Translated using Weblate (Estonian)
Currently translated at 51.1% (938 of 1836 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/et/
2020-08-17 22:42:23 +00:00
linsui
570f5ac375 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (3 of 3 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.riot.im/projects/element-android/element-store/zh_Hans/
2020-08-17 22:42:19 +00:00
Benoit Marty
a9ad3ac4f3 Merge pull request #1930 from yh-gao/best_localized_date_format
Fix date format for some Asian languages (#1928)
2020-08-17 23:57:40 +02:00
Tilo Spannagel
8c7956d935 Remove old code that was used on devices with api level <21
Signed-off-by: Tilo Spannagel <development@tilosp.de>
2020-08-17 21:20:39 +02:00
Benoit Marty
bde77784b9 Add internal 2020-08-17 19:46:44 +02:00
Benoit Marty
f012e23fa9 #1682: changelog 2020-08-17 19:42:21 +02:00
Benoit Marty
112f77c4e0 #1682: try to fetch config.domain.json 2020-08-17 19:39:29 +02:00
Benoit Marty
c11c28b406 #1682: parse "default_server_config" 2020-08-17 19:27:13 +02:00
Benoit Marty
189d2b2c06 Increase again font size 2020-08-17 19:08:32 +02:00
Benoit Marty
497b07b156 Fix color issue in dark and black themes (#961) 2020-08-17 18:02:23 +02:00
Benoit Marty
d74dc2053b Increase Font size on Calling screen (#1643)
And cleanup the layout
2020-08-17 16:48:40 +02:00
Benoit Marty
1b9b18851d Merge pull request #1906 from vector-im/feature/verify_developer_mode
Cleanup temporary code added during developpement
2020-08-17 16:32:28 +02:00
Benoit Marty
ac32d6bb29 Remove /verify command, it was added temporarily 2020-08-17 14:44:56 +02:00
Benoit Marty
1c48ba6b99 Remove actions that have been added only for debug purpose - step 1 2020-08-17 14:44:56 +02:00
Benoit Marty
35a5d9e454 Prevent click on Cross-Signing item when not in developer mode 2020-08-17 14:44:47 +02:00
Benoit Marty
550dcde9b8 Merge pull request #1914 from vector-im/feature/jitsi_native
Feature/jitsi native
2020-08-17 10:54:31 +02:00
Benoit Marty
7049c6e8ac Add Copyrigth notice for Jitsi library 2020-08-17 10:13:19 +02:00
Benoit Marty
9b1c01351c Adding jitsi.md documentation 2020-08-17 10:07:30 +02:00
LinAGKar
204db7b19b Translated using Weblate (Swedish)
Currently translated at 100.0% (3 of 3 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.riot.im/projects/element-android/element-store/sv/
2020-08-16 21:42:28 +00:00
LinAGKar
93294be53e Translated using Weblate (Swedish)
Currently translated at 44.3% (814 of 1836 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/sv/
2020-08-16 21:42:28 +00:00
Marcelo Filho
b06a72f944 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (1836 of 1836 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/pt_BR/
2020-08-16 21:42:21 +00:00
Hubert Chathi
abd478ad3c Translated using Weblate (German)
Currently translated at 100.0% (235 of 235 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.riot.im/projects/element-android/element-sdk/de/
2020-08-16 21:42:21 +00:00
dccs
f91b99ec5e Translated using Weblate (German)
Currently translated at 100.0% (1836 of 1836 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/de/
2020-08-16 21:42:21 +00:00
Priit Jõerüüt
cfee0e4797 Translated using Weblate (Estonian)
Currently translated at 46.2% (849 of 1836 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/et/
2020-08-16 21:42:20 +00:00
Yihong Gao
f9faf9c4d8 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (1836 of 1836 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/zh_Hans/
2020-08-16 21:42:18 +00:00
Yihong Gao
e3b7f167ff Fix date format of some Asian languages (#1928)
With DateFormat.getBestDateTimePattern to generate best
localized pattern.

Signed-off-by: Yihong Gao <yihong.ui@gmail.com>
2020-08-15 18:32:22 -07:00
strix aluco
553e5e7aa0 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (3 of 3 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.riot.im/projects/element-android/element-store/uk/
2020-08-14 22:42:23 +00:00
strix aluco
6016e8f526 Translated using Weblate (Ukrainian)
Currently translated at 41.6% (763 of 1836 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/uk/
2020-08-14 22:42:23 +00:00
rkfg
b2cd350115 Translated using Weblate (Russian)
Currently translated at 99.8% (1833 of 1836 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/ru/
2020-08-14 22:42:23 +00:00
Marcelo Filho
12a1828f04 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (1836 of 1836 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/pt_BR/
2020-08-14 22:42:23 +00:00
Rintan
133fd29a33 Translated using Weblate (Japanese)
Currently translated at 49.2% (903 of 1836 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/ja/
2020-08-14 22:42:23 +00:00
tatuya0902
9b8caf4f83 Translated using Weblate (Japanese)
Currently translated at 49.2% (903 of 1836 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/ja/
2020-08-14 22:42:22 +00:00
random
bbcd02a4c4 Translated using Weblate (Italian)
Currently translated at 100.0% (1836 of 1836 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/it/
2020-08-14 22:42:22 +00:00
notramo
2cdea80fef Translated using Weblate (Hungarian)
Currently translated at 94.1% (1727 of 1836 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/hu/
2020-08-14 22:42:21 +00:00
aWeinzierl
023caf57d1 Translated using Weblate (German)
Currently translated at 100.0% (3 of 3 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.riot.im/projects/element-android/element-store/de/
2020-08-14 22:42:20 +00:00
Priit Jõerüüt
8ae3ffba32 Translated using Weblate (Estonian)
Currently translated at 100.0% (235 of 235 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.riot.im/projects/element-android/element-sdk/et/
2020-08-14 22:42:20 +00:00
Priit Jõerüüt
8b994a1401 Translated using Weblate (Estonian)
Currently translated at 43.8% (805 of 1836 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/et/
2020-08-14 22:42:19 +00:00
Jeff Huang
00615c9882 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (1836 of 1836 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/zh_Hant/
2020-08-14 22:42:15 +00:00
Benoit Marty
e90d18a86b Lint: Ignore error from dropbox-core-sdk-3.0.8 lib, which comes with Jitsi library 2020-08-14 21:33:46 +02:00
Benoit Marty
05ecbf0f86 Build Jitsi lib version android-sdk-2.9.3, commit abcbbbea12e3ef88012b14723bb8cd42dbefc988
And host it in https://github.com/vector-im/jitsi_libre_maven/tree/master/android-sdk-2.9.3
2020-08-14 21:33:25 +02:00
Benoit Marty
85734e3581 Ensure that when user accept permission the native widget is well open
Before we were asking in loop until the sync comes back with the updated account data
2020-08-14 15:48:41 +02:00
Benoit Marty
4f8fd7b994 Benoit's review
- Cleanup
- Force refresh of HomeServerCapabilities
- add some doc
- remove dead code
- remove commented code
- remove duplicated comment
- use getBestName()
- improve code formatting
- Fix isAudioOnly parameter in jitsi url
- Fix layout issue between "Active conference" banner and "Jump to first unread message banner"
- Improve "Active conference" banner
- Remove Calendar permission from Manifest
2020-08-14 15:40:02 +02:00
Benoit Marty
68d128133c Merge pull request #1913 from vector-im/feature/RtlHardcoded
Fix RtlHardcoded issues
2020-08-14 11:47:01 +02:00
Valere
157f22ac2d Update change log 2020-08-14 10:12:55 +02:00
Valere
050ef659b3 Code quality
Fix neg margin + typo in jitsi
2020-08-14 10:10:08 +02:00
Valere
8c150aa3e8 klint 2020-08-14 10:00:02 +02:00
Valere
c911d9c7ff Check native widget permissions 2020-08-14 09:54:58 +02:00
Valere
3ce1e3e5d9 Add/Remove jitsi widget via option menu 2020-08-14 09:45:33 +02:00
Valere
42a24300a1 Initial commit jitsi 2020-08-14 09:31:24 +02:00
Benoit Marty
5a3894036c Merge pull request #1907 from vector-im/feature/display_device_key
Feature/display device key
2020-08-13 20:31:15 +02:00
Benoit Marty
15c9d68175 Merge branch 'develop' into feature/display_device_key 2020-08-13 20:31:07 +02:00
Benoit Marty
4f0111f331 Remove useless layout_marginLeft and layout_marginRight attributes
RtlHardoded: other error

RtlHardoded: paddingLeft / Right

RtlHardoded: other error

Fix RtlHardcoded issues (use `Start` and `End` instead of `Left` and `Right` layout attributes)
2020-08-13 18:49:19 +02:00
Benoit Marty
81a4b5edbc Merge pull request #1905 from vector-im/feature/refresh_device_list
Live sessions list
2020-08-13 17:13:36 +02:00
Benoit Marty
87c903a0fa Merge pull request #1900 from vector-im/feature/improve_ignore_user
Ensure users do not accidentally ignore other users (#1890)
2020-08-13 17:13:14 +02:00
Benoit Marty
3103fe970a Ensure users do not accidentally ignore other users (#1890)
- Wording: use "Ignore" instead of "Block" for consistency across the app and with other Element app
2020-08-13 16:44:32 +02:00
Benoit Marty
5fa22fedbb Cleanup dead code 2020-08-13 16:37:19 +02:00
Benoit Marty
e6f89b0b22 Display device information (name, id and key) in Cryptography setting screen (#1784) 2020-08-13 16:37:19 +02:00
Benoit Marty
d1b6cff663 Revert change (Valere's review) 2020-08-13 16:34:08 +02:00
Benoit Marty
3c8a4b80d2 Add missing Copyright 2020-08-13 16:31:46 +02:00
Benoit Marty
7a2454d816 Fix refreshing of sessions list when another session is logged out
Rx: use distinctUntilChanged() instead of distinct()
2020-08-13 16:27:04 +02:00
Benoit Marty
c9c787b11d Rename method
to merge
2020-08-13 16:24:51 +02:00
Benoit Marty
76788892c0 Merge pull request #1911 from vector-im/feature/rename_sdk_package
Rename package of SDK modules
2020-08-13 16:17:29 +02:00
Benoit Marty
cdc60cd453 Add missing Copyright 2020-08-13 15:41:05 +02:00
Benoit Marty
894f5b9ed3 Add copyright to SDK Kotlin source file 2020-08-13 15:41:05 +02:00
Benoit Marty
8f1adf6316 Ensure deserialization of previously stored objects still works
After package has been renamed from `im.vector.matrix.android` to `org.matrix.android.sdk`
2020-08-13 15:41:05 +02:00
Benoit Marty
11b5512cb8 Rename package of SDK modules 2020-08-13 12:50:58 +02:00
Benoit Marty
e3bf4c1e7b Merge pull request #1912 from vector-im/feature/post_weblate_sync
Post weblate sync
2020-08-13 12:47:22 +02:00
Benoit Marty
2d3359b70e Rename files, Weblate is expecting _ rather than - 2020-08-13 12:20:44 +02:00
Benoit Marty
a92e9040bf Fix lint issue UnusedQuantity and ensure it will be an error in the future 2020-08-13 12:15:15 +02:00
Benoit Marty
c8e5cde101 Fix lint issues 2020-08-13 12:08:01 +02:00
Benoit Marty
617558a1ca Format strings resource 2020-08-13 11:20:44 +02:00
Benoit Marty
753518fdc5 Merge pull request #1910 from RiotTranslateBot/weblate-element-android-element-app
Update from Weblate
2020-08-13 11:09:50 +02:00
Weblate
95e998b652 Merge branch 'origin/develop' into Weblate. 2020-08-13 08:48:02 +00:00
Marcelo Filho
dc17156024 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (235 of 235 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.riot.im/projects/element-android/element-sdk/pt_BR/
2020-08-13 06:42:18 +00:00
random
7299f938b5 Translated using Weblate (Italian)
Currently translated at 100.0% (235 of 235 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.riot.im/projects/element-android/element-sdk/it/
2020-08-13 06:42:18 +00:00
@a2sc:matrix.org
6bf6c53969 Translated using Weblate (German)
Currently translated at 100.0% (235 of 235 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.riot.im/projects/element-android/element-sdk/de/
2020-08-13 06:42:16 +00:00
linsui
c1b40442fa Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (1 of 1 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.riot.im/projects/element-android/element-store/zh_Hans/
2020-08-13 06:42:16 +00:00
linsui
d8850e046a Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (235 of 235 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.riot.im/projects/element-android/element-sdk/zh_Hans/
2020-08-13 06:42:16 +00:00
Akarshan Biswas
fb09f58ac8 Translated using Weblate (Bengali (India))
Currently translated at 100.0% (235 of 235 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.riot.im/projects/element-android/element-sdk/bn_IN/
2020-08-13 06:42:16 +00:00
AnonymousWebHacker
482c9ad451 Translated using Weblate (Spanish)
Currently translated at 73.8% (1353 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/es/
2020-08-12 17:54:27 +00:00
rkfg
0702d3593c Translated using Weblate (Russian)
Currently translated at 99.9% (1833 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/ru/
2020-08-12 17:54:23 +00:00
Marcelo Filho
7efccab2af Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (1834 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/pt_BR/
2020-08-12 17:54:22 +00:00
AmirAli Akbari
e364c78cc7 Translated using Weblate (Persian)
Currently translated at 32.3% (593 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/fa/
2020-08-12 17:54:00 +00:00
call_xz
e27632e253 Translated using Weblate (Japanese)
Currently translated at 48.4% (888 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/ja/
2020-08-12 17:54:00 +00:00
random
93f2724f68 Translated using Weblate (Italian)
Currently translated at 100.0% (1834 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/it/
2020-08-12 17:53:53 +00:00
@a2sc:matrix.org
1e56c70d6a Translated using Weblate (German)
Currently translated at 99.9% (1833 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/de/
2020-08-12 17:53:45 +00:00
Priit Jõerüüt
d836f9d1f8 Translated using Weblate (Estonian)
Currently translated at 39.4% (723 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/et/
2020-08-12 17:53:42 +00:00
Thomas Lee
d82d14c629 Translated using Weblate (Esperanto)
Currently translated at 25.3% (464 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/eo/
2020-08-12 17:53:30 +00:00
linsui
547f5634e5 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (1834 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/zh_Hans/
2020-08-12 17:53:25 +00:00
Akarshan Biswas
9dd61c2004 Translated using Weblate (Bengali (India))
Currently translated at 57.3% (1051 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/bn_IN/
2020-08-12 17:53:14 +00:00
Benoit Marty
bc3d7bdfc4 Merge pull request #1883 from vector-im/feature/confirm_call
Give user the possibility to prevent accidental call (#1869)
2020-08-12 11:54:58 +02:00
Benoit Marty
80d5368d75 Merge pull request #1898 from vector-im/feature/fix_crash
Fix crash reported by RageShake
2020-08-12 11:53:54 +02:00
Benoit Marty
ab9950ee73 Fix crash reported by RageShake 2020-08-12 10:49:54 +02:00
Yihong Gao
11ec53bcfc Translated using Weblate (Chinese (Simplified))
Currently translated at 91.8% (1683 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/zh_Hans/
2020-08-12 02:45:37 +00:00
linsui
ca38d4ce70 Translated using Weblate (Chinese (Simplified))
Currently translated at 91.8% (1683 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/zh_Hans/
2020-08-12 02:45:35 +00:00
@a2sc:matrix.org
311eeb9260 Added translation using Weblate (Kurdish) 2020-08-11 22:24:49 +00:00
Benoit Marty
98aeee9c5a Merge pull request #1803 from czeidler/relative-date-time-formatter
Relative date time formatter #822
2020-08-11 12:45:49 +02:00
Benoit Marty
7b017e4328 Ensure we will always use Context#getSystemService extension function provided by core-ktx 2020-08-11 12:42:32 +02:00
Benoit Marty
b18a8744b2 Merge pull request #1702 from johnjohndoe/system-service
Use Context#getSystemService extension function provided by core-ktx.
2020-08-11 12:37:23 +02:00
Benoit Marty
247a34438b Merge pull request #1880 from vector-im/feature/theme_cleanup
Feature/theme cleanup
2020-08-11 10:41:38 +02:00
Benoit Marty
ebc7db2bc2 Update issue templates 2020-08-11 09:45:47 +02:00
rkfg
0f0f6b90dc Translated using Weblate (Russian)
Currently translated at 98.2% (1801 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/ru/
2020-08-11 07:01:37 +00:00
Artyom
c17297ad15 Translated using Weblate (Russian)
Currently translated at 98.2% (1801 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/ru/
2020-08-11 07:01:36 +00:00
Tobias Preuss
40f8e6061f Use "Context#getSystemService" extension function provided by "core-ktx".
+ Re-use local variable where possible.
2020-08-09 16:16:06 +02:00
aevw
0ab2f62e28 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (1834 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/pt_BR/
2020-08-07 22:29:50 +00:00
Marcelo Filho
9bca325e07 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (1834 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/pt_BR/
2020-08-07 22:29:50 +00:00
aevw
eb01c0c016 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (1834 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/pt_BR/
2020-08-07 20:33:23 +00:00
Marcelo Filho
a76e222cb5 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (1834 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/pt_BR/
2020-08-07 20:33:23 +00:00
Marcelo Filho
ebe43497d5 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (1834 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/pt_BR/
2020-08-07 19:44:16 +00:00
aevw
f181f4e449 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (1834 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/pt_BR/
2020-08-07 19:44:16 +00:00
Artyom
d144dcf7d9 Translated using Weblate (Russian)
Currently translated at 100.0% (235 of 235 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.riot.im/projects/element-android/element-sdk/ru/
2020-08-07 14:42:27 +00:00
rkfg
0e6d296c87 Translated using Weblate (Russian)
Currently translated at 90.6% (1662 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/ru/
2020-08-07 14:42:26 +00:00
Artyom
6dbefb212e Translated using Weblate (Russian)
Currently translated at 90.6% (1662 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/ru/
2020-08-07 14:42:26 +00:00
Alexey Murz Korepov
e11bd9436b Translated using Weblate (Russian)
Currently translated at 90.6% (1662 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/ru/
2020-08-07 14:42:24 +00:00
aevw
61373e6e8e Translated using Weblate (Portuguese (Brazil))
Currently translated at 92.0% (1688 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/pt_BR/
2020-08-07 14:42:23 +00:00
Marcelo Filho
aa7a0abad7 Translated using Weblate (Portuguese (Brazil))
Currently translated at 92.0% (1688 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/pt_BR/
2020-08-07 14:42:22 +00:00
Benoit Marty
c9d7559f03 Translated using Weblate (French)
Currently translated at 100.0% (1 of 1 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.riot.im/projects/element-android/element-store/fr/
2020-08-07 14:42:21 +00:00
Priit Jõerüüt
a6b7a65dfb Translated using Weblate (Estonian)
Currently translated at 30.1% (552 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/et/
2020-08-07 14:42:21 +00:00
Xidorn Quan
a0ecb6ecc2 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (235 of 235 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.riot.im/projects/element-android/element-sdk/zh_Hans/
2020-08-07 14:42:12 +00:00
linsui
3eb12ab116 Translated using Weblate (Chinese (Simplified))
Currently translated at 78.9% (1447 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/zh_Hans/
2020-08-07 14:42:11 +00:00
Marcelo Filho
84a6d4a592 Translated using Weblate (Portuguese (Brazil))
Currently translated at 91.3% (1675 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/pt_BR/
2020-08-07 06:25:04 +00:00
aevw
66a7802e1b Translated using Weblate (Portuguese (Brazil))
Currently translated at 91.3% (1675 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/pt_BR/
2020-08-07 06:25:04 +00:00
Benoit Marty
fc510e86f7 ktlint 2020-08-06 17:20:14 +02:00
Xidorn Quan
0901075c9f Translated using Weblate (Chinese (Simplified))
Currently translated at 72.3% (1326 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/zh_Hans/
2020-08-06 10:14:45 +00:00
linsui
6bb5835bea Translated using Weblate (Chinese (Simplified))
Currently translated at 72.3% (1326 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/zh_Hans/
2020-08-06 10:14:44 +00:00
rkfg
0dd4563217 Translated using Weblate (Russian)
Currently translated at 100.0% (235 of 235 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.riot.im/projects/element-android/element-sdk/ru/
2020-08-06 03:43:04 +00:00
Artyom
2b91482ec4 Translated using Weblate (Russian)
Currently translated at 88.7% (1626 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/ru/
2020-08-06 03:43:04 +00:00
rkfg
4ca0a5acae Translated using Weblate (Russian)
Currently translated at 88.7% (1626 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/ru/
2020-08-06 03:42:55 +00:00
Marcelo Filho
b90be98679 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (235 of 235 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.riot.im/projects/element-android/element-sdk/pt_BR/
2020-08-06 03:42:54 +00:00
aevw
2c16fc467b Translated using Weblate (Portuguese (Brazil))
Currently translated at 62.5% (1146 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/pt_BR/
2020-08-06 03:42:51 +00:00
Marcelo Filho
87084e5065 Translated using Weblate (Portuguese (Brazil))
Currently translated at 62.5% (1146 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/pt_BR/
2020-08-06 03:42:38 +00:00
random
f0f0fcf9ba Translated using Weblate (Italian)
Currently translated at 94.8% (1739 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/it/
2020-08-06 03:42:36 +00:00
@a2sc:matrix.org
8ef97e9dc6 Translated using Weblate (German)
Currently translated at 99.1% (233 of 235 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.riot.im/projects/element-android/element-sdk/de/
2020-08-06 03:42:33 +00:00
aWeinzierl
dedc183e75 Translated using Weblate (German)
Currently translated at 99.1% (233 of 235 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.riot.im/projects/element-android/element-sdk/de/
2020-08-06 03:42:33 +00:00
@a2sc:matrix.org
d301a3e5d3 Translated using Weblate (German)
Currently translated at 99.9% (1832 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/de/
2020-08-06 03:42:32 +00:00
Priit Jõerüüt
199e3165f2 Translated using Weblate (Estonian)
Currently translated at 100.0% (235 of 235 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.riot.im/projects/element-android/element-sdk/et/
2020-08-06 03:42:31 +00:00
Priit Jõerüüt
1c66705c5a Translated using Weblate (Estonian)
Currently translated at 21.6% (397 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/et/
2020-08-06 03:42:30 +00:00
Jeff Huang
ac86a8948e Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (235 of 235 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.riot.im/projects/element-android/element-sdk/zh_Hant/
2020-08-06 03:42:21 +00:00
Jeff Huang
2e8f87b80d Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (1834 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/zh_Hant/
2020-08-06 03:42:20 +00:00
linsui
a708a93f3e Translated using Weblate (Chinese (Simplified))
Currently translated at 74.5% (175 of 235 strings)

Translation: Element Android/Element Android Sdk
Translate-URL: https://translate.riot.im/projects/element-android/element-sdk/zh_Hans/
2020-08-06 03:42:13 +00:00
linsui
2ef4e9c378 Translated using Weblate (Chinese (Simplified))
Currently translated at 68.0% (1248 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/zh_Hans/
2020-08-06 03:42:13 +00:00
Benoit Marty
b8b8a12035 Update issue templates 2020-08-05 22:05:13 +02:00
Benoit Marty
087c5cb77c Update issue templates 2020-08-05 22:02:57 +02:00
Benoit Marty
02baf824f9 Give user the possibility to prevent accidental call (#1869) 2020-08-05 19:59:25 +02:00
Benoit Marty
b833198a3a Rework text selector 2020-08-05 19:34:19 +02:00
Benoit Marty
06d927a911 Rework tabbar style 2020-08-05 19:26:00 +02:00
Benoit Marty
7ab55d46c0 No need to overide with same value 2020-08-05 18:55:57 +02:00
Benoit Marty
8e81d6fe01 Rework attrs riotx_highlighted_message_background 2020-08-05 18:54:13 +02:00
Benoit Marty
85e6ef40a1 Rework attrs vctr_line_divider and vctr_pill_receipt 2020-08-05 18:49:22 +02:00
Benoit Marty
e1db7630d9 Remove unused resources 2020-08-05 18:35:09 +02:00
Benoit Marty
a343e25785 Remove useless method now that we are on API 21+ 2020-08-05 18:30:37 +02:00
Benoit Marty
0ad059359f R.drawable.vector_label_background for API 21 2020-08-05 18:27:59 +02:00
Benoit Marty
20336af84e R.drawable.bg_unread_notification for API 21 2020-08-05 18:21:13 +02:00
Benoit Marty
0a775444dd R.drawable.divider_horizontal for API 21 2020-08-05 18:19:20 +02:00
Benoit Marty
7fe30e464d Remove unused png 2020-08-05 18:12:10 +02:00
aWeinzierl
9c1e61992a Translated using Weblate (German)
Currently translated at 99.7% (1828 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/de/
2020-08-05 12:33:25 +00:00
@a2sc:matrix.org
d41036f861 Translated using Weblate (German)
Currently translated at 99.7% (1828 of 1834 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.riot.im/projects/element-android/element-app/de/
2020-08-05 12:33:15 +00:00
Clemens Zeidler
159881645c Add change log entry 2020-08-05 21:04:26 +12:00
Clemens Zeidler
5e711f6c57 Fix relative date time formatting (#822)
The transitionResolution parameter has to go back to the beginning of
the day. In general, going back 24h is not enough.
2020-08-05 20:59:56 +12:00
Benoit Marty
16f80f35dd Remove unused resources 2020-08-04 17:31:14 +02:00
Benoit Marty
188aec9fc4 Remove unused attrs 2020-08-04 17:22:05 +02:00
Benoit Marty
deeb0d3303 Update Weblate URL to the brand new Weblate project 2020-08-04 14:58:52 +02:00
Benoit Marty
7a215d94d8 Merge pull request #1872 from vector-im/feature/weblate_element
Weblate for element
2020-08-04 12:45:00 +02:00
Benoit Marty
cf7770e47e Remove unused strings 2020-08-04 11:04:36 +02:00
Benoit Marty
6a8ac72b6a Remove riot ref 2020-08-04 09:13:29 +02:00
Benoit Marty
95bbdba141 Rework settings_notification_advanced_summary string 2020-08-04 09:13:29 +02:00
Benoit Marty
1ddeeba561 Little rework of default session public name 2020-08-04 09:13:29 +02:00
Benoit Marty
e95735c491 Remove unused strings 2020-08-04 09:12:16 +02:00
Benoit Marty
fa49e5cb4f Rename string id 2020-08-04 09:12:16 +02:00
Benoit Marty
a48302f433 Remove PlayStore strings from Android resource 2020-08-04 09:12:16 +02:00
Benoit Marty
ad1b2b4511 Add PlayStore description resources in the Triple-T format, to let Weblate handle them 2020-08-04 09:12:16 +02:00
Benoit Marty
0127339eac Merge pull request #1870 from vector-im/feature/rename_package
Rename packages
2020-08-04 09:11:38 +02:00
Benoit Marty
ab4a517ae0 Cleanup 2020-08-03 18:50:04 +02:00
Benoit Marty
8931fd314d Rename package im.vector.riotx to im.vector.app (other manual changes) 2020-08-03 18:48:20 +02:00
Benoit Marty
05b849de13 Rename package im.vector.riotx to im.vector.app (IDE, other variants) 2020-08-03 18:46:29 +02:00
Benoit Marty
a1f90abcd2 Rename package im.vector.riotx to im.vector.app (IDE) 2020-08-03 18:46:29 +02:00
Benoit Marty
67fc2feacb Rename package im.vector.riotx.multipicker to im.vector.lib.multipicker 2020-08-03 18:35:02 +02:00
Benoit Marty
d28c091f0a Rename package im.vector.riotx.attachmentviewer to im.vector.lib.attachmentviewer 2020-08-03 18:35:02 +02:00
Benoit Marty
b4af59728c Merge pull request #1867 from vector-im/feature/cleanup_after_ooo
Small cleanup, also to be aware of all the changes that occurred during my holidays.
2020-08-03 17:47:26 +02:00
Benoit Marty
025d5f7b4c Code readability 2020-08-03 17:33:24 +02:00
Benoit Marty
d531e88666 Key is private 2020-08-03 17:33:24 +02:00
Benoit Marty
ac845ad8c9 Hide Flair settings, this is not implemented yet. 2020-08-03 17:33:24 +02:00
Benoit Marty
ace7ff464b Banned users: use the counter as the title 2020-08-03 17:33:24 +02:00
Benoit Marty
562c6fbcce Naming convention 2020-08-03 17:33:24 +02:00
Benoit Marty
8cc12fb8d4 Only one token per request is possible so use header instead of addHeader 2020-08-03 17:33:24 +02:00
Benoit Marty
4cbb2f7d9d Cleanup 2020-08-03 17:33:24 +02:00
Benoit Marty
18c0f53764 Format 2020-08-03 17:33:24 +02:00
Benoit Marty
64d000ec53 Update PULL_REQUEST_TEMPLATE.md 2020-08-03 17:29:07 +02:00
Benoit Marty
8e84c099fa Merge pull request #1747 from vulet/develop
fix: invisible toolbar(status.im theme)
2020-08-03 16:59:30 +02:00
Benoit Marty
707b69e3e2 Merge branch 'develop' into develop 2020-08-03 16:58:52 +02:00
Valere
33f6e7e337 Version ++ 2020-08-03 14:04:31 +02:00
Valere
9178fd2b5c Merge branch 'hotfix/fix_crash_invite_user' into develop 2020-08-03 14:01:27 +02:00
Valere
69e499e497 Merge hotfix 2020-08-03 14:00:32 +02:00
Valere
1370ca7082 Merge branch 'hotfix/fix_crash_before_release' into develop 2020-08-03 12:23:55 +02:00
Valere
db6045778e Update change log 2020-08-03 12:11:50 +02:00
Valere
2810923519 FIx / Crash when opening Invite User screen 2020-08-03 12:00:08 +02:00
ganfra
7f326abcd0 Merge pull request #1844 from vector-im/feature/pin_code
Feature/pin code
2020-07-31 11:51:39 +02:00
ganfra
acf977577f Pin: clean code 2020-07-31 11:47:51 +02:00
ganfra
995c552f2a Merge branch 'develop' into feature/pin_code 2020-07-31 11:41:42 +02:00
ganfra
99ae1655f5 Pin: fix PopupAlertManager showing on top of PinCode 2020-07-31 11:34:24 +02:00
ganfra
7e45fe4509 Pin: add comment on UnlockActivity interface 2020-07-31 11:33:25 +02:00
Valere
531623178a Version ++ 2020-07-31 00:52:22 +02:00
Valere
7fddfa45e8 Merge branch 'release/1.0.3' 2020-07-31 00:02:02 +02:00
Valere
2b2fd3a356 Merge branch 'release/1.0.3' into develop 2020-07-31 00:02:02 +02:00
Valere
258acaf814 Prepare release 1.0.3 2020-07-31 00:01:33 +02:00
ganfra
a883d3ecdd Merge branch 'develop' into feature/pin_code 2020-07-30 18:49:13 +02:00
Valere
2f6cdc6529 Merge pull request #1847 from vector-im/feature/crash_store_mvrx
Fix IllegalArgumentException reported from store on HomeActivity aunch
2020-07-30 18:07:11 +02:00
Valere
1f226ca6c7 Merge pull request #1845 from vector-im/feature/admin_e2e_config
Feature/admin e2e config
2020-07-30 18:06:27 +02:00
ganfra
9475cb3b39 Update CHANGES 2020-07-30 17:25:49 +02:00
ganfra
eb0d350097 Merge branch 'develop' into feature/pin_code 2020-07-30 17:24:48 +02:00
Valere
c90f5ed370 Fix IllegalArgumentException reported from store on HomeActivity aunch 2020-07-30 17:03:11 +02:00
Valere
ccb466edbe Update change log 2020-07-30 16:57:25 +02:00
Valere
1204f6d9ce UX feedback, reduce severity of message 2020-07-30 15:25:10 +02:00
ganfra
efa1263c35 Pin: set back the grace period to 2 minutes 2020-07-30 15:22:41 +02:00
ganfra
06bd353d44 Pin: polish a bit and clean code 2020-07-30 14:58:46 +02:00
Valere
562cfce9e2 Support HS admin option to disable E2EE for DMs
Fixes #1794
2020-07-30 12:08:30 +02:00
ganfra
bb066b7c65 Add PinLocker to handle lock state 2020-07-29 20:19:01 +02:00
ganfra
37521d2d4f Pin: add settings to enable/disable 2020-07-29 16:11:57 +02:00
Valere
b732ea6c69 Version ++ 2020-07-29 11:39:23 +02:00
ganfra
5426e43cbb Create PinCodeStore and migrate code to fragment 2020-07-29 11:38:04 +02:00
Valere
a048f79b37 Merge branch 'release/1.0.2' 2020-07-29 10:46:54 +02:00
Valere
3214f7d3d5 Merge branch 'release/1.0.2' into develop 2020-07-29 10:46:54 +02:00
Valere
06ef665f66 prepare release 1.0.2 2020-07-29 10:33:55 +02:00
Valere
e1a07f1da6 Merge pull request #1838 from vector-im/feature/session_store_migration
Feature/session store migration
2020-07-29 10:31:14 +02:00
Valere
5c32c7388a cleaning 2020-07-29 09:51:50 +02:00
Valere
c04f22d3bf quick fix plural 2020-07-29 09:51:20 +02:00
Valere
cbf43ea7b3 Session store migration 2020-07-29 09:50:12 +02:00
Valere
9197275343 version++ 2020-07-29 09:00:29 +02:00
ganfra
ecdef52829 Continue PIN code library integration (fork required) 2020-07-28 20:22:59 +02:00
Valere
cc4298209b Merge branch 'release/1.0.1' 2020-07-28 18:03:37 +02:00
Valere
f26ce64914 Merge branch 'release/1.0.1' into develop 2020-07-28 18:03:36 +02:00
Valere
e3f5b7cab3 Prepare release 1.0.1 2020-07-28 18:02:51 +02:00
ganfra
cd38aa42aa Merge branch 'develop' into feature/pin_code 2020-07-28 17:49:36 +02:00
Valere
dde9cdd8ac Merge pull request #1821 from vector-im/feature/notification_off_alert
Check if migration disabled notif
2020-07-28 17:04:15 +02:00
Valere
0d0308d584 Merge pull request #1802 from vector-im/feature/fix_reply_tag
Feature/fix reply tag
2020-07-28 16:58:10 +02:00
Valere
a47ff99be7 Merge branch 'develop' into feature/fix_reply_tag 2020-07-28 16:58:00 +02:00
Valere
e619217687 Code quality 2020-07-28 16:56:55 +02:00
Valere
6f5b3371fe Check if migration disabled notif 2020-07-28 16:56:55 +02:00
Valere
f7b9fc3bb1 Merge pull request #1826 from vector-im/feature/banned_list
Added banned user screen
2020-07-28 16:53:58 +02:00
ganfra
700a2e9ce3 Merge pull request #1832 from vector-im/feature/fix_timeline_loading
Fix timeline non loading when there are lots of filtered events
2020-07-28 16:30:57 +02:00
ganfra
5176a3e2aa Merge branch 'develop' into feature/fix_timeline_loading 2020-07-28 16:30:34 +02:00
Valere
4631cd0e80 Merge pull request #1831 from vector-im/feature/quick_call_update
Allow call in all 2 participants rooms
2020-07-28 16:24:22 +02:00
Valere
60c6512418 Fix / item flickering 2020-07-28 16:23:21 +02:00
Valere
12bc821ef3 code review 2020-07-28 16:23:21 +02:00
Valere
c82e910c38 Added banned user screen 2020-07-28 16:23:21 +02:00
ganfra
7ae0620b20 Update CHANGES 2020-07-28 15:09:45 +02:00
Valere
de32cdb703 Merge pull request #1828 from vector-im/feature/improve_edit_role_button
Improve UI of edit role button
2020-07-28 14:46:54 +02:00
Valere
12e2a8ffc8 Allow call in all 2 participants rooms 2020-07-28 14:43:50 +02:00
ganfra
833f64fcec Fix timeline non loading when there are lots of filtered events 2020-07-28 11:49:45 +02:00
Valere
73c051d2b1 Improve UI of edit role button 2020-07-28 11:35:37 +02:00
ganfra
da06695ab7 Relation content should be checked in encrypted content and not the decrypted one 2020-07-24 18:31:01 +02:00
Onuray Sahin
984ffc4fb9 Merge pull request #1797 from vector-im/feature/fix_rebranding_assets
Fix rebranding assets on login screens
2020-07-24 15:16:02 +03:00
ganfra
a19a3f2a7f Merge branch 'develop' into feature/pin_code 2020-07-24 11:35:38 +02:00
ganfra
d7b44ba0cf Merge branch 'develop' into feature/fix_reply_tag 2020-07-24 11:32:59 +02:00
ganfra
e90fe5cf28 Update CHANGES 2020-07-24 11:31:47 +02:00
ganfra
20c7d80bb1 Clean code 2020-07-24 11:30:27 +02:00
ganfra
25f8a9418a Merge pull request #1783 from vector-im/feature/sending_retry
Feature/sending retry
2020-07-24 10:35:24 +02:00
onurays
21b609420b ktlint fix. 2020-07-24 03:00:06 +03:00
ganfra
794b89c041 Reply: remove inner tags when replying 2020-07-23 18:23:49 +02:00
ganfra
407595e613 Change warning badge (white background) 2020-07-23 16:38:42 +02:00
ganfra
cac8099117 Local echo: use missing updateSendingInformation on RoomSummaryUpdater 2020-07-23 16:38:17 +02:00
onurays
4cc3e87d64 Fix rebranding assets on login screens. 2020-07-23 15:02:40 +03:00
ganfra
3e429490e7 Update CHANGES 2020-07-22 17:04:48 +02:00
ganfra
e23b02f2e2 Composer: set max lines to 6 so it can scroll 2020-07-22 16:02:38 +02:00
ganfra
aa5ae45a0c Add hasFailedSending in RoomSummary and a small warning icon on room list 2020-07-22 15:21:48 +02:00
ganfra
d7558902f7 Sending: limit to 3 retry before failing 2020-07-22 11:12:37 +02:00
ganfra
aa5de1896f Merge pull request #1766 from vector-im/feature/fix_annoying_issues
Fix post Element release issues
2020-07-21 16:43:26 +02:00
ganfra
e5596f6a97 Use Any instead of JsonDict so users won't loose ignored users 2020-07-21 10:43:52 +02:00
ganfra
d638306b04 Merge pull request #1703 from vector-im/feature/md_files
Riot -> Element
2020-07-21 10:08:07 +02:00
ganfra
dba9356472 Merge pull request #1714 from vector-im/feature/deactivated_account
i18n deactivated account error
2020-07-21 08:14:10 +02:00
ganfra
fb247f8bea Update CHANGES and clean code 2020-07-20 20:29:52 +02:00
ganfra
c880e2b848 Fix Requesting avatar thumbnails in Element uses wrong http "user-agent" string #1725 2020-07-20 20:24:04 +02:00
ganfra
1436477a14 Rework a bit user account data (and avoid blocking syncs) 2020-07-20 19:52:24 +02:00
ganfra
35fe4f7268 Fix modular link to EMS 2020-07-20 18:47:41 +02:00
ganfra
a488e88f93 Add reaction to RoomSummary latest previewable event 2020-07-20 16:49:05 +02:00
ganfra
0d51c160eb Should fix realm crash loop 2020-07-20 16:43:39 +02:00
vulet
f5b584ddb8 fix: invisible toolbar(status.im theme) 2020-07-20 00:15:45 +08:00
ganfra
27207a27ae Fix "uploads don't work with Room v6" #1558 2020-07-17 20:33:47 +02:00
Benoit Marty
5082defddf i18n deactivated account error 2020-07-17 17:23:48 +02:00
ganfra
c5f06386bd Continue trying to configure Pin library, stil WIP 2020-07-17 17:13:50 +02:00
ganfra
6e0095edb0 Feature/fix notification clearing (#1707)
Updating notification when entering a room
2020-07-17 13:31:36 +02:00
ganfra
f5fbb2bc4f Setup screens for Pin 2020-07-17 13:29:18 +02:00
Benoit Marty
d78cd81c6f Cleanup strings.xml 2020-07-16 19:21:02 +02:00
Benoit Marty
ef93ef57f9 Replace Riot -> Element in documentation 2020-07-16 19:19:31 +02:00
Benoit Marty
a600e896a0 Update Contributing file after the release of Element 2020-07-16 19:14:20 +02:00
Benoit Marty
993c340c4f Update Authors file after the release of Element 2020-07-16 19:11:33 +02:00
Benoit Marty
87f506f23b Update Readme file after the release of Element 2020-07-16 19:10:52 +02:00
Benoit Marty
44fb53ce6b Merge pull request #1701 from vector-im/feature/riotx_remaining
RiotX -> Element
2020-07-16 18:56:44 +02:00
Benoit Marty
1d2e374526 RiotX -> Element 2020-07-16 16:01:25 +02:00
Benoit Marty
5c423d2897 RiotX -> Element 2020-07-15 20:21:58 +02:00
Benoit Marty
6d0a1ee824 SSO Login: use "element://element" url instead of "riotx://riotx" 2020-07-15 20:21:35 +02:00
Benoit Marty
978ab76644 Merge pull request #1694 from vector-im/feature/improve_splash
Improve splash screen
2020-07-15 20:15:47 +02:00
Benoit Marty
da4e3f3b9c Merge pull request #1693 from vector-im/feature/fix_1613
Feature/fix 1613
2020-07-15 16:41:19 +02:00
Benoit Marty
f6d2d05e70 Improve splash screen 2020-07-15 15:08:46 +02:00
Benoit Marty
d747d96e77 Use correct title 2020-07-15 14:49:26 +02:00
Benoit Marty
484b69165b Add rounded light background to fix dark images on dark background issue (#1613) 2020-07-15 14:34:06 +02:00
Benoit Marty
0159e6dc00 Hide the menu item, it's not implemented yet 2020-07-15 14:33:01 +02:00
Benoit Marty
8f7aae4980 Tint the icon (#1613) 2020-07-15 14:33:01 +02:00
Benoit Marty
0f9e26efc5 let instead of also 2020-07-15 14:33:01 +02:00
Benoit Marty
53f0b77fb0 Version++ 2020-07-15 14:32:15 +02:00
Benoit Marty
fca669ff98 Merge branch 'release/1.0.0' 2020-07-15 14:27:24 +02:00
Benoit Marty
e910fc60fe Merge branch 'release/1.0.0' into develop 2020-07-15 14:27:23 +02:00
Benoit Marty
1d2e62fed7 Prepare release 1.0.0 2020-07-15 14:27:08 +02:00
Benoit Marty
7651eb5c3c Revert "Temporary remove the _dev suffix added to version"
This reverts commit 7237ec7310.
2020-07-15 14:14:44 +02:00
Benoit Marty
a06484c260 Merge pull request #1691 from vector-im/rebranding
Rebranding!
2020-07-15 14:13:11 +02:00
Benoit Marty
9b49e6a817 Use local file in a dialog though (else -> crash) 2020-07-13 23:03:16 +02:00
Benoit Marty
bef0c7725b Use openUrlInChromeCustomTab because it's better and it fixes crash on API 21 (at least) 2020-07-13 22:43:19 +02:00
Benoit Marty
7237ec7310 Temporary remove the _dev suffix added to version 2020-07-13 21:50:26 +02:00
Benoit Marty
3abe5b8467 ktlint 2020-07-13 21:38:49 +02:00
Valere
0406854fa5 lighter bottom sheet separator 2020-07-13 19:25:59 +02:00
Valere
ca6a398a72 Update add room icon 2020-07-13 19:25:44 +02:00
Valere
5e81ce8e3e Update tmp lab icon for notif tab 2020-07-13 19:25:35 +02:00
Onuray Sahin
8658090736 Fix tint color of settings. 2020-07-13 20:16:01 +03:00
Onuray Sahin
614ac88567 Create group room icon changed. 2020-07-13 20:06:39 +03:00
Onuray Sahin
797dcdb48b Merge branch 'riotx_develop' into rebranding_rebase
* riotx_develop: (111 commits)
  Video calls are shown as a voice ones in the timeline (Fixes #1676)
  Fix regression: not able to create a room without IS configured (Fixes #1679)
  Fix / view attachment crash + freeze when offline
  Version++
  Prepare release 0.91.5
  Fix test compilation issue
  Fix crash after rebase
  Add TODO
  Copy Javadoc to the API class
  Move internal methods to internal task
  Latest renaming
  Rename CreateRoomParamsInternalBuilder to CreateRoomBodyBuilder for clarity
  Rename CreateRoomParamsBuilder to CreateRoomParams for clarity
  Rename internal class
  Expose other objects in the builder to create a room
  ktlint
  Display threePid invite along with the other invite (code is a bit dirty)
  Hide right arrow if threepid invite can not be revoked
  Disable fetching Msisdn, it does not work
  Revoke ThreePid invitation (#548)
  ...

# Conflicts:
#	vector/build.gradle
#	vector/src/main/java/im/vector/riotx/features/crypto/keys/KeysExporter.kt
#	vector/src/main/res/layout/bottom_sheet_logout_and_backup.xml
#	vector/src/main/res/values/strings.xml
2020-07-13 19:59:20 +03:00
Onuray Sahin
3a696ea9a1 Revert shield icons. 2020-07-13 19:21:22 +03:00
Onuray Sahin
1b19cb7449 Roll back ic_shield_black 2020-07-13 19:18:56 +03:00
Onuray Sahin
ea81a5298b ic_shield_black icon changed. 2020-07-13 18:55:30 +03:00
Onuray Sahin
ae65eb6a3e Advanced Settings icon changed. 2020-07-13 18:39:09 +03:00
Onuray Sahin
67e07a7932 Room action settings and leave icons changed. 2020-07-13 18:33:29 +03:00
Onuray Sahin
6ef15f3c1c ic_star icon changed. 2020-07-13 18:28:05 +03:00
Benoit Marty
0e3be83da2 Merge branch 'rebranding' of https://gitlab.matrix.org/new-vector/element/element-android into rebranding 2020-07-13 17:21:40 +02:00
Benoit Marty
8b5b7db241 Fix icons alignment issue 2020-07-13 17:21:33 +02:00
Onuray Sahin
1fd8a5fa91 Merge branch 'rebranding' of https://gitlab.matrix.org/new-vector/element/element-android into rebranding
* 'rebranding' of https://gitlab.matrix.org/new-vector/element/element-android:
  Icon: "Modular" -> "Element Matrix Services"
2020-07-13 18:11:45 +03:00
Onuray Sahin
34d7a86175 Update attachment and send icons. 2020-07-13 18:10:49 +03:00
Benoit Marty
21f1f89a4b Merge branch 'rebranding' of https://gitlab.matrix.org/new-vector/element/element-android into rebranding 2020-07-13 16:53:48 +02:00
Benoit Marty
159f286b2c Icon: "Modular" -> "Element Matrix Services" 2020-07-13 16:53:26 +02:00
Onuray Sahin
06454cc3e0 Sticker attachment icon changed. 2020-07-13 17:52:09 +03:00
Onuray Sahin
be27b580d6 ic_fab_add_chat icon changed. 2020-07-13 17:40:16 +03:00
Onuray Sahin
f91b6938f5 Remove stroke from shield icons. 2020-07-13 17:35:58 +03:00
Onuray Sahin
a7fea8d012 Relace eye and eye_closed icons. 2020-07-13 17:26:23 +03:00
Onuray Sahin
18bc40fb66 Design review fixes for login screen. 2020-07-13 17:01:48 +03:00
Benoit Marty
1dec4bc96b Wording: "Modular" -> "Element Matrix Services" 2020-07-13 15:49:46 +02:00
Benoit Marty
0e28214b63 Do not display the name change popup for a new installation 2020-07-13 14:23:06 +02:00
Benoit Marty
ca61751a8b Merge pull request #1678 from vector-im/feature/attachement_pager_fix
Fix / view attachment crash + freeze when offline
2020-07-13 11:33:11 +02:00
Benoit Marty
cce1c2252d Merge pull request #1681 from vector-im/feature/other_fixes
Video calls are shown as a voice ones in the timeline (Fixes #1676)
2020-07-13 11:31:38 +02:00
Benoit Marty
6a4d887941 Merge branch 'develop' into feature/other_fixes 2020-07-13 11:31:25 +02:00
Benoit Marty
4de1759321 Merge pull request #1680 from vector-im/feature/fix_create_room
Fix regression: not able to create a room without IS configured (Fixes #1679)
2020-07-13 11:30:47 +02:00
Benoit Marty
139cd051ab Video calls are shown as a voice ones in the timeline (Fixes #1676) 2020-07-13 10:57:52 +02:00
Benoit Marty
33b2abc3b9 Fix regression: not able to create a room without IS configured (Fixes #1679) 2020-07-13 10:46:51 +02:00
Valere
c63128cfbd Fix / view attachment crash + freeze when offline 2020-07-13 09:15:52 +02:00
Benoit Marty
5063188b25 Version++ 2020-07-11 23:00:16 +02:00
Benoit Marty
b9f0c176d9 Merge branch 'release/0.91.5' 2020-07-11 22:58:48 +02:00
Benoit Marty
d09c03bff3 Merge branch 'release/0.91.5' into develop 2020-07-11 22:58:47 +02:00
Benoit Marty
f444595845 Prepare release 0.91.5 2020-07-11 22:58:34 +02:00
Benoit Marty
eedf545409 Merge pull request #1658 from vector-im/feature/3pid_invite
3pid invite
2020-07-11 22:50:08 +02:00
Benoit Marty
aba8a3fed1 Fix test compilation issue 2020-07-11 22:49:29 +02:00
Benoit Marty
68d475dc55 Fix crash after rebase 2020-07-11 22:45:03 +02:00
Benoit Marty
ece9fbd3bb Add TODO 2020-07-11 22:26:21 +02:00
Benoit Marty
602d67155f Copy Javadoc to the API class 2020-07-11 22:25:21 +02:00
Benoit Marty
75ef491e3e Move internal methods to internal task 2020-07-11 22:22:21 +02:00
Benoit Marty
0f327fc75f Latest renaming 2020-07-11 22:17:55 +02:00
Benoit Marty
a456f4c6a5 Rename CreateRoomParamsInternalBuilder to CreateRoomBodyBuilder for clarity 2020-07-11 22:16:35 +02:00
Benoit Marty
e097bd8117 Rename CreateRoomParamsBuilder to CreateRoomParams for clarity 2020-07-11 22:15:26 +02:00
Benoit Marty
ded8acc836 Rename internal class 2020-07-11 22:13:22 +02:00
Benoit Marty
d8a0a1d38e Expose other objects in the builder to create a room 2020-07-11 22:11:15 +02:00
Benoit Marty
e8f28d7ce4 ktlint 2020-07-11 22:11:15 +02:00
Benoit Marty
a58bb776f3 Display threePid invite along with the other invite (code is a bit dirty) 2020-07-11 22:11:15 +02:00
Benoit Marty
4ba1a34f38 Hide right arrow if threepid invite can not be revoked 2020-07-11 22:11:15 +02:00
Benoit Marty
3d68b15e60 Disable fetching Msisdn, it does not work 2020-07-11 22:11:15 +02:00
Benoit Marty
c78bba803c Revoke ThreePid invitation (#548) 2020-07-11 22:11:15 +02:00
Benoit Marty
863c09142f Display three pid invites in the room members list (#548) 2020-07-11 22:11:15 +02:00
Benoit Marty
3142442e5c Load contacts much faster 2020-07-11 22:11:15 +02:00
Benoit Marty
4c1d50d554 Renames package and some other things 2020-07-11 22:11:15 +02:00
Benoit Marty
25e7bbcd79 Handle contacts permission 2020-07-11 22:10:52 +02:00
Benoit Marty
4b3a6a883d CreateRoomParams has been replaced by CreateRoomParamsBuilder, to be able to invite 3pids 2020-07-11 22:10:52 +02:00
Benoit Marty
6c0bb2a949 Add 3Pid to the list. Not compiling, I have to modify CreateRoomParam 2020-07-11 22:08:02 +02:00
Benoit Marty
f714566200 use projection to gain 25% of time 2020-07-11 22:08:02 +02:00
Benoit Marty
327a596de5 Move classes 2020-07-11 22:08:02 +02:00
Benoit Marty
cc4603b61f Rename classes 2020-07-11 22:08:02 +02:00
Benoit Marty
f51568b331 Fix a crash (#548) 2020-07-11 22:08:02 +02:00
Benoit Marty
6ceac578a3 Add checkbox to filter contacts with MatrixId only 2020-07-11 22:08:02 +02:00
Benoit Marty
1c733e6661 Display Contact list (#548)
WIP (#548)

WIP (#548)

WIP (#548)

WIP (#548)

WIP (#548)
2020-07-11 22:08:02 +02:00
Benoit Marty
3842ec6bb0 Invite by msisdn. Error 500 from matrix.org though (#548) 2020-07-11 22:07:14 +02:00
Benoit Marty
ab1d652f17 Invite by email (msisdn not working), command line (#548) 2020-07-11 22:07:14 +02:00
Benoit Marty
70e90d8542 Render third party invite event (#548) 2020-07-11 22:07:14 +02:00
Benoit Marty
39e185576c Merge pull request #1666 from vector-im/feature/tab_notification_labs
Feature/tab notification labs
2020-07-11 22:05:56 +02:00
Benoit Marty
9c402d4d40 Merge pull request #1665 from vector-im/feature/fix_small_issues
Feature/fix small issues
2020-07-11 21:58:11 +02:00
Benoit Marty
37378ca5a6 typo 2020-07-11 21:57:45 +02:00
Benoit Marty
a35749964c Merge branch 'develop' into feature/fix_small_issues 2020-07-11 21:56:07 +02:00
Valere
bbbd45efcd Fix / missing transparency on waiting view background 2020-07-11 20:46:47 +02:00
Valere
246f6bb0d0 update change log 2020-07-11 18:41:08 +02:00
Valere
a08a1d4f74 Merge pull request #1662 from vector-im/feature/manage_4s_setting
4S settings screen
2020-07-11 18:39:33 +02:00
Valere
7acbd42a45 Propose unread tab as a lab setting 2020-07-11 18:38:03 +02:00
Valere
c6a5d05ffb update change log 2020-07-11 17:29:22 +02:00
Valere
36b17e9b8c Fix / missing tint for recovery icon 2020-07-11 17:29:15 +02:00
ganfra
c2cccd8b11 Some changes after benoit's review 2020-07-11 15:26:54 +02:00
ganfra
e7804af2f7 EventInsertLiveObserver: change of delete method (should be faster) 2020-07-11 13:27:49 +02:00
ganfra
0412fabbd2 Clean comment on EventInsertLiveProcessor 2020-07-11 13:24:32 +02:00
Benoit Marty
22959cddb2 Pref is always visible and enabled 2020-07-11 13:24:10 +02:00
Benoit Marty
7193db8344 Try to improve readability 2020-07-11 13:19:43 +02:00
Benoit Marty
352662d19a Rename param 2020-07-11 13:13:44 +02:00
Benoit Marty
1afabb69c1 Cleanup pref 2020-07-11 13:13:08 +02:00
Benoit Marty
6f4ea83fa9 Create allKnown() fun 2020-07-11 13:03:53 +02:00
ganfra
1c17bd9f5a Clean code 2020-07-11 12:57:49 +02:00
Benoit Marty
de5f182f29 Move SecretsSynchronisationInfo to its file
And do some other cleanup
2020-07-11 12:57:20 +02:00
Benoit Marty
aa1843774a Cleanup 2020-07-11 12:50:16 +02:00
Benoit Marty
9e1c30ec5d No need to return the disposable, it is never used 2020-07-11 12:49:54 +02:00
Benoit Marty
31984a57d6 Subscribe to view model is already disposed 2020-07-11 12:46:10 +02:00
ganfra
2f0645a94e Fix left user has no name in db 2020-07-11 12:39:41 +02:00
Valere
c57d41863f 4S settings screen 2020-07-11 12:37:18 +02:00
Benoit Marty
25bbe9c3d6 Merge pull request #1661 from vector-im/feature/create_file_intent
Feature/create file intent
2020-07-11 12:28:15 +02:00
Benoit Marty
c5c3592a4c Merge branch 'develop' into feature/create_file_intent 2020-07-11 12:28:07 +02:00
Benoit Marty
5a8008a4dc Fix bug when restoring key backup with recovery key 2020-07-11 12:26:52 +02:00
Benoit Marty
2c5d2ea179 Improve wording 2020-07-11 12:26:47 +02:00
Benoit Marty
4387fd3327 We do not need write storage permission to create a Txt file with the intent Intent.ACTION_CREATE_DOCUMENT 2020-07-11 12:26:47 +02:00
ganfra
1f2d5b0d00 KeybackupBanner: remove unnecessary animation 2020-07-11 10:48:45 +02:00
ganfra
253582219c Remove EllipsizingTextView as it provokes more issue than it solves 2020-07-10 22:35:51 +02:00
ganfra
3fc9fe3017 Merge branch 'develop' into feature/fix_small_issues 2020-07-10 20:13:47 +02:00
ganfra
e07a584d66 Revert fixing users as it's not the good catch 2020-07-10 20:09:30 +02:00
ganfra
150d44aafd Improve a bit how joining/leaving are handled 2020-07-10 20:08:51 +02:00
Benoit Marty
179474b975 Cleanup 2020-07-10 17:51:57 +02:00
Benoit Marty
825e21362b Merge pull request #1546 from johnjohndoe/styledattributeset
Use Context#withStyledAttributes extension function.
2020-07-10 17:48:39 +02:00
Onuray Sahin
0bc51b2ed8 Change brand name in all strings for all languages. 2020-07-10 18:28:22 +03:00
Benoit Marty
4741169cc7 Merge pull request #1611 from vector-im/feature/okhttp_for_glide
Feature/okhttp for glide
2020-07-10 15:54:31 +02:00
Benoit Marty
a8ad57a9b0 Merge pull request #1648 from vector-im/feature/server_recovery_banner
Feature/server recovery banner
2020-07-10 15:53:58 +02:00
Valere
8582ad6015 Merge pull request #1636 from vector-im/feature/attachement_pager
Feature/attachement pager
2020-07-10 15:47:32 +02:00
Benoit Marty
51898a8109 Create new strings for change translations 2020-07-10 15:06:34 +02:00
Benoit Marty
d63f00851a Rename parameters 2020-07-10 14:43:14 +02:00
Benoit Marty
f179fc523d Give configured OkHttpClient to Glide and BigImageViewer 2020-07-10 14:43:07 +02:00
Benoit Marty
eda29e3fef Add link for WebRTC 2020-07-10 14:43:07 +02:00
Benoit Marty
633548f190 Create ImageManager to be able to (re-)configure the lib 2020-07-10 14:43:07 +02:00
Benoit Marty
811cbb2e20 ActiveSessionHolder to more things related to other @Singleton, and especially some missing cleanup
Such as calling `removeListener()` and `callSignalingService().removeCallListener()`
`Session.configureAndStart()` do less thing now
2020-07-10 14:43:07 +02:00
Benoit Marty
6569ee5d10 Use Set instead of List 2020-07-10 14:42:30 +02:00
Benoit Marty
5f60d7fd3b Session.configureAndStart now handle registering to webRtcPeerConnectionManager... 2020-07-10 14:42:30 +02:00
Benoit Marty
10f8aebde2 Update comment 2020-07-10 14:42:30 +02:00
Valere
ea771476cc Merge remote-tracking branch 'origin/feature/attachement_pager' into feature/attachement_pager 2020-07-10 14:39:22 +02:00
Valere
08bc487f17 klint 2020-07-10 14:39:08 +02:00
Valere
1b6b71ed98 Debounce clicks 2020-07-10 14:38:31 +02:00
Valere
9f2631110e Missing copyrights 2020-07-10 14:38:23 +02:00
Benoit Marty
e8b1e418fa ktlint 2020-07-10 14:37:57 +02:00
Valere
44563e73e2 Merge pull request #1655 from vector-im/feature/push_verif
Send verification request when the device is not new
2020-07-10 14:18:26 +02:00
Onuray Sahin
d3595173b4 Room notification settings icons changed. 2020-07-10 15:14:06 +03:00
Onuray Sahin
14d4b34cee Change event action icons. 2020-07-10 14:54:15 +03:00
Onuray Sahin
538149233b Change timeline call action icons. 2020-07-10 14:43:19 +03:00
Onuray Sahin
bcb203f8e0 Change settings icons. 2020-07-10 14:24:10 +03:00
Onuray Sahin
3c6937ff5a Change status bar icon. 2020-07-10 14:11:34 +03:00
Benoit Marty
6c0f775c4b Cleanup 2020-07-10 13:07:14 +02:00
Benoit Marty
ea3e467dc4 Format 2020-07-10 12:52:54 +02:00
Benoit Marty
5a65eddf59 Cleanup Navigator 2020-07-10 12:48:35 +02:00
Benoit Marty
e979bee920 Format 2020-07-10 12:38:20 +02:00
Benoit Marty
eff08955f1 Fix a11y 2020-07-10 12:37:48 +02:00
Onuray Sahin
9310073c07 Remove unused splash icons. 2020-07-10 13:21:30 +03:00
Benoit Marty
28869f4382 Small cleanup before merge 2020-07-10 12:19:25 +02:00
Onuray Sahin
cd949e9d38 Fix bottom sheet divider colors. 2020-07-10 13:11:23 +03:00
Onuray Sahin
541e1fc4cc Change file names with the new brand. 2020-07-10 13:11:01 +03:00
Onuray Sahin
93fe00a299 Merge branch 'develop' into rebranding_rebase
* develop: (123 commits)
  Fixes #1647 share not working
  Put xmx to 2048m
  Update changelog after PR merged
  Version++
  Prepare release 0.91.04-beta
  Add the new value to the ViewEvent, because the state is maybe not up to date.
  Fix lint error, following the upgrade of the libs
  Revert to gradle build 3.5.3
  Clean code
  Fix leaving selected group
  QuickFix / crash when  starting in airplane mode
  Group: rework a bit how and when we fetch data about groups
  EventInsert: add InsertType to avoid trying to process events we shouldn't
  Upload device keys only once to the homeserver and fix crash when no network (#1629)
  Upgrade some dependencies
  Add a delay to avoid crash. Sounds like a workaround...
  Handle certificate error in case of Direct Login
  Handle JobCancellationException
  Simplify the server selection screen: remove the "Continue" button
  Re-activate Wellknown support with updated UI (#1614)
  ...

# Conflicts:
#	vector/build.gradle
#	vector/src/main/res/values/strings.xml
2020-07-10 13:05:52 +03:00
ganfra
8814364497 Invite: we shouldn't be able to open room details 2020-07-10 11:32:28 +02:00
Onuray Sahin
0d9ff4bde3 Add branch name to login splash screen. 2020-07-10 12:04:48 +03:00
ganfra
9c595b6c02 Fix "Leave room only leaves the current version" 2020-07-10 08:54:41 +02:00
ganfra
d49d0295a2 Send verification request when the device is not new 2020-07-09 18:31:09 +02:00
ganfra
da7c971927 Fragments: use commitTransaction instead of commitNow 2020-07-09 17:46:59 +02:00
ganfra
548879bd9f Fix encryption enabling visible for all users 2020-07-09 17:20:51 +02:00
Valere
0c2516ccf8 line too long 2020-07-09 15:47:59 +02:00
Valere
332f227bc1 Signout to setup 4S 2020-07-09 15:45:58 +02:00
Valere
a98b2ecce3 Set server backup banner 2020-07-09 15:45:58 +02:00
Valere
195e2703b9 Support open from upload media tab 2020-07-09 15:22:34 +02:00
Onuray Sahin
c1f1620624 Disclaimer dialog is updated. 2020-07-09 15:17:17 +03:00
Onuray Sahin
f5284e8447 previously-riot url added to use in disclaimer dialog. 2020-07-09 15:15:27 +03:00
Onuray Sahin
347cf08861 Update settings urls. 2020-07-09 13:46:27 +03:00
Onuray Sahin
540317639a Change slogan. 2020-07-09 12:51:29 +03:00
Onuray Sahin
bdcd96544e Use bigger logo at loading screen. 2020-07-09 12:48:45 +03:00
Onuray Sahin
8237c949f1 Change logo in login screen. 2020-07-09 12:27:28 +03:00
Valere
e38cb7c1a6 Unwanted logs 2020-07-09 10:16:38 +02:00
Valere
868d9cf55c Cleaning (remove audio and file as not supported yet) 2020-07-09 10:11:10 +02:00
Valere
aa3e68f3fd Refactoring
Remove glide dependency + protect against cell reuse bugs
2020-07-09 10:08:55 +02:00
Valere
bf2d937ad6 Basic video seekTo support 2020-07-09 08:59:06 +02:00
Valere
e24d5b3ca4 Simple play/pause overlay 2020-07-08 22:58:27 +02:00
Valere
e9778d6feb Video stop/resume when paging or bg/fg 2020-07-08 22:41:17 +02:00
Valere
8c4c909f44 share action 2020-07-08 22:27:00 +02:00
Valere
a1db8653ab Basic Video Support 2020-07-08 20:09:55 +02:00
Valere
cc5df1e1d5 Update change log 2020-07-08 20:09:55 +02:00
Valere
87b1394e98 Code cleaning 2020-07-08 20:09:55 +02:00
Valere
e3c2af2c59 Code cleaning 2020-07-08 20:09:55 +02:00
Valere
a618a9214e Show hide overlay on tap 2020-07-08 20:09:55 +02:00
Valere
76133ab55e Simple overlay 2020-07-08 20:09:55 +02:00
Valere
2d4a728af4 Gif support 2020-07-08 20:09:55 +02:00
Valere
4a2a6d34ae Initial commit 2020-07-08 20:09:55 +02:00
ganfra
75c2dfcd48 Fix user data being affected by local room member event changes 2020-07-08 19:16:22 +02:00
ganfra
6ebedaf540 Update CHANGES 2020-07-08 17:40:37 +02:00
ganfra
85e8e652f1 Fix IM terms of review path 2020-07-08 17:32:54 +02:00
Onuray Sahin
f025811025 Change splash screen icons. 2020-07-08 17:54:51 +03:00
ganfra
3aabb17ea5 Fix timeline pagination when no displayable events 2020-07-08 15:51:00 +02:00
ganfra
f1e5129acb Merge pull request #1651 from vector-im/feature/quick_fix_sharing
Fixes #1647 share not working
2020-07-08 14:56:36 +02:00
ganfra
e8dbed1642 Fix relations on encrypted room 2020-07-08 14:51:15 +02:00
Onuray Sahin
6d270dc5f4 Fix background of bottom sheet generic item. 2020-07-08 13:52:56 +03:00
Onuray Sahin
2afe642e8b Use 48px icon instead of 44px. 2020-07-08 13:02:02 +03:00
Onuray Sahin
680e62cb98 Update application icons. 2020-07-08 12:55:15 +03:00
Valere
c5ba746904 Fixes #1647 share not working 2020-07-08 11:00:13 +02:00
Onuray Sahin
702711fc5e Fix drawer layout colors. 2020-07-08 10:58:24 +03:00
ganfra
0855806ae2 Fix edit being stuck 2020-07-07 22:14:11 +02:00
Benoit Marty
a2c75e7c71 Merge pull request #1640 from vector-im/mv/lower-xmx
Put xmx to 2048m
2020-07-07 14:51:38 +02:00
Mathieu Velten
6f996f1f09 Put xmx to 2048m 2020-07-07 14:23:59 +02:00
Onuray Sahin
ac7a929a1a Fix tint color of add icon. 2020-07-07 15:05:47 +03:00
Onuray Sahin
8313e45737 Use material add icon instead of png. 2020-07-07 13:28:06 +03:00
Onuray Sahin
09ca2361d7 Adjust colors and remove divider between notification settings and leave room action. 2020-07-07 13:12:24 +03:00
Benoit Marty
bcfd322b85 Update changelog after PR merged 2020-07-07 12:00:41 +02:00
Benoit Marty
9dc831d8e5 Merge pull request #1634 from vector-im/feature/db_clean_up
Feature/db clean up
2020-07-07 11:59:28 +02:00
Onuray Sahin
9514835232 Fix bottom sheet backgrounds. 2020-07-07 12:52:28 +03:00
Onuray Sahin
e93a2d7c5d UI review fixes. 2020-07-07 10:35:38 +03:00
Benoit Marty
b2f6476f78 Merge pull request #1631 from vector-im/feature/some_upgrade
Upgrade some dependencies
2020-07-06 23:38:48 +02:00
Benoit Marty
b7d86c3fa4 Merge branch 'develop' into feature/some_upgrade 2020-07-06 23:38:26 +02:00
Benoit Marty
89506b9e81 Version++ 2020-07-06 23:36:14 +02:00
Benoit Marty
51abdb6066 Merge branch 'release/0.91.4' 2020-07-06 23:31:28 +02:00
Benoit Marty
9e60f73bcf Merge branch 'release/0.91.4' into develop 2020-07-06 23:31:27 +02:00
Benoit Marty
1e6d98a121 Prepare release 0.91.04-beta 2020-07-06 23:31:03 +02:00
Benoit Marty
98d56cb556 Merge pull request #1630 from vector-im/feature/wellknown
Re-activate Wellknown support with updated UI (#1614)
2020-07-06 23:29:10 +02:00
Benoit Marty
8b1a07b8a8 Add the new value to the ViewEvent, because the state is maybe not up to date. 2020-07-06 23:05:42 +02:00
Benoit Marty
92e809fa6d Fix lint error, following the upgrade of the libs 2020-07-06 22:05:29 +02:00
Benoit Marty
a0998e4aff Revert to gradle build 3.5.3 2020-07-06 21:53:10 +02:00
Benoit Marty
804d712848 Merge pull request #1633 from vector-im/feature/keys_upload
Upload device keys only once to the homeserver and fix crash when no network (#1629)
2020-07-06 21:39:13 +02:00
ganfra
08cda2ee10 Merge develop into feature/db_clean_up 2020-07-06 19:18:42 +02:00
ganfra
bf03b367f1 Clean code 2020-07-06 19:12:24 +02:00
ganfra
c1da4aecd7 Fix leaving selected group 2020-07-06 19:09:08 +02:00
Valere
38c54e0f2c QuickFix / crash when starting in airplane mode 2020-07-06 18:51:39 +02:00
ganfra
9ebf87df62 Group: rework a bit how and when we fetch data about groups 2020-07-06 18:47:59 +02:00
ganfra
32d2cea7f8 EventInsert: add InsertType to avoid trying to process events we shouldn't 2020-07-06 18:38:30 +02:00
Benoit Marty
f998cb6b18 Upload device keys only once to the homeserver and fix crash when no network (#1629) 2020-07-06 17:12:47 +02:00
Benoit Marty
9d4e903c4a Upgrade some dependencies 2020-07-06 15:59:49 +02:00
Benoit Marty
cfdf5cb552 Add a delay to avoid crash. Sounds like a workaround... 2020-07-06 14:57:28 +02:00
Benoit Marty
e859357c6a Handle certificate error in case of Direct Login 2020-07-06 14:13:34 +02:00
Benoit Marty
e7f13c9efe Handle JobCancellationException 2020-07-06 14:12:56 +02:00
Benoit Marty
2a68c8d08b Simplify the server selection screen: remove the "Continue" button 2020-07-06 14:12:56 +02:00
Onuray Sahin
b1c088a03b Update new accent color. 2020-07-06 13:08:06 +03:00
Tobias Preuss
04f0146afd Use Context#withStyledAttributes extension function.
+ This function is more concise and ensures "recycle()" is always invoked.
+ Sources: https://android.googlesource.com/platform/frameworks/support/+/refs/heads/androidx-preference-release/core/core-ktx/src/main/java/androidx/core/content/Context.kt#52
2020-07-04 19:36:17 +02:00
Benoit Marty
92ecfafa0d Merge pull request #1608 from vector-im/feature/save_attachement_legacy
Fix / save media on old android
2020-07-04 12:16:59 +02:00
Benoit Marty
f74ab2dfd4 Merge branch 'develop' into feature/save_attachement_legacy 2020-07-04 12:16:50 +02:00
Benoit Marty
a1dc383148 Merge pull request #1610 from tulir/fix-reply-fallback
Fix reply fallback leaking sender locale
2020-07-04 12:15:29 +02:00
Benoit Marty
b853397c0a Re-activate Wellknown support with updated UI (#1614) 2020-07-04 12:10:17 +02:00
Benoit Marty
0cfd33fc8b Typo 2020-07-04 11:15:20 +02:00
Tulir Asokan
51e63c5d1d Remove unused reply fallback translations
Signed-off-by: Tulir Asokan <tulir@maunium.net>
2020-07-03 23:12:38 +03:00
Tulir Asokan
e9ba7342d5 Fix reply fallback format
Signed-off-by: Tulir Asokan <tulir@maunium.net>
2020-07-03 23:12:32 +03:00
ganfra
7434aed43f Use writeAsync for localEcho 2020-07-03 21:12:27 +02:00
ganfra
283f32479d Rebranch timeline + continue clean up strategy 2020-07-03 21:11:54 +02:00
Onuray Sahin
f4057ea3fa Fix background of drawer layout. 2020-07-03 14:50:33 +03:00
Onuray Sahin
a7480c1860 Change colors according to the new color palette. 2020-07-03 13:36:30 +03:00
Benoit Marty
c4ad90696f Update vector/src/main/java/im/vector/riotx/features/home/room/detail/RoomDetailFragment.kt 2020-07-03 12:28:38 +02:00
Benoit Marty
85ee183e4f Update vector/src/main/java/im/vector/riotx/features/home/room/detail/RoomDetailFragment.kt 2020-07-03 12:28:32 +02:00
Benoit Marty
586b0fe6e2 Merge pull request #1602 from vector-im/feature/work_manager_init
Work manager init
2020-07-03 12:04:53 +02:00
Valere
bdfce35d9a Fix / save media on old android
+ add numbers to file if needed
2020-07-03 10:32:07 +02:00
ganfra
3648d6292a Merge branch 'develop' into feature/db_clean_up 2020-07-03 10:21:48 +02:00
Benoit Marty
b8f88d323d Merge pull request #1604 from vector-im/feature/fix_crash_notification
Feature/fix crash notification
2020-07-03 00:23:31 +02:00
Benoit Marty
b8f66a36d5 Merge branch 'develop' into feature/fix_crash_notification 2020-07-03 00:23:21 +02:00
Benoit Marty
d4050a7b9d Due to a bug introduced in Android gradle plugin 3.6.0, we have to specify the ndk version to use 2020-07-02 23:39:42 +02:00
Benoit Marty
bfb8b6203c Add proguard command (commented) 2020-07-02 22:02:42 +02:00
Benoit Marty
15223ecfe4 Update changelog with the recent change 2020-07-02 21:31:39 +02:00
Benoit Marty
e098b87d0a Update comment 2020-07-02 21:30:49 +02:00
Benoit Marty
e878821df2 Merge pull request #1605 from vector-im/feature/fix_db_migration_serialization
Feature/fix db migration serialization
2020-07-02 21:28:30 +02:00
Valere
596fcf94ba Fix / Serialization issues
Fixes  keybackup import failing and UTD of incoming messages
2020-07-02 19:26:05 +02:00
Onuray Sahin
332041e13b Move some of colors from attrs.xml to colors_riotx.xml 2020-07-02 19:29:45 +03:00
ganfra
5008bfd6a9 Update CHANGES 2020-07-02 16:17:00 +02:00
ganfra
2ef82f1b82 Use HomeActivity.newIntent to make sure we have args 2020-07-02 16:05:05 +02:00
ganfra
2f6b38eb39 Introduce EventInsertEntity to handle db updates 2020-07-02 15:33:06 +02:00
Valere
69eaf2695e FIx / inbound session bad migration 2020-07-02 14:08:09 +02:00
Benoit Marty
542d11d7f1 Upgrade build-tools from 3.5.3 to 3.6.6 and gradle from 5.4.1 to 5.6.4 2020-07-02 12:44:07 +02:00
Benoit Marty
1de819b0a3 Fix lint false-positive about WorkManger (#1012) 2020-07-02 12:21:23 +02:00
Benoit Marty
5713fa4f59 Clean code 2020-07-02 12:17:09 +02:00
Benoit Marty
93fb40f323 (re-)Enable abortOnError for lint
And fix a first issue (on unused code)
2020-07-02 11:29:00 +02:00
Benoit Marty
f4314ebdae Version++ 2020-07-01 21:58:58 +02:00
Benoit Marty
7b075f138d Merge branch 'release/0.91.3-beta' 2020-07-01 21:51:50 +02:00
Benoit Marty
c62a7c4051 Merge branch 'release/0.91.3-beta' into develop 2020-07-01 21:51:49 +02:00
Benoit Marty
3e97e03ccc Prepare release Riot.imX v0.91.3 for the beta channel 2020-07-01 21:51:30 +02:00
Onuray Sahin
74a3d7619b Handle permalink coming from the new domain. 2020-07-01 22:21:59 +03:00
Onuray Sahin
fc88892ee6 Update bottom navigation and room profile icons. 2020-07-01 22:21:06 +03:00
Benoit Marty
01e42838ef Merge pull request #1593 from vector-im/feature/fix_crash_on_shortcuts
Clear dynamic shortcuts when user logs out
2020-07-01 20:33:00 +02:00
Benoit Marty
192c6db03e Merge pull request #1592 from vector-im/feature/new_home
Catchup tab is removed temporarily (#1565)
2020-07-01 20:32:04 +02:00
Benoit Marty
a98bd0940f Merge branch 'develop' into feature/new_home 2020-07-01 20:31:55 +02:00
Benoit Marty
c0623726ae Clear dynamic shortcuts when user log out 2020-07-01 17:20:41 +02:00
Benoit Marty
ba8ec97f6a Merge pull request #1591 from vector-im/feature/other_fixes
Render room avatar change and other fixes
2020-07-01 16:27:42 +02:00
Benoit Marty
fb1c01c37c Catchup tab is removed temporarily (#1565)
Invites are displayed in the corresponding DM or Room tab
2020-07-01 16:15:06 +02:00
Benoit Marty
f8e35da533 Render room avatar change (#1319) 2020-07-01 14:52:37 +02:00
Benoit Marty
53053d8f4a Fix layout overlap issue (#1407) 2020-07-01 14:03:30 +02:00
Benoit Marty
9eab1acf1e Allow clear text communication (to use local synapse) 2020-07-01 13:55:34 +02:00
Onuray Sahin
7aa9f88ceb New string resources created by changing brand name. 2020-07-01 14:43:35 +03:00
Benoit Marty
310517ece4 Merge pull request #1588 from vector-im/feature/fixes_before_beta_release
Fix issue with not trusted certificate on API 24+
2020-07-01 13:33:29 +02:00
Benoit Marty
8adb36c7c4 Merge pull request #1587 from vector-im/feature/fix_sync
Sync: fix liveState not initialized and add method to get current sta…
2020-07-01 13:27:48 +02:00
Benoit Marty
057f6fdf26 Kotlin style 2020-07-01 12:15:58 +02:00
Benoit Marty
b8b79de91c PinnedTrustManager differ for API 24+ 2020-07-01 12:15:58 +02:00
Benoit Marty
f86fa6cb5d Avoid Exception if array is empty. 2020-07-01 12:15:58 +02:00
ganfra
693c980414 Clean code 2020-07-01 12:11:15 +02:00
ganfra
faeeec0e37 Sync: fix liveState not initialized and add method to get current state without livedata 2020-07-01 12:10:12 +02:00
ganfra
3db26bcae1 Merge develop into db_clean_up 2020-07-01 09:32:25 +02:00
ganfra
f0dbb92d76 Attempt to clean db [WIP] 2020-06-30 19:45:17 +02:00
Benoit Marty
73ce38c6a9 Merge pull request #1583 from vector-im/feature/fix_search_case
Fixes #1468 user search case
2020-06-30 19:16:48 +02:00
Benoit Marty
901cf15a79 Merge pull request #1536 from vector-im/feature/save_file
Improove file download
2020-06-30 19:15:31 +02:00
Benoit Marty
4e3a948513 Cleanup 2020-06-30 19:12:50 +02:00
Benoit Marty
1ed8ff8711 Do some cleanup 2020-06-30 19:06:48 +02:00
Valere
4b74c7320b update change log 2020-06-30 18:49:15 +02:00
Valere
7ed9f535e6 Fix / clear on detached 2020-06-30 18:48:51 +02:00
Valere
f5c1ad8f2a Fix / remember state and resend on rebind 2020-06-30 18:48:51 +02:00
Valere
174084a256 added download animation 2020-06-30 18:48:51 +02:00
Valere
1e718bb44f javadoc 2020-06-30 18:48:51 +02:00
Valere
f0fe10a11d klint 2020-06-30 18:48:51 +02:00
Valere
ae1da6b9f5 Namespacing of file service 2020-06-30 18:48:51 +02:00
Valere
04b6b3674d Also Clear download cache when clearing media 2020-06-30 18:48:51 +02:00
Valere
4254db5cc0 fix rebase 2020-06-30 18:48:51 +02:00
Valere
86e5a45621 Fix save notification 2020-06-30 18:48:51 +02:00
Valere
397d4f0be5 Fix upload + cleaning 2020-06-30 18:48:51 +02:00
Valere
01fdc6d1bb Avoid downloading same file several times 2020-06-30 18:48:51 +02:00
Valere
33698abfb2 Download and Open file securily 2020-06-30 18:48:51 +02:00
Valere
80e8cd4191 Downloaded (large?) files are truncated 2020-06-30 18:39:13 +02:00
Valere
2932e05851 Fixes #1468 user search case 2020-06-30 18:38:46 +02:00
Benoit Marty
19f16c9e56 Merge pull request #1570 from vector-im/feature/self_signed
Allow self-signed certificate (#1564)
2020-06-30 18:34:23 +02:00
Benoit Marty
cec5cd864c Remove legacy class, we do not need them for the migration
Migration tested again and OK
2020-06-30 18:27:39 +02:00
Benoit Marty
ba26aee54c Use OkHttpClient with certificate to download files, and to perform wellknown request, and to get terms 2020-06-30 18:27:39 +02:00
Benoit Marty
6721e33c7e cleanup 2020-06-30 18:25:36 +02:00
Benoit Marty
c14b226c92 Search only Kotlin long files 2020-06-30 18:25:36 +02:00
Benoit Marty
4bb804fbf7 Allow self-signed certificate (#1564)
Accepted fingerprint before the migration to RiotX should still work after the migration.
The dialog to trust the certificate is displayed during the login flow.
For the moment, it is not displayed if the certificate change on the server once the user is logged in. This use case will be handled later.
2020-06-30 18:25:36 +02:00
Benoit Marty
6cb82421e4 Merge pull request #1441 from vector-im/feature/MSC2399
Feature/msc2399
2020-06-30 18:20:27 +02:00
Benoit Marty
6e66c31911 Small cleanup 2020-06-30 18:07:39 +02:00
Valere
a1ce245e3a Disable utd merge by default, issue with back paginate 2020-06-30 17:36:24 +02:00
Valere
668967546c Fix / if listener is not removed messages could be duplicated 2020-06-30 17:36:24 +02:00
Valere
5bd448405b Fix test compilation 2020-06-30 17:36:24 +02:00
Valere
fe235e0791 ktlint 2020-06-30 17:36:24 +02:00
Valere
a9191b8fad klint 2020-06-30 17:36:24 +02:00
Valere
63499c2f48 Add test orchestrator dependency 2020-06-30 17:36:24 +02:00
Valere
3fa2647e92 Send with held code on key requests 2020-06-30 17:36:24 +02:00
Valere
cdb1b8d8f8 post merge fix 2020-06-30 17:36:24 +02:00
Valere
c7c35399e5 post rebase 2020-06-30 17:36:24 +02:00
Valere
102b8f88d0 Persist shared session info (enhance key reshare) 2020-06-30 17:36:24 +02:00
Valere
4ca0c23e2a Mock Http requests for test 2020-06-30 17:36:24 +02:00
Valere
36de891451 E2e lab error display 2020-06-30 17:36:24 +02:00
Valere
f9d931960b rename param 2020-06-30 17:35:24 +02:00
Valere
dbe78f160b WithHeld key support initial commit 2020-06-30 17:35:24 +02:00
Benoit Marty
a6f4cd74d5 Merge pull request #1569 from vector-im/feature/fix_improve_epoxy
Feature/fix improve epoxy
2020-06-30 17:28:34 +02:00
Benoit Marty
87a087c0b5 Merge pull request #1464 from vector-im/feature/room_settings
Room Settings: Name, Topic, Photo, Aliases, History Visibility
2020-06-30 16:33:07 +02:00
Benoit Marty
962e11a740 Onuray's remark :) 2020-06-30 16:31:37 +02:00
Benoit Marty
e658ef184d Fix issue with save action visibility 2020-06-30 16:18:56 +02:00
Benoit Marty
da472ea858 Use name instead of computed displayName 2020-06-30 16:10:27 +02:00
Benoit Marty
ff0b92272a Create RoomHistoryVisibilityFormatter 2020-06-30 16:01:07 +02:00
Benoit Marty
cca6d0e967 Cleanup 2020-06-30 15:52:40 +02:00
onurays
e0ea0c195b Hide save action after saving completed. 2020-06-30 14:23:57 +02:00
onurays
b3d4d20195 Check permission before trying to reach Camera. 2020-06-30 14:23:57 +02:00
onurays
5f788d962e Use AlertDialog from v7 compat lib. 2020-06-30 14:23:57 +02:00
onurays
2650453d4b Add room alias first before setting the canonical alias. 2020-06-30 14:23:57 +02:00
onurays
4d6ba5a491 Check permission before triggering history readability click action. 2020-06-30 14:23:57 +02:00
onurays
32721caf5a Code review fix. 2020-06-30 14:23:57 +02:00
onurays
ad084e1fec Use simple dialog for avatar selection. 2020-06-30 14:23:57 +02:00
onurays
512e4f0ce3 Create UCropHelper with default settings. 2020-06-30 14:23:57 +02:00
onurays
56f8e52352 Simplify uploading room and user avatar. 2020-06-30 14:23:57 +02:00
onurays
a93cbf3548 Lint fix. 2020-06-30 14:23:57 +02:00
onurays
e0e4cf3df1 Code review fixes. 2020-06-30 14:23:57 +02:00
onurays
16bd642ae8 Implementation of updating user avatar.
Fixes #1054
2020-06-30 14:23:57 +02:00
onurays
a03f69fb98 Check if user has enough power level to change room avatar. 2020-06-30 14:22:24 +02:00
onurays
8787f5d920 Remove room avatar item from room settings. 2020-06-30 14:22:24 +02:00
onurays
ef1ae4105b Change room avatar in BigImageViewer. 2020-06-30 14:22:24 +02:00
onurays
7f2ce91c82 Add camera and gallery options to set room avatar. 2020-06-30 14:22:24 +02:00
onurays
1f30cf468a Check if user have enough power level to change settings. 2020-06-30 14:22:24 +02:00
onurays
762dd1d0a5 Implementation of canonical alias. 2020-06-30 14:22:24 +02:00
onurays
f5790e5dc2 Implementation of room history readability. 2020-06-30 14:22:24 +02:00
onurays
e1a12f4c77 Show current history readability. 2020-06-30 14:22:24 +02:00
onurays
52eec06110 Updating room avatar is implemented. 2020-06-30 14:22:24 +02:00
onurays
a6e4a328b3 Chain all operations to save settings. 2020-06-30 14:17:19 +02:00
onurays
bfebaa5c6c Show/hide save action button dynamically. 2020-06-30 14:17:19 +02:00
onurays
05e848244e Room name and topic fields added to form. 2020-06-30 14:17:19 +02:00
Onuray Sahin
08710978c5 Change the rageshake tag. 2020-06-30 15:02:37 +03:00
Onuray Sahin
cba9109206 Rename the application. 2020-06-30 14:52:50 +03:00
Onuray Sahin
482621e86f Set versionName to 1.0.0 2020-06-30 14:34:02 +03:00
Valere
c23819bfcf Merge pull request #1489 from vector-im/feature/cross_sigining_evol
Feature/cross sigining evol
2020-06-29 17:27:25 +02:00
Valere
b0034f91b0 code cleaning 2020-06-29 16:37:22 +02:00
Valere
caa7709090 Fix copy of cancel bootstrap 2020-06-29 16:37:22 +02:00
Valere
51b7a0aeae Fix / device change detection broken 2020-06-29 16:37:22 +02:00
Valere
51228a3a5c Fix / settings showing bad options when xsigning not init 2020-06-29 16:37:22 +02:00
Valere
5c091339f0 Fix / bootstrap crosssigning only was not supported 2020-06-29 16:37:22 +02:00
Valere
6643923981 Fix/ pass not save in reauth after login 2020-06-29 16:37:22 +02:00
Valere
4ce2478e44 Fix 404 when uploading xsigning keys
Own device keys was not yet uploaded, now it's done on session open . + added some cleaning of legacy things
2020-06-29 16:37:22 +02:00
Benoit Marty
6131c10d31 Show a more appropriate error when user enter a wrong backup passphrase 2020-06-29 16:36:32 +02:00
Benoit Marty
8c5ec2c57f Restore color for the second phrase 2020-06-29 16:36:32 +02:00
Benoit Marty
e046d17bf2 Remove colored part, as user think they are links. 2020-06-29 16:36:32 +02:00
Benoit Marty
8e7166662b Handle back navigation Recovery backup -> Firstform
Also create BootstrapStep.GetBackupSecretForMigration.useKey() to reduce code duplication
2020-06-29 16:36:32 +02:00
Benoit Marty
3aaa425714 Handle back navigation SetupPassphrase -> Firstform 2020-06-29 16:36:32 +02:00
Benoit Marty
a66010a1d8 Create isCrossSigningInitialized(). Do not display the conclusion Fragment anymore 2020-06-29 16:36:32 +02:00
Benoit Marty
e9706a3b64 Update UI 2020-06-29 16:36:32 +02:00
Benoit Marty
a6e61f4de8 Add link 2020-06-29 16:36:32 +02:00
Benoit Marty
e758ede706 Revert "Remove BootstrapStep.SetupPassphrase and BootstrapStep.ConfirmPassphrase"
This reverts commit 23fa44b6a6a6d34b425e2c1adef4fd2beb9800a7.
2020-06-29 16:36:32 +02:00
Benoit Marty
957fe189dc Fix issue in dark theme and a11y 2020-06-29 16:36:32 +02:00
Benoit Marty
12a4f6f05b Create isRecoverySetup() 2020-06-29 16:36:32 +02:00
Benoit Marty
bcd78a96bf Add FIXME 2020-06-29 16:36:32 +02:00
Benoit Marty
f3b464b88a Bootstrap: Add an introduction step: BootstrapSetupRecoveryKeyFragment 2020-06-29 16:36:32 +02:00
Benoit Marty
369f40c804 Remove developer mode option to set up cross-signing 2020-06-29 16:36:32 +02:00
Benoit Marty
bddd7f4005 Use defined model (tested ok) 2020-06-29 16:36:32 +02:00
Benoit Marty
5434c39453 Change 2020-06-29 16:36:32 +02:00
Benoit Marty
e4ac28877c Ask user password to initialize CrossSigning
And migrate some logic to the ViewModel
2020-06-29 16:36:19 +02:00
Benoit Marty
8df7797f6d Remove BootstrapStep.SetupPassphrase and BootstrapStep.ConfirmPassphrase 2020-06-29 16:36:19 +02:00
Benoit Marty
aa2b62976e Fix bad comment 2020-06-29 16:36:19 +02:00
Benoit Marty
e3dc6e307f Gossip MSK 2020-06-29 16:36:19 +02:00
Benoit Marty
48a30a7b82 Create a ViewState for HomeActivity
And disable the popup - WIP
2020-06-29 16:36:19 +02:00
Benoit Marty
1365240f69 Cleanup 2020-06-29 16:36:19 +02:00
Benoit Marty
1cd27d7f67 First commit to cleanup ReAuthHelper and it's usage
Also add some comment and do some other cleanup
2020-06-29 16:36:19 +02:00
ganfra
84c8f9d351 Clean code 2020-06-29 16:08:45 +02:00
ganfra
7e703e4788 Epoxy: optimize some hashcode in timeline 2020-06-29 15:05:21 +02:00
Benoit Marty
fb13b402af Prevent from importing temporary legacy classes 2020-06-29 14:22:30 +02:00
Benoit Marty
e599abc6ba Merge pull request #1554 from vector-im/feature/op
Feature/op
2020-06-29 14:10:01 +02:00
Benoit Marty
5784c4c8b3 Merge pull request #1527 from vector-im/feature/migration_from_legacy
Feature/migration from legacy
2020-06-29 14:08:53 +02:00
Benoit Marty
cec79fed44 Mutualize code 2020-06-29 11:00:40 +02:00
Benoit Marty
31a7563de5 Make check code quality ok 2020-06-29 10:16:54 +02:00
Benoit Marty
0ad2058a1a Prepare version 0.91.2-beta 2020-06-28 23:05:47 +02:00
Benoit Marty
44365d70fe Add proguard rule for WebRTC 2020-06-28 23:04:30 +02:00
Benoit Marty
bbf0b1e3ba Add a way to ensure we have @JsonClass(generateAdapter = false) for enum class.
This is not ideal, but this will save us in the future.
2020-06-28 22:06:03 +02:00
ganfra
8972319a85 Handle typing through RoomSummaryMapper + fix room summary binding called too many times 2020-06-27 18:26:14 +02:00
Benoit Marty
85f713c8c7 Add missing @JsonClass(generateAdapter = false) for Proguard 2020-06-27 11:52:47 +02:00
Benoit Marty
6e020cada2 Min SDK version is now 21, it has been forgotten to change that. 2020-06-27 11:24:28 +02:00
Benoit Marty
d436a7bad7 Increment version patch for a new release on the PlayStore 2020-06-27 00:14:32 +02:00
Benoit Marty
16a275529d Use temporary name Riot.imX 2020-06-27 00:14:32 +02:00
Benoit Marty
0ad493d860 Comment out android.permission.READ_CALL_LOG 2020-06-26 23:48:41 +02:00
Benoit Marty
30774957ba Handle /nick command (#12) 2020-06-26 23:40:23 +02:00
Benoit Marty
8a1a772ab7 Handle /op and /deop commands (#12)
Also when resetting power level, remove from list of user instead of setting the default value.
2020-06-26 23:31:19 +02:00
Benoit Marty
0d9a10f5fa Fix test compilation 2020-06-26 21:33:47 +02:00
Benoit Marty
1c9907c5d2 Do not abort on error during lint check. 2020-06-26 21:08:41 +02:00
Benoit Marty
050530a991 ktlint 2020-06-26 16:19:05 +02:00
Benoit Marty
f984cff5b4 Auto review 2020-06-26 16:19:05 +02:00
Benoit Marty
ad7297c7e3 CryptoStore migration: step5: convert serialized classes to other classes
legacy MXDeviceInfo and MXOlmInboundGroupSession2
2020-06-26 16:19:05 +02:00
Benoit Marty
17d90a32e1 CryptoStore migration: step4: clear files and prefs 2020-06-26 16:19:05 +02:00
Benoit Marty
89a20eafd8 CryptoStore migration: step3: copy DB and encrypt DB 2020-06-26 16:19:05 +02:00
Benoit Marty
a2be821d2f CryptoStore migration: step2: handle migration to RiotX (not tested) 2020-06-26 16:19:05 +02:00
Benoit Marty
39022b3b66 CryptoStore migration: step1: import migration from Riot-Android (not tested) 2020-06-26 16:19:05 +02:00
Benoit Marty
fe8f79698c Improve code 2020-06-26 16:19:05 +02:00
Benoit Marty
a0a8f95d37 Create LegacySessionImporter class and import credentials - tested OK 2020-06-26 16:19:05 +02:00
Benoit Marty
7247b4471a Import a fix from Riot-android 2020-06-26 16:19:05 +02:00
Benoit Marty
6bce62a598 Update version code to 40_091_00x to upgrade Riot-Android 2020-06-26 16:19:05 +02:00
Benoit Marty
629c73e630 Change applicationId from "im.vector.riotx" to "im.vector.app" 2020-06-26 16:19:05 +02:00
Benoit Marty
fb0d262336 Merge pull request #1510 from vector-im/feature/keys_backup_unstable
Fixes issue from timokoesters and do some cleanup
2020-06-26 15:55:40 +02:00
Benoit Marty
28df09a8d4 ktlint 2020-06-26 15:54:50 +02:00
Benoit Marty
2e93b7c4c9 Auto-review 2020-06-26 15:54:50 +02:00
Benoit Marty
4125baf066 Some more cleanup on the model used to download and to upload keys 2020-06-26 15:54:50 +02:00
Benoit Marty
1fb2569a39 Remove deviceId from /keys/upload/{deviceId} as not spec-compliant (#1502)
FTR: 1b6a74fd93
2020-06-26 15:54:50 +02:00
Benoit Marty
19ed5a2d3d Keys Backup API now use the unstable prefix (#1503) 2020-06-26 15:54:50 +02:00
Valere
84272f5b5d Merge pull request #1534 from vector-im/feature/fix_agelocalts_paginate
Pagination do not set ageLocalTs
2020-06-26 14:40:09 +02:00
Onuray Sahin
90804f7625 Merge pull request #1547 from vector-im/feature/fix_compress_images
Compress images before sending
2020-06-26 15:12:27 +03:00
onurays
824dafb525 ktlint fix. 2020-06-26 14:48:10 +03:00
onurays
3fcf77e214 Lint fix. 2020-06-26 14:10:49 +03:00
onurays
c5d2a34ebd Documentation added to explain creating a cache file. 2020-06-26 12:58:41 +03:00
Valere
a04a0e7175 Code review 2020-06-26 09:20:03 +02:00
Valere
9aa0d38116 Pagination do not set ageLocalTs 2020-06-26 09:19:55 +02:00
ganfra
f8452429a4 Merge pull request #1504 from vector-im/feature/improve_perf
Feature/improve perf
2020-06-25 17:00:56 +02:00
onurays
4349331ee7 Support compressing images on Android 10 and above. 2020-06-25 16:14:54 +03:00
ganfra
1d3dbdf989 Remove unecessary code 2020-06-25 12:20:55 +02:00
ganfra
60c873aa66 Clean code 2020-06-25 12:12:50 +02:00
Benoit Marty
674fa0e5ce Fix bug when changing display name twice
And delete the static summary
2020-06-25 11:59:11 +02:00
ganfra
f28e3ca504 Merge branch 'develop' into feature/improve_perf 2020-06-25 10:57:46 +02:00
onurays
96d6a72b97 Compress images before sending (for devices below Android 10).
Fixes #1333
2020-06-25 10:09:08 +03:00
Benoit Marty
7b3fa501c6 Merge pull request #1545 from johnjohndoe/sharedpreferences
Use SharedPreferences#edit extension function consistently.
2020-06-24 21:47:07 +02:00
Benoit Marty
16dbcc43b0 Merge pull request #1544 from vector-im/feature/fix_1543
User could not redact messages that he has sent (#1543)
2020-06-24 21:24:34 +02:00
Benoit Marty
c0c300925d Merge branch 'develop' into feature/fix_1543 2020-06-24 21:24:25 +02:00
ganfra
0a02a08ed4 Merge pull request #1508 from vector-im/feature/fix_widget
Feature/fix widget
2020-06-24 17:56:32 +02:00
ganfra
95c05f6107 Refact some more code 2020-06-24 17:05:00 +02:00
Tobias Preuss
e24785015d Use SharedPreferences#edit extension function consistently.
+ Add "androidx.core:core-ktx:1.1.0" to "matrix-sdk-android" module which
  was already used in "vector" module.
+ Sources: https://android.googlesource.com/platform/frameworks/support/+/refs/heads/androidx-preference-release/core/core-ktx/src/main/java/androidx/core/content/SharedPreferences.kt.
2020-06-24 15:40:00 +02:00
ganfra
554c37febe Merge branch 'develop' into feature/fix_widget 2020-06-24 15:14:26 +02:00
Benoit Marty
dbb9dc4458 Merge pull request #1541 from johnjohndoe/random-housekeeping
Random housekeeping indicated by Lint
2020-06-24 14:56:23 +02:00
Benoit Marty
c6dba21212 Merge pull request #1542 from vector-im/feature/fix_1537
Use vendor prefix for non merged MSC (#1537)
2020-06-24 14:50:37 +02:00
Benoit Marty
94b5e4e2f8 User could not redact messages that he has sent (#1543) 2020-06-24 14:21:45 +02:00
Benoit Marty
0d891b1c93 Use vendor prefix for non merged MSC (#1537) 2020-06-24 14:10:24 +02:00
Tobias Preuss
2f77deb0a8 Fix package name. 2020-06-24 10:58:47 +02:00
Tobias Preuss
fa0adb17b8 Use "when" subject. 2020-06-24 10:04:50 +02:00
Tobias Preuss
36bd2290e9 Use Kotlin math functions. 2020-06-23 18:31:16 +02:00
Tobias Preuss
372a5ba1ec Use "isNotEmpty" convenience function. 2020-06-23 18:29:24 +02:00
Tobias Preuss
25f45da195 Use indexing operator. 2020-06-23 18:25:37 +02:00
Tobias Preuss
9d191a783d Let variables be "val" if possible. 2020-06-23 18:23:39 +02:00
Tobias Preuss
0dc3593660 Use property access syntax. 2020-06-23 18:22:58 +02:00
Tobias Preuss
f609cc7042 Simplify loop and when statement. 2020-06-23 18:19:58 +02:00
ganfra
360666a758 Creates SessionLifecycleObserver 2020-06-23 15:12:25 +02:00
Benoit Marty
3f44056243 Merge pull request #1526 from johnjohndoe/retrofit2-call-awaitresponse
Use retrofit2.Call.awaitResponse extension provided by Retrofit 2.
2020-06-23 13:53:27 +02:00
Benoit Marty
d075cbf69b Merge pull request #1530 from vector-im/feature/display_name
Add capability to change the display name (#1529)
2020-06-23 13:52:51 +02:00
ganfra
6b13c00d56 Database: add @SessionDatabase on monarchy instances 2020-06-23 13:18:07 +02:00
ganfra
6e95c6c200 Fix in memory local echo filtering 2020-06-23 12:23:23 +02:00
Benoit Marty
35fed2676a Cleanup after Onuray's review and improve wording when removing display name 2020-06-23 11:21:00 +02:00
Benoit Marty
9754e26e5f Add capability to change the display name (#1529) 2020-06-22 20:50:31 +02:00
Benoit Marty
af9295723c Merge pull request #1528 from vector-im/feature/tabs_design
Update room category as per design
2020-06-22 17:39:45 +02:00
Valere
55993aff04 Merge pull request #1416 from vector-im/feature/voip
Call support with WebRTC
2020-06-22 17:23:22 +02:00
Tobias Preuss
66c5a35f36 Use retrofit2.Call.awaitResponse extension provided by Retrofit 2.
+ This extension is identical to the one used in this project and is
  available since Retrofit 2.6.0.
  See b761518aa1.
2020-06-22 17:04:37 +02:00
Valere
c1260dcb9b Update room category as per design 2020-06-22 17:01:15 +02:00
Benoit Marty
f4e7405d92 Cleanup 2020-06-22 16:21:36 +02:00
Benoit Marty
c15cc34bfd Call: a11y 2020-06-22 16:15:15 +02:00
Benoit Marty
16f32da647 Cleanup during review. 2020-06-22 16:15:15 +02:00
Valere
4c34d73501 Fix / connection lost timer launched abusively 2020-06-22 15:10:50 +02:00
Benoit Marty
df1bd62f47 Merge pull request #1512 from johnjohndoe/patch-1
Fix minor typo in contribution guide.
2020-06-22 14:12:08 +02:00
Benoit Marty
3ced179fbb Merge branch 'develop' into patch-1 2020-06-22 14:11:50 +02:00
Benoit Marty
957ceff87c Merge pull request #1520 from johnjohndoe/random-housekeeping
Random housekeeping indicated by Lint
2020-06-22 14:11:08 +02:00
Tobias Preuss
85fcc2eab7 Fix minor typo.
+ Fix spelling of "remaining".
2020-06-22 12:25:34 +02:00
Tobias Preuss
e7143b53d5 Fix self-assignment of callback. 2020-06-22 12:08:49 +02:00
Tobias Preuss
b728e10616 Removed unneeded conversion. 2020-06-22 12:08:49 +02:00
Tobias Preuss
8ffa0061e9 Remove unneeded qualifier for constant. 2020-06-22 12:08:49 +02:00
Tobias Preuss
b767c2fa54 Let variable be "val" if possible. 2020-06-22 12:08:49 +02:00
Tobias Preuss
aeb41bc516 Remove redundant "public" qualifier. 2020-06-22 12:08:49 +02:00
Tobias Preuss
178bdff62a Use string template syntax. 2020-06-22 12:08:49 +02:00
Tobias Preuss
3e79da6a79 Infer type. 2020-06-22 12:08:49 +02:00
ganfra
f762c4c7a2 Makes sure bind and unbind are calling super in items 2020-06-22 11:19:53 +02:00
ganfra
8de0bdca93 Merge branch 'develop' into feature/fix_widget 2020-06-22 10:21:39 +02:00
Valere
ef2fcd60d7 code cleaning 2020-06-22 09:54:45 +02:00
Benoit Marty
55b61775e8 Merge pull request #1514 from 532910/local_resources
put F-Droid and GPlay badges locally
2020-06-22 09:50:54 +02:00
Valere
07e57b1498 clean 2020-06-22 09:48:01 +02:00
Benoit Marty
b522c9f62f Merge pull request #1513 from huoxiaoyao/configure_os_independent
Minor dev setup improvement for Linux/Windows.
2020-06-22 09:47:37 +02:00
Valere
04a7c57d64 Fix / false detection of bt headset + restore state after call 2020-06-22 09:47:34 +02:00
Benoit Marty
367da0c78f Merge pull request #1523 from vector-im/feature/fix_1519
Feature/fix 1519
2020-06-22 09:42:47 +02:00
Benoit Marty
057c21f7d0 Incomplete predicate in RealmCryptoStore#getOutgoingRoomKeyRequest (#1519) 2020-06-22 09:17:37 +02:00
Benoit Marty
af8ab57e60 Rename methods and variables for code clarity 2020-06-22 09:14:59 +02:00
Sergio E. Nemirowski
409b6b807e put F-Droid and GPlay badges locally
this adds images for F-Droid and GPlay buttons for README.md

Signed-off-by: Sergio E. Nemirowski <sergio@outerface.net>
2020-06-20 19:42:31 +03:00
fabianu
4a454f0817 Added ANDROID_STUDIO as optional variable to specify android studio location. 2020-06-20 17:03:10 +02:00
Valere
6b806922ee Fix / prevent camera switch if no second camera 2020-06-20 09:50:32 +02:00
Valere
64a67b57b8 Fix / android 7 unlock screen on incoming call 2020-06-20 09:49:56 +02:00
Valere
76bcf9dcf7 Fix / activeCallPipInitialized not correctly initialized 2020-06-20 09:24:05 +02:00
ganfra
234dfa18d3 Widgets: fix some issues with navigation 2020-06-19 20:38:30 +02:00
ganfra
ba0823f4d0 Widget: fix terms not presented 2020-06-19 20:35:29 +02:00
Valere
9d401512d3 dead code 2020-06-19 19:06:25 +02:00
Valere
464e99505b Update change log 2020-06-19 18:57:50 +02:00
Valere
17cf3fd7ad Active call (with PIP) , in Room and Home 2020-06-19 18:54:39 +02:00
Valere
60998c9146 Missing release of webrtc surfaces 2020-06-19 17:34:05 +02:00
Valere
bd19225219 Add connection loader 2020-06-19 15:20:26 +02:00
Valere
2868d62185 hang up menu action 2020-06-19 15:20:10 +02:00
Valere
2a3d20d300 FIx rebase 2020-06-19 13:42:35 +02:00
Valere
30dee07a3b Hide switch camera for voice call 2020-06-19 13:37:12 +02:00
Valere
96ecb1d07e Fix Crash / stop capture in wrong thread 2020-06-19 13:37:12 +02:00
Valere
99056a7807 Fix / inversed icons HD/SD 2020-06-19 13:37:12 +02:00
Valere
374790176f Toggle HD/SD 2020-06-19 13:37:12 +02:00
Valere
f3e2a55869 Crash Fix / nullify factory after dispose 2020-06-19 13:37:12 +02:00
Valere
666f3ea152 code quality 2020-06-19 13:37:12 +02:00
Valere
25fe56116c Ask for permission before starting call 2020-06-19 13:37:12 +02:00
Valere
b27eead016 Support toggle front/back camera 2020-06-19 13:36:42 +02:00
Valere
77a01f0cd4 lazy create and destroy peer connection factory 2020-06-19 13:36:42 +02:00
Valere
5dfa08ace6 Bluetooth headset support 2020-06-19 13:36:42 +02:00
Valere
4c61dfef62 Support headset buttons in background 2020-06-19 13:36:42 +02:00
Valere
9653f082a3 accept/hangup on press on headset button 2020-06-19 13:36:42 +02:00
Valere
3e2d892fb5 Headset support
+ detect plug/unplugg
2020-06-19 13:36:42 +02:00
Valere
30d47b4fa6 Clear incoming calls managed by other session 2020-06-19 13:36:42 +02:00
Valere
fd3f591541 Show error on connecting timeout + refactoring 2020-06-19 13:36:42 +02:00
Valere
c85ba51274 Basic discard of old call events 2020-06-19 13:36:42 +02:00
Valere
843da1d48d Incoming notification + ringing 2020-06-19 13:36:42 +02:00
Valere
d8cf44fdc9 Simple cache of turn server response
in memory cache in service + show active call banner only if connected
2020-06-19 13:36:42 +02:00
Valere
8662797cf8 Restart capture after close for older android 2020-06-19 13:36:42 +02:00
Valere
eabb0bb41d Restart capture when camera is back to available 2020-06-19 13:36:42 +02:00
Valere
4966bef9c3 Quick signaling doc 2020-06-19 13:36:42 +02:00
Valere
0f625c27a1 Simple menu to select sound device 2020-06-19 13:36:42 +02:00
Valere
248b9ff1e1 Very basic audio speaker support 2020-06-19 13:36:42 +02:00
Valere
39f3a1c697 Fix glitch when opening timeline first time 2020-06-19 13:36:42 +02:00
Valere
c6100fc26c Code cleaning 2020-06-19 13:36:42 +02:00
Valere
84b474d070 klint 2020-06-19 13:36:42 +02:00
Valere
c4b977c6e1 Basic return to call Ux in Room detail 2020-06-19 13:36:42 +02:00
Valere
a1907aaddb Cleaning call states 2020-06-19 13:36:16 +02:00
Valere
56ed56a986 let remote view resize with aspect ratio 2020-06-19 13:36:16 +02:00
Valere
91f28bfb8a basic toggle mute and toggle video 2020-06-19 13:36:16 +02:00
Valere
46d7db8214 klint 2020-06-19 13:36:16 +02:00
Valere
b5cdb44642 Fix rebase 2020-06-19 13:36:16 +02:00
Valere
cb964c6dcd dead code 2020-06-19 13:36:16 +02:00
Valere
e79a4771c1 revert test code 2020-06-19 13:36:16 +02:00
Valere
9006acb66a WIP | Avoid re-negociation pre-agree-upon signaling/negotiation. 2020-06-19 13:36:16 +02:00
onurays
435a6b2f1a Add ice candidates to peer connection. 2020-06-19 13:36:16 +02:00
onurays
4d288ddd55 Require turn server before creating PeerConnection. 2020-06-19 13:36:16 +02:00
onurays
24cea5110e Show / hide call views according to call type. 2020-06-19 13:36:16 +02:00
onurays
79f804b2d4 Use single sdp and stream observer. 2020-06-19 13:36:16 +02:00
onurays
4b85e39e3e Implementation of turn server api. 2020-06-19 13:36:16 +02:00
onurays
8f5918de4d Cleanup unused code. 2020-06-19 13:36:16 +02:00
Benoit Marty
ae762aa928 Cleanup 2020-06-19 13:36:16 +02:00
Benoit Marty
928da82dde Make menu item live 2020-06-19 13:36:16 +02:00
Benoit Marty
94ea857738 Fix icons tint, esp in dark theme 2020-06-19 13:36:03 +02:00
Benoit Marty
0bb92e9e91 Hide m.call.candidates in the timeline by default.
And handle them correctly when all events are displayed
2020-06-19 13:36:03 +02:00
Benoit Marty
df4aab1d73 Use EventType.isCallEvent() 2020-06-19 13:36:03 +02:00
Benoit Marty
d3f93984d4 Compact coding 2020-06-19 13:36:03 +02:00
Benoit Marty
125d61eb68 Rename parameters 2020-06-19 13:36:03 +02:00
onurays
c0988ba6d9 Merge conflicts and implement answer function. 2020-06-19 13:36:03 +02:00
Benoit Marty
03b9904b07 Create a MxCall interface to better handle call 2020-06-19 13:36:03 +02:00
Benoit Marty
24a9931abd Rename some API 2020-06-19 13:36:03 +02:00
Benoit Marty
2581a3433e Create RoomCallService 2020-06-19 13:36:03 +02:00
Benoit Marty
8c9ca1e0f2 Cleanup listener 2020-06-19 13:35:38 +02:00
Benoit Marty
dcae051e85 Create enum as per the spec and use default values when applicable 2020-06-19 13:35:38 +02:00
Benoit Marty
3d03bf6f91 Add Javadoc to the model 2020-06-19 13:35:38 +02:00
onurays
54b154f85f Send sdp to remote party when answer is received. 2020-06-19 13:35:38 +02:00
onurays
37c926d178 Attach local video renderers. 2020-06-19 13:35:38 +02:00
onurays
f50f81d321 Implement rejecting incoming call. 2020-06-19 13:35:38 +02:00
onurays
743ace7e60 Move voip responsibilities from views to WebRtcPeerConnectionManager. 2020-06-19 13:35:38 +02:00
onurays
5d476e7259 Show the foreground service for incoming and outgoing calls. 2020-06-19 13:35:38 +02:00
onurays
fb6bcc8470 Foreground call service and action receiver implemented. 2020-06-19 13:35:38 +02:00
onurays
bda1633979 New material resources added. 2020-06-19 13:35:38 +02:00
onurays
4169f580b8 Create foreground call service. 2020-06-19 13:35:38 +02:00
onurays
4a4edcf82a Experimental implementation of Telecom API. 2020-06-19 13:35:38 +02:00
onurays
a1fc0db8a2 Finish CallActivity when m.call.hangup received. 2020-06-19 13:35:38 +02:00
Valere
dc19652c2b WIP
refact WIP


TMP


WIP
2020-06-19 13:35:38 +02:00
Benoit Marty
d2f1488934 Merge pull request #1500 from vector-im/feature/api_21
Min SDK level set to 21 (#405)
2020-06-19 09:45:22 +02:00
Benoit Marty
bbdf6c6eaf Merge pull request #1496 from vector-im/feature/small_fixies
Small fixies
2020-06-18 14:31:11 +02:00
Benoit Marty
f532d28fb3 Min SDK level set to 21 (#405) 2020-06-18 14:18:40 +02:00
Benoit Marty
0135368328 Prevent infinite loop on 403 and fix bad url used to load the terms 2020-06-18 10:06:31 +02:00
Benoit Marty
af81a52746 Use CustomChromeTab to open T&C 2020-06-17 19:04:35 +02:00
Benoit Marty
86b4c9ac73 "Add Matrix app" menu is now always visible (#1495) 2020-06-17 18:13:09 +02:00
Benoit Marty
1df3b4e18f Fix dark theme issue on login screen (#1097) 2020-06-17 15:52:31 +02:00
Benoit Marty
fa204eca3b Add link to Widget doc 2020-06-17 15:37:35 +02:00
Benoit Marty
2c34fe2dc3 Add airplane mode icon 2020-06-17 15:30:56 +02:00
Benoit Marty
9c34187391 Move "integration" setting above "advanced" section 2020-06-17 15:17:22 +02:00
ganfra
10d78a3102 Shortcuts: avoid crash when retrieving images 2020-06-16 17:50:43 +02:00
ganfra
46378845e9 Typings: extract from room summary and use an in memory tracker 2020-06-16 17:50:08 +02:00
Benoit Marty
ff39b22686 Add changelog entry for proguard 2020-06-16 11:18:33 +02:00
Benoit Marty
601e11980f Merge pull request #1478 from vector-im/feature/proguard
Feature/proguard
2020-06-16 11:15:21 +02:00
ganfra
8cef299878 Timeline: add room summary holder to avoid fetching in item factory 2020-06-16 11:08:38 +02:00
Benoit Marty
914bfb105c Version++ 2020-06-15 23:28:57 +02:00
Benoit Marty
8c98125755 Merge branch 'release/0.22.0' 2020-06-15 23:27:49 +02:00
Benoit Marty
076ecca5a9 Merge branch 'release/0.22.0' into develop 2020-06-15 23:27:48 +02:00
Benoit Marty
840648b750 Prepare release 0.22.0 2020-06-15 23:27:10 +02:00
Benoit Marty
29fd4c4bd2 Fix issue on dark themes, after alert popup dismiss 2020-06-15 23:25:32 +02:00
Benoit Marty
905fa7dd86 Format 2020-06-15 20:05:50 +02:00
Benoit Marty
e8af71f641 Merge pull request #1485 from RiotTranslateBot/weblate-riot-android-riotx-application
Update from Weblate
2020-06-15 20:05:02 +02:00
rkfg
6901d368d2 Translated using Weblate (Russian)
Currently translated at 100.0% (231 of 231 strings)

Translation: Riot Android/RiotX Matrix SDK
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/ru/
2020-06-15 15:43:04 +00:00
Benoit Marty
e89a340fae Format string resources 2020-06-15 16:47:05 +02:00
Benoit Marty
c3d6135fb3 Fix lint issues 2020-06-15 16:29:10 +02:00
Benoit Marty
6611defd87 Merge pull request #1484 from RiotTranslateBot/weblate-riot-android-riotx-application
Update from Weblate
2020-06-15 16:10:51 +02:00
Weblate
5c449a9e30 michaelk merges translation 2020-06-15 13:24:46 +00:00
LinAGKar
415ac6a748 Translated using Weblate (Swedish)
Currently translated at 41.5% (712 of 1717 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/sv/
2020-06-15 12:55:46 +00:00
Osoitz
7ddafa098f Translated using Weblate (Basque)
Currently translated at 100.0% (164 of 164 strings)

Translation: Riot Android/RiotX Matrix SDK
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/eu/
2020-06-15 12:55:45 +00:00
Osoitz
177f7b9cb3 Translated using Weblate (Basque)
Currently translated at 100.0% (1717 of 1717 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/eu/
2020-06-15 12:55:45 +00:00
Benoit Marty
fb1704b717 Merge pull request #1465 from vector-im/bmarty-patch-1
Add command line to run Android test
2020-06-15 14:48:01 +02:00
Benoit Marty
ade1f1b911 Merge pull request #1479 from vector-im/feature/memory_leaks
Feature/memory leaks
2020-06-15 14:47:16 +02:00
Benoit Marty
344a9836d2 Typo and cleanup 2020-06-15 14:44:44 +02:00
Benoit Marty
2c1487d303 Merge pull request #1466 from vector-im/feature/toggle_favorite
Add capability to add and remove a room from the favorites (#1217)
2020-06-15 14:29:48 +02:00
LinAGKar
e1e505e695 Translated using Weblate (Swedish)
Currently translated at 40.8% (701 of 1717 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/sv/
2020-06-14 05:26:12 +00:00
Marko Dimjašević
c5cd68416f Translated using Weblate (Croatian)
Currently translated at 71.6% (1229 of 1717 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/hr/
2020-06-14 05:26:12 +00:00
Slavi Pantaleev
45f757e157 Translated using Weblate (Bulgarian)
Currently translated at 100.0% (164 of 164 strings)

Translation: Riot Android/RiotX Matrix SDK
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/bg/
2020-06-14 05:26:12 +00:00
Slavi Pantaleev
de77c8a210 Translated using Weblate (Bulgarian)
Currently translated at 82.8% (1421 of 1717 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/bg/
2020-06-14 05:26:11 +00:00
ganfra
54b3af2c88 Merge pull request #1459 from vector-im/feature/power_level
Feature/power level
2020-06-12 16:12:37 +02:00
ganfra
171a945de9 Membership: refact a bit and add a left message when kicked or banned 2020-06-12 15:29:07 +02:00
LinAGKar
d845d10d73 Translated using Weblate (Swedish)
Currently translated at 40.7% (699 of 1717 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/sv/
2020-06-12 11:26:16 +00:00
reg4xp
98d91a746e Translated using Weblate (Persian)
Currently translated at 100.0% (164 of 164 strings)

Translation: Riot Android/RiotX Matrix SDK
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/fa/
2020-06-12 11:26:15 +00:00
reg4xp
1be1b5b263 Translated using Weblate (Persian)
Currently translated at 34.4% (591 of 1717 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/fa/
2020-06-12 11:26:15 +00:00
Marko Dimjašević
dafb0c8d5c Translated using Weblate (Croatian)
Currently translated at 71.5% (1227 of 1717 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/hr/
2020-06-12 11:26:09 +00:00
ganfra
6ca69a9947 Remove unnecessary comment 2020-06-12 10:02:57 +02:00
ganfra
ff171a39c6 Memory leaks: clean after Benoit's remarks 2020-06-12 09:58:45 +02:00
Benoit Marty
8acee57118 Implement my suggestions 2020-06-11 22:01:04 +02:00
Benoit Marty
d03ab989e6 Hide WidgetBanner by default, it can be visible if phone is slow 2020-06-11 21:42:04 +02:00
Benoit Marty
4f5b1d9646 Close Activity when room is left.
Create a dedicated ViewModel to handle that in Activity rather than multiple times in Fragments
2020-06-11 21:40:22 +02:00
ganfra
f8dca1237a Fix lint issues 2020-06-11 20:20:06 +02:00
ganfra
c382f706a6 Leaks: disable leakcanary 2020-06-11 19:40:46 +02:00
ganfra
23cbed310a Proguard: activate it in release 2020-06-11 19:37:20 +02:00
ganfra
1786ba30f7 Proguard: handle matrix sdk 2020-06-11 19:36:15 +02:00
Benoit Marty
530ce0952c Typo and cleanup 2020-06-11 18:00:34 +02:00
Benoit Marty
262f10af9a Remove ability to kick or ban yourself 2020-06-11 16:59:14 +02:00
Benoit Marty
3430a8f3ea Fix demote yourself issue 2020-06-11 16:48:32 +02:00
Benoit Marty
959be3a23d Fix layout issue on read only rooms 2020-06-11 16:39:41 +02:00
Benoit Marty
15306fc116 Italic text 2020-06-11 16:30:34 +02:00
Benoit Marty
fb5013db88 Restore previous way to managed power level string, to be able to translate them correctly 2020-06-11 16:27:46 +02:00
Benoit Marty
ab4780c9b9 Remove translation of deleted strings 2020-06-11 16:27:46 +02:00
ganfra
e6a71ab7de PowerLevel: fix role order 2020-06-11 13:49:36 +02:00
LinAGKar
6aecf68098 Translated using Weblate (Swedish)
Currently translated at 40.6% (697 of 1717 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/sv/
2020-06-11 06:29:33 +00:00
Nils Haugen
dc54c6139f Translated using Weblate (Norwegian Nynorsk)
Currently translated at 49.4% (848 of 1717 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/nn/
2020-06-11 06:29:33 +00:00
Priit Jõerüüt
71f158c526 Translated using Weblate (Estonian)
Currently translated at 97.6% (160 of 164 strings)

Translation: Riot Android/RiotX Matrix SDK
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/et/
2020-06-11 06:29:32 +00:00
Marko Dimjašević
dc7067baff Translated using Weblate (Croatian)
Currently translated at 71.5% (1227 of 1717 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/hr/
2020-06-11 06:29:32 +00:00
Besnik Bleta
ced226777f Translated using Weblate (Albanian)
Currently translated at 99.6% (1710 of 1717 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/sq/
2020-06-11 06:29:27 +00:00
ganfra
579d4f7a5b Merge branch 'develop' into feature/power_level 2020-06-10 17:21:04 +02:00
ganfra
60b91d4d50 PowerLevel : clean after Benoit's review 2020-06-10 17:19:33 +02:00
ganfra
917042c48c Remove memory leak from Autocompleter 2020-06-10 16:14:19 +02:00
Benoit Marty
ed27c35bb4 Merge pull request #1467 from vector-im/feature/modular_link
Update link to Modular url from "https://modular.im/" to "https://modular.im/services/matrix-hosting-riot" and open it using ChromeCustomTab
2020-06-10 10:12:48 +02:00
Benoit Marty
c35c94b7b7 Update link to Modular url from "https://modular.im/" to "https://modular.im/services/matrix-hosting-riot" and open it using ChromeCustomTab 2020-06-10 09:13:08 +02:00
Benoit Marty
d8317f7439 Add capability to add and remove a room from the favorites (#1217) 2020-06-10 00:42:14 +02:00
Benoit Marty
9a3813f883 Add command line to run Android test 2020-06-09 17:04:50 +02:00
Benoit Marty
0a7f77ea16 ktlint 2020-06-08 22:08:59 +02:00
ganfra
d6329a1ab6 Start looking at memory leaks 2020-06-08 19:46:55 +02:00
Benoit Marty
0ba120356a Merge pull request #1447 from vector-im/feature/fix_version
Feature/fix version
2020-06-08 18:16:51 +02:00
Benoit Marty
d402b49f07 Merge branch 'develop' into feature/fix_version 2020-06-08 18:16:42 +02:00
Benoit Marty
d4ba9fa09a Cleanup after Ganfra's review 2020-06-08 18:15:00 +02:00
Benoit Marty
62f352243d Merge pull request #1448 from vector-im/feature/fix
Feature/fix
2020-06-08 18:10:06 +02:00
Benoit Marty
1ad19b5e93 Merge branch 'develop' into feature/fix 2020-06-08 18:09:57 +02:00
Benoit Marty
e7ba0a5c60 Merge pull request #1449 from vector-im/feature/fix_1444
Wrong /query request (#1444)
2020-06-08 18:07:23 +02:00
Benoit Marty
050407f7c7 Merge branch 'develop' into feature/fix_1444 2020-06-08 18:07:15 +02:00
Benoit Marty
dffe096c59 Merge pull request #1451 from vector-im/feature/sso_redirect
Correctly handle SSO login redirection
2020-06-08 18:06:00 +02:00
ganfra
bf5ad2cf18 Power level: warn when demoting yourself 2020-06-08 17:36:30 +02:00
ganfra
a8ae4ddde8 Power level: use confirmation dialog 2020-06-08 16:33:56 +02:00
LinAGKar
2596a9ef7e Translated using Weblate (Swedish)
Currently translated at 40.4% (694 of 1717 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/sv/
2020-06-08 11:29:54 +00:00
Eduardo F
f74989ac1d Translated using Weblate (Portuguese (Brazil))
Currently translated at 51.2% (879 of 1717 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/pt_BR/
2020-06-08 11:29:40 +00:00
Krystian Chachuła
d3bc4017a5 Translated using Weblate (Polish)
Currently translated at 90.8% (1559 of 1717 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/pl/
2020-06-08 11:29:39 +00:00
Nils Haugen
ab8480d983 Translated using Weblate (Norwegian Nynorsk)
Currently translated at 78.0% (128 of 164 strings)

Translation: Riot Android/RiotX Matrix SDK
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/nn/
2020-06-08 11:29:39 +00:00
Nils Haugen
50dcc24900 Translated using Weblate (Norwegian Nynorsk)
Currently translated at 49.3% (847 of 1717 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/nn/
2020-06-08 11:29:39 +00:00
Marko Dimjašević
a66470f93b Translated using Weblate (Croatian)
Currently translated at 68.9% (1183 of 1717 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/hr/
2020-06-08 11:29:38 +00:00
ganfra
d2dba1826d Update CHANGES 2020-06-08 10:32:02 +02:00
ganfra
7f02195377 Clean code 2020-06-08 10:29:09 +02:00
ganfra
0002cddd67 Merge branch 'develop' into feature/power_level 2020-06-08 10:12:53 +02:00
Benoit Marty
19e1683106 Move class LoginFlowType to api package 2020-06-08 09:16:31 +02:00
Benoit Marty
5c538c7865 Clarify type when retrieving supported login flow (be conform to the spec) 2020-06-08 09:11:23 +02:00
Benoit Marty
ee23967afe I made a mistake: registration step m.login.token type is not the same that login request. 2020-06-08 08:53:06 +02:00
ganfra
86dd8f3fd8 Update epoxy to last stable version 2020-06-05 20:14:36 +02:00
ganfra
f19e2a0995 Room left: fix state not being updated 2020-06-05 20:09:30 +02:00
ganfra
afd1002fdb Room Permission: default to true for sending event 2020-06-05 20:09:13 +02:00
ganfra
07c7ed0a4e Powerlevel: use edit text for custom 2020-06-05 20:08:39 +02:00
Benoit Marty
b48eb6e9cc SSO Update the documentation 2020-06-05 19:14:31 +02:00
ganfra
e5da5a34cb Power levels: handle some action permissions 2020-06-05 19:12:33 +02:00
Benoit Marty
f3a2c467ed small typo 2020-06-05 12:21:58 +02:00
ganfra
a1fd35aa67 Room member: continue to branch admin/moderator actions 2020-06-05 11:13:00 +02:00
ganfra
ad8ed37ff6 Profile action: fix editable icon 2020-06-05 11:12:33 +02:00
Benoit Marty
088e8bc9f9 Add some comment 2020-06-05 10:09:49 +02:00
Benoit Marty
3714323d74 Rename Constants 2020-06-05 01:16:19 +02:00
Benoit Marty
d70b19fa93 SSO login is now performed in the default browser (#1400) - WIP
Use ChromeCustomTabs to host the SSO web page
2020-06-05 01:14:35 +02:00
ganfra
08693a6875 Add some admin actions (ban, kick, unban) 2020-06-04 18:36:28 +02:00
ganfra
73eca2407b Power level: handle timeline rendering 2020-06-04 17:18:39 +02:00
Benoit Marty
ae7a52cecf Correctly handle SSO login redirection 2020-06-04 16:55:27 +02:00
Benoit Marty
2e244dd448 Merge pull request #1446 from vector-im/feature/various_fixes
Hide left rooms in breadcrumbs (#766)
2020-06-04 15:07:45 +02:00
Benoit Marty
1ad77530aa Use RoomSummaryQueryParams as per Ganfra's excellent suggestion 2020-06-04 14:36:51 +02:00
Benoit Marty
e44963728f Merge pull request #1450 from vector-im/feature/navigation_bar
Fix bad color contrast for navigation and status bar
2020-06-04 14:31:06 +02:00
ganfra
9075371145 Power level: start to handle updating 2020-06-04 13:09:20 +02:00
Benoit Marty
3b256a708e Fix status bar icon contrast on API in [21,23[ 2020-06-04 12:55:27 +02:00
Benoit Marty
aea517515c Fix navigation bar icon contrast on API in [21,27[ (#1342) 2020-06-04 12:50:42 +02:00
Benoit Marty
f28889284d Wrong /query request (#1444) 2020-06-04 11:59:04 +02:00
Valere
240f1f51b9 Merge pull request #1437 from vector-im/feature/fix_1169
Fix / reply ux stays too long
2020-06-04 11:44:53 +02:00
Valere
05efd7423e Merge branch 'develop' into feature/fix_1169 2020-06-04 11:44:32 +02:00
Benoit Marty
fce8a3bc18 changes.md 2020-06-04 11:43:54 +02:00
Valere
2adb5af051 update change log 2020-06-04 11:43:47 +02:00
Benoit Marty
8b7e5e527a Make Credentials.homeServer optional because it is deprecated (#1443)
It is never used currently in RiotX, but if homeserver does not sent it, it would crash.
2020-06-04 11:41:32 +02:00
Benoit Marty
c3d8916802 fix param name 2020-06-04 11:40:38 +02:00
Benoit Marty
532f5e58ea Move class Versions to internal package 2020-06-04 11:30:24 +02:00
Benoit Marty
57a5714fb5 Add the ability to compare Homeserver version (#1442) 2020-06-04 11:24:31 +02:00
Benoit Marty
a3fd49499b Hide left rooms in breadcrumbs (#766) 2020-06-04 08:59:01 +02:00
Benoit Marty
3dc2cd4d7a Disable one code check 2020-06-03 18:54:03 +02:00
Benoit Marty
0b738e3d9e Merge pull request #1409 from vector-im/feature/markdown_test
Send plain text in the body
2020-06-03 18:45:06 +02:00
Benoit Marty
b29c2b2de4 Send plain text in the body
According to https://matrix.org/docs/spec/client_server/latest#m-room-message-msgtypes, the plain text version of the HTML should be provided in the body.

Also create MarkdownParser class to be able to unit test it.
2020-06-03 18:44:35 +02:00
Benoit Marty
40f2d19f81 Merge pull request #1415 from vector-im/feature/signup_username_digit
Temporary fix to show error when user is creating an account on matrix.org with userId containing only digits (#1410)
2020-06-03 18:41:55 +02:00
Benoit Marty
2e997f2c67 Wrong issue number 2020-06-03 18:41:27 +02:00
Benoit Marty
0fd50892af Temporary fix to show error when user is creating an account on matrix.org with userId containing only digits (#1410) 2020-06-03 18:41:07 +02:00
Benoit Marty
55bd346cb2 Merge pull request #1425 from vector-im/feature/integration_manager
Feature/integration manager
2020-06-03 18:10:03 +02:00
ganfra
0724ac133b Widget notice: capitalize first letter 2020-06-03 15:22:20 +02:00
ganfra
0507fa5b0e Widgets: clean again after Benoit's review 2020-06-03 12:00:52 +02:00
Benoit Marty
617e945afa Merge pull request #1436 from vector-im/feature/Fix_1430_X_made_no_change
Hide "X made no changes" event by default in timeline (#1430)
2020-06-03 09:47:51 +02:00
Benoit Marty
870c4bf765 Check that content is not null 2020-06-03 09:32:20 +02:00
Benoit Marty
9a592e9c7e Create IsUselessResolver object 2020-06-03 01:13:02 +02:00
ganfra
53592ac404 Fix lint issues 2020-06-02 20:28:18 +02:00
ganfra
d8848a6062 Merge branch 'develop' into feature/integration_manager 2020-06-02 20:26:03 +02:00
ganfra
173c1d3a6e Integration: make the default urls modifiable from MatrixConfiguration 2020-06-02 20:05:00 +02:00
ganfra
c815c4080d Widget: changes naming algorithm (align on web) 2020-06-02 19:51:16 +02:00
Valere
c09626182c Fix / reply ux stays too long 2020-06-02 19:31:25 +02:00
ganfra
65c6ce3033 Merge branch 'feature/integration_manager' of github.com:vector-im/riotX-android into feature/integration_manager 2020-06-02 19:02:31 +02:00
ganfra
06cc2f527e Clean after Benoit's review 2020-06-02 19:02:21 +02:00
ganfra
9da5061689 Update CHANGES.md
Co-authored-by: Benoit Marty <benoitm@matrix.org>
2020-06-02 16:37:51 +02:00
ganfra
82b4415f7d Widget: fix loading widgets without scalar token 2020-06-02 16:02:10 +02:00
Benoit Marty
3f1e5b9b1e Hide "X made no changes" event by default in timeline (#1430) 2020-06-02 15:54:01 +02:00
Benoit Marty
1b95d98ccd Merge pull request #1423 from vector-im/feature/invalidate
Yet another cleanup PR
2020-06-02 14:42:51 +02:00
Benoit Marty
e2e1925796 Restore .observeOn(AndroidSchedulers.mainThread()) 2020-06-02 14:24:29 +02:00
Benoit Marty
52c8f24df5 Merge pull request #1417 from vector-im/feature/you
Use "you" instead of your display name for notice events you have sent
2020-06-02 14:16:46 +02:00
Benoit Marty
ca855da8ae Fix issue reported during review by Onuray 2020-06-02 13:15:03 +02:00
Benoit Marty
a39d35e54c Improve Kotlin code readability: use when instead of if and add a few newlines 2020-06-02 13:15:03 +02:00
Benoit Marty
3bd2b24b10 Use "you" instead of display name when the current user has sent the event. 2020-06-02 13:15:03 +02:00
Benoit Marty
12448426d4 Fix typo reported by rageshake 2020-06-01 22:12:11 +02:00
LinAGKar
a043d7cac7 Translated using Weblate (Swedish)
Currently translated at 25.4% (436 of 1717 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/sv/
2020-06-01 15:29:17 +00:00
rkfg
4d88111d48 Translated using Weblate (Russian)
Currently translated at 100.0% (164 of 164 strings)

Translation: Riot Android/RiotX Matrix SDK
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/ru/
2020-06-01 15:29:15 +00:00
rkfg
34d6610bf8 Translated using Weblate (Russian)
Currently translated at 85.0% (1459 of 1717 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/ru/
2020-06-01 15:29:15 +00:00
Nils J. Haugen
4bfc52327b Translated using Weblate (Norwegian Nynorsk)
Currently translated at 49.4% (849 of 1717 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/nn/
2020-06-01 15:29:14 +00:00
nosorae
15d5f7ff55 Translated using Weblate (Korean)
Currently translated at 73.2% (1256 of 1717 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/ko/
2020-06-01 15:29:14 +00:00
Szimszon
91ecd1aeeb Translated using Weblate (Hungarian)
Currently translated at 100.0% (1717 of 1717 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/hu/
2020-06-01 15:29:14 +00:00
sr093906
342f871916 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (164 of 164 strings)

Translation: Riot Android/RiotX Matrix SDK
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/zh_Hans/
2020-06-01 15:29:10 +00:00
Nikita Ledenev
18d51de0b9 Translated using Weblate (Russian)
Currently translated at 85.0% (1459 of 1717 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/ru/
2020-06-01 06:08:36 +00:00
rkfg
4dc6cae854 Translated using Weblate (Russian)
Currently translated at 85.0% (1459 of 1717 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/ru/
2020-06-01 06:08:35 +00:00
rkfg
5fb160e1ac Translated using Weblate (Russian)
Currently translated at 83.8% (1439 of 1717 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/ru/
2020-05-30 18:28:21 +00:00
Амёба
f1589314c2 Translated using Weblate (Russian)
Currently translated at 83.8% (1439 of 1717 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/ru/
2020-05-30 18:28:19 +00:00
LinAGKar
7fb9a550c8 Translated using Weblate (Swedish)
Currently translated at 23.2% (399 of 1717 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/sv/
2020-05-30 09:29:28 +00:00
Амёба
46f7f4814c Translated using Weblate (Russian)
Currently translated at 82.6% (1418 of 1717 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/ru/
2020-05-30 09:29:24 +00:00
Benoit Marty
c002cc104c Translated using Weblate (Portuguese (Brazil))
Currently translated at 51.1% (878 of 1717 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/pt_BR/
2020-05-30 09:29:22 +00:00
random
492128a621 Translated using Weblate (Italian)
Currently translated at 100.0% (164 of 164 strings)

Translation: Riot Android/RiotX Matrix SDK
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/it/
2020-05-30 09:29:22 +00:00
random
fff0f09684 Translated using Weblate (Italian)
Currently translated at 100.0% (1717 of 1717 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/it/
2020-05-30 09:29:22 +00:00
Szimszon
64054d13a3 Translated using Weblate (Hungarian)
Currently translated at 100.0% (164 of 164 strings)

Translation: Riot Android/RiotX Matrix SDK
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/hu/
2020-05-30 09:29:20 +00:00
Szimszon
ae8d7096c3 Translated using Weblate (Hungarian)
Currently translated at 98.5% (1691 of 1717 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/hu/
2020-05-30 09:29:20 +00:00
Kévin C
13e04b6362 Translated using Weblate (French)
Currently translated at 100.0% (164 of 164 strings)

Translation: Riot Android/RiotX Matrix SDK
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/fr/
2020-05-30 09:29:19 +00:00
Kévin C
89e557bcef Translated using Weblate (French)
Currently translated at 100.0% (1717 of 1717 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/fr/
2020-05-30 09:29:19 +00:00
Samu Voutilainen
fdf4749c1b Translated using Weblate (Finnish)
Currently translated at 99.4% (163 of 164 strings)

Translation: Riot Android/RiotX Matrix SDK
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/fi/
2020-05-30 09:29:17 +00:00
zeritti
a63608bf97 Translated using Weblate (Czech)
Currently translated at 100.0% (1717 of 1717 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/cs/
2020-05-30 09:29:17 +00:00
Jeff Huang
5c101e9466 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (164 of 164 strings)

Translation: Riot Android/RiotX Matrix SDK
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/zh_Hant/
2020-05-30 09:29:12 +00:00
Jeff Huang
4b25ebc731 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (1717 of 1717 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/zh_Hant/
2020-05-30 09:29:12 +00:00
Besnik Bleta
8e88fcb462 Translated using Weblate (Albanian)
Currently translated at 99.4% (163 of 164 strings)

Translation: Riot Android/RiotX Matrix SDK
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/sq/
2020-05-30 09:29:10 +00:00
Besnik Bleta
fd19b345a1 Translated using Weblate (Albanian)
Currently translated at 99.4% (1707 of 1717 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/sq/
2020-05-30 09:29:10 +00:00
Benoit Marty
4a7bba047b Merge pull request #1420 from vector-im/feature/fix_theme_switch
Fix: Switch theme is not fully taken into account without restarting the app
2020-05-29 19:22:43 +02:00
ganfra
440c21e9f3 Update CHANGES 2020-05-29 19:06:06 +02:00
ganfra
959b679086 Clean files 2020-05-29 19:03:54 +02:00
ganfra
64cfd4d81a Widget: fix nullable widgetId 2020-05-29 18:08:56 +02:00
ganfra
c742ca3b41 Widget: fix widget title color 2020-05-29 17:09:10 +02:00
ganfra
2002252f72 Widget: Handle failures on permissions 2020-05-29 16:44:17 +02:00
ganfra
7df8b3a9bf Widgets: observe wellknown for integ config and open Jitsi in browser 2020-05-29 12:23:36 +02:00
Benoit Marty
3fea2173f4 Move fun to a dedicated file. 2020-05-29 11:57:20 +02:00
Benoit Marty
d125cb5c01 Some cleanup:
- use invalidate() from MvRx
- use throttleFirst instead of debounce
- remove useless observe on main thread
- remove useless calls to super.invalidate()
2020-05-29 11:36:27 +02:00
Benoit Marty
86c9264ed9 Fix: Switch theme is not fully taken into account without restarting the app 2020-05-28 23:03:04 +02:00
ganfra
00f2d0249f Merge branch 'develop' into feature/integration_manager 2020-05-28 20:33:51 +02:00
ganfra
4465e6eea3 Widget: format url with roomId if needed 2020-05-28 20:26:34 +02:00
ganfra
b87fb8c396 Widget: show sticker in room summary format 2020-05-28 20:15:11 +02:00
ganfra
d4706b38b8 Widgets: display widget events in timeline 2020-05-28 20:04:41 +02:00
ganfra
31c82b4ba6 Widget: show room widgets in bottom sheet and fix some widget actions 2020-05-28 19:39:07 +02:00
ganfra
cb80d8d349 Widget: add active widgets 2020-05-28 17:08:57 +02:00
Benoit Marty
997101a44b Merge branch 'hotfix/crash_locales' 2020-05-28 11:31:38 +02:00
Benoit Marty
7be3434136 Merge branch 'hotfix/crash_locales' into develop 2020-05-28 11:31:38 +02:00
Benoit Marty
ec1422b0f0 Fix crash due to bad script. Tha bad value has already been fixed on Weblate. 2020-05-28 11:27:11 +02:00
Benoit Marty
b0a6eaaa96 Version++ 2020-05-28 10:45:58 +02:00
Benoit Marty
d1c4d4b099 Merge branch 'release/0.21.0' 2020-05-28 10:43:55 +02:00
Benoit Marty
d35905787d Merge branch 'release/0.21.0' into develop 2020-05-28 10:43:53 +02:00
Benoit Marty
9a972b2f73 Prepare release 0.21.0 2020-05-28 10:43:40 +02:00
ganfra
1fe0c8a3e9 Widgets: handle actions (revoke, delete, edit, open in browser) and permissions bottom sheet 2020-05-28 10:25:04 +02:00
Benoit Marty
116bab5bc8 Fix call event not rendered in e2e rooms. 2020-05-27 19:02:27 +02:00
Benoit Marty
c76eb3bc98 Fix lint issue 2020-05-27 18:58:45 +02:00
Benoit Marty
81c1717384 Format strings 2020-05-27 18:49:34 +02:00
Benoit Marty
0fd0500d30 Merge pull request #1414 from RiotTranslateBot/weblate-riot-android-riotx-application
Update from Weblate
2020-05-27 17:50:06 +02:00
Benoit Marty
34d638da4f Merge pull request #1411 from vector-im/feature/attachment_e2e
Feature/attachment e2e
2020-05-27 15:13:17 +02:00
Weblate
e39b177b5b Merge branch 'origin/develop' into Weblate. 2020-05-27 13:04:35 +00:00
LinAGKar
07aa3ee64c Translated using Weblate (Swedish)
Currently translated at 19.9% (335 of 1682 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/sv/
2020-05-27 13:04:29 +00:00
yuuki-san
c94856cdf8 Translated using Weblate (Slovak)
Currently translated at 95.7% (156 of 163 strings)

Translation: Riot Android/RiotX Matrix SDK
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/sk/
2020-05-27 13:04:26 +00:00
yuuki-san
4dd0c04537 Translated using Weblate (Slovak)
Currently translated at 53.9% (906 of 1682 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/sk/
2020-05-27 13:04:26 +00:00
Амёба
99c409b6d2 Translated using Weblate (Russian)
Currently translated at 82.6% (1390 of 1682 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/ru/
2020-05-27 13:04:26 +00:00
Marko Dimjašević
8cb2c2532f Translated using Weblate (Croatian)
Currently translated at 54.2% (912 of 1682 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/hr/
2020-05-27 13:04:24 +00:00
Benoit Marty
6f804cab4d Avoid duplicated events in DB (one with localId and one with eventId from homeserver, once synced) 2020-05-27 11:27:54 +02:00
Benoit Marty
cf3dbb378e Get uploaded files for e2e rooms, from local DB 2020-05-26 22:06:51 +02:00
ganfra
e32716aa48 Widget: add room active widgets to RoomDetailViewState 2020-05-26 19:47:06 +02:00
ganfra
ba46f10e3f Add integration entry to settings 2020-05-26 19:44:14 +02:00
ganfra
4b37ede8c2 Widget: handle sticker 2020-05-26 18:16:38 +02:00
ganfra
dbe4c0c8e4 Remove duplicates from identity feature 2020-05-26 11:38:29 +02:00
ganfra
4f4afd6840 Widget post api: handle last methods 2020-05-26 11:29:42 +02:00
ganfra
7409fde650 Merge branch 'develop' into feature/integration_manager 2020-05-26 08:55:01 +02:00
ganfra
cfa31e6332 Widgets: fix extracting user widgets 2020-05-26 08:31:19 +02:00
ganfra
df973a6275 Widget: makes the integration manager screen mostly working 2020-05-26 08:07:09 +02:00
Benoit Marty
0eb36a607b Merge pull request #1402 from vector-im/feature/rageshake_dialogs
Feature/rageshake dialogs
2020-05-26 00:04:33 +02:00
Benoit Marty
0509e76f18 var -> val 2020-05-25 23:54:53 +02:00
Benoit Marty
e379ccf086 Extract MatrixConfiguration to its own file, for a better visibility 2020-05-25 23:53:36 +02:00
Benoit Marty
7ae52d676d Use directly java.net.proxy class 2020-05-25 23:50:10 +02:00
Benoit Marty
3d33018ffa Merge pull request #1147 from unclejay80/http_proxy_init
added network proxy configuration
2020-05-25 23:43:11 +02:00
Benoit Marty
860595520b Merge pull request #1401 from vector-im/feature/cleanup
Small PR with code cleanup
2020-05-25 17:30:31 +02:00
Benoit Marty
ae318a835e Merge pull request #1387 from vector-im/feature/attachments_list
Attachments list
2020-05-25 17:29:54 +02:00
Benoit Marty
7a3dbecc08 Fixes #860 2020-05-25 17:05:17 +02:00
Benoit Marty
c52aae7c29 Uploads: Snackbar 2020-05-25 17:05:17 +02:00
Benoit Marty
f0f3e8ddb9 Uploads: auto-review 2020-05-25 17:05:17 +02:00
Benoit Marty
a95102a78f Uploads: Use StateView for better Loading/Empty rendering 2020-05-25 17:02:57 +02:00
Benoit Marty
2adafbeb03 Uploads: use SenderInfo in TimelineEvent 2020-05-25 17:02:57 +02:00
Benoit Marty
f3a5fb7fe3 Uploads: rework: provide information about the sender 2020-05-25 16:54:08 +02:00
Benoit Marty
907a786b1a Uploads: load element until loader not displayed anymore 2020-05-25 16:54:08 +02:00
Benoit Marty
e3ed3e5b05 Uploads: cleanup 2020-05-25 16:54:08 +02:00
Benoit Marty
a2b366ebfe Uploads: add placeholder for images 2020-05-25 16:54:08 +02:00
Benoit Marty
f7de2f0f13 Uploads: create extension 2020-05-25 16:54:08 +02:00
Benoit Marty
919225bdfd Uploads: create extension 2020-05-25 16:54:08 +02:00
Benoit Marty
88cba74cac Uploads: add screen - WIP 2020-05-25 16:54:08 +02:00
Benoit Marty
e9ca876444 Uploads: add screen - WIP 2020-05-25 16:54:08 +02:00
Benoit Marty
0992e76800 Uploads: add screen - WIP 2020-05-25 16:54:08 +02:00
Benoit Marty
8a9498bae4 Uploads: add the service and the task 2020-05-25 16:54:08 +02:00
Weblate
d2598480c8 var -> val 2020-05-25 16:54:08 +02:00
Benoit Marty
6e57b06673 Ensure Filter model match the spec and add Javadoc 2020-05-25 16:54:08 +02:00
Benoit Marty
a036be6436 Fix missing title in BugReport screen 2020-05-25 15:42:58 +02:00
Benoit Marty
53c7ea2831 Kotlin: use orEmpty() for Maps 2020-05-25 15:42:30 +02:00
Benoit Marty
e117fec74f Kotlin: use orEmpty() for Maps 2020-05-25 14:07:25 +02:00
Benoit Marty
6e01b75b2f Dagger: use generic name for parameters 2020-05-25 14:04:36 +02:00
Benoit Marty
691e7fe616 Kotlin: use orEmpty() 2020-05-25 14:04:36 +02:00
Benoit Marty
e793a46576 Merge pull request #1390 from vector-im/feature/icon
Change icon to magnifying-glass to filter room (#1384)
2020-05-25 10:57:30 +02:00
Benoit Marty
fa48e8cffa Change icon to magnifying-glass to filter room (#1384) 2020-05-25 10:57:14 +02:00
Benoit Marty
69cf437a39 Merge pull request #1291 from vector-im/feature/complete_security
Add hint to translators
2020-05-25 10:28:20 +02:00
Benoit Marty
ebbc432570 Merge pull request #1398 from vector-im/feature/date_time
Bugfixes
2020-05-25 10:13:30 +02:00
LinAGKar
2532724e92 Translated using Weblate (Swedish)
Currently translated at 18.8% (316 of 1682 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/sv/
2020-05-25 00:29:11 +00:00
MamasLT
e31693b4b7 Translated using Weblate (Lithuanian)
Currently translated at 2.5% (4 of 163 strings)

Translation: Riot Android/RiotX Matrix SDK
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/lt/
2020-05-25 00:29:10 +00:00
Marko Dimjašević
3ed6452232 Translated using Weblate (Croatian)
Currently translated at 50.9% (856 of 1682 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/hr/
2020-05-25 00:29:10 +00:00
Besnik Bleta
166aaa62f0 Translated using Weblate (Albanian)
Currently translated at 99.5% (1673 of 1682 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/sq/
2020-05-25 00:29:00 +00:00
MamasLT
45e5fff622 Added translation using Weblate (Lithuanian) 2020-05-23 23:44:45 +00:00
MamasLT
8f2dba09ee Added translation using Weblate (Lithuanian) 2020-05-23 23:43:32 +00:00
LinAGKar
2ea46c5e54 Translated using Weblate (Swedish)
Currently translated at 18.7% (315 of 1682 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/sv/
2020-05-23 14:29:20 +00:00
@a2sc:matrix.org
fc5f0f7673 Translated using Weblate (German)
Currently translated at 99.5% (1674 of 1682 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-23 14:29:19 +00:00
Tirifto
188f4a2e72 Translated using Weblate (Esperanto)
Currently translated at 27.5% (463 of 1682 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/eo/
2020-05-23 14:29:18 +00:00
Marko Dimjašević
cf97fc3b01 Translated using Weblate (Croatian)
Currently translated at 41.2% (693 of 1682 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/hr/
2020-05-23 14:29:15 +00:00
Osoitz
5267ba240a Translated using Weblate (Basque)
Currently translated at 100.0% (163 of 163 strings)

Translation: Riot Android/RiotX Matrix SDK
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/eu/
2020-05-23 14:29:00 +00:00
Osoitz
f185dcacd7 Translated using Weblate (Basque)
Currently translated at 100.0% (1682 of 1682 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/eu/
2020-05-23 14:29:00 +00:00
Benoit Marty
330a33a0e8 Render formatted_body for m.notice and m.emote (Fixes #1196) 2020-05-21 01:47:17 +02:00
Benoit Marty
b75b299847 Create MessageContentWithFormattedBody interface 2020-05-21 01:05:47 +02:00
Benoit Marty
7c59bcc928 Only "org.matrix.custom.html" is supported 2020-05-21 00:41:36 +02:00
Benoit Marty
0e110b0794 Cleanup: use existing TextContent class instead of Pair<> 2020-05-21 00:40:12 +02:00
Benoit Marty
e156a62e19 Enable markdown (if active) when sending emote (Fixes #734) 2020-05-21 00:27:19 +02:00
Benoit Marty
628439aa65 Mardown: sending "**text in bold** was sending extra paragraph and extra new line 2020-05-21 00:25:59 +02:00
Benoit Marty
d49fcb80fc "Seen by" uses 12h time (Fixes #1378)
DateUtils.FORMAT_SHOW_TIME has to be used for i18n to be effective on DateUtils.getRelativeDateTimeString(), do not ask me why.
Also internal switching of language does not have effect on this method, you'll have to restart the application.
2020-05-20 23:52:41 +02:00
ganfra
00fd067c6b Widget: continue working on interaction with SDK. Not sure yet how to manage properly distinction between room and "admin" widgets. 2020-05-20 20:39:18 +02:00
Benoit Marty
ca37895619 Merge pull request #1374 from vector-im/feature/sas_v2
support new key agreement method for SAS
2020-05-20 18:32:01 +02:00
Benoit Marty
43497e0da9 Merge pull request #1315 from vector-im/feature/forward_pagination
Feature/forward pagination
2020-05-20 18:30:09 +02:00
LinAGKar
efa510c0a8 Translated using Weblate (Swedish)
Currently translated at 17.1% (287 of 1682 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/sv/
2020-05-20 15:29:38 +00:00
yuuki-san
0828159ee4 Translated using Weblate (Slovak)
Currently translated at 53.9% (906 of 1682 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/sk/
2020-05-20 15:29:35 +00:00
Амёба
90f21198c3 Translated using Weblate (Russian)
Currently translated at 82.1% (1381 of 1682 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/ru/
2020-05-20 15:29:34 +00:00
Eduardo F
a0b0778fce Translated using Weblate (Portuguese (Brazil))
Currently translated at 52.2% (878 of 1682 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/pt_BR/
2020-05-20 15:29:33 +00:00
random
d937fa67ad Translated using Weblate (Italian)
Currently translated at 100.0% (1682 of 1682 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/it/
2020-05-20 15:29:33 +00:00
Kim Brose
91d396fbca Translated using Weblate (German)
Currently translated at 100.0% (163 of 163 strings)

Translation: Riot Android/RiotX Matrix SDK
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/de/
2020-05-20 15:29:32 +00:00
@a2sc:matrix.org
afba5b2b6c Translated using Weblate (German)
Currently translated at 99.5% (1673 of 1682 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-20 15:29:32 +00:00
Benoit Marty
b579a1bc83 Translated using Weblate (French)
Currently translated at 100.0% (1682 of 1682 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/fr/
2020-05-20 15:29:31 +00:00
Priit Jõerüüt
db49673fc7 Translated using Weblate (Estonian)
Currently translated at 14.2% (239 of 1682 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/et/
2020-05-20 15:29:31 +00:00
Marko Dimjašević
bb0511e659 Translated using Weblate (Croatian)
Currently translated at 26.2% (441 of 1682 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/hr/
2020-05-20 15:29:22 +00:00
Jeff Huang
0e0763ec2d Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (1682 of 1682 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/zh_Hant/
2020-05-20 15:28:52 +00:00
ganfra
3faf42be53 Widget: get user list widgets from user account 2020-05-19 18:40:11 +02:00
ganfra
dea903bcb5 Merge branch 'develop' into feature/integration_manager 2020-05-19 16:08:46 +02:00
ganfra
e1c6542e03 Merge branch 'develop' into feature/forward_pagination 2020-05-19 15:25:33 +02:00
ganfra
01484978bd Fix lint 2020-05-19 15:24:36 +02:00
ganfra
cad14c93d0 Timeline: fix tests and add message order check 2020-05-19 14:39:42 +02:00
toastbroot
ee52b9185b Translated using Weblate (German)
Currently translated at 99.4% (1672 of 1682 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-19 09:33:16 +00:00
Valere
861a7f791f Update change log 2020-05-19 09:57:54 +02:00
Valere
f2fa57224b Update matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/verification/DefaultVerificationService.kt
Co-authored-by: Hubert Chathi <hubert@uhoreg.ca>
2020-05-19 09:55:45 +02:00
Valere
e0977dd97b Add new key agreement protocol 2020-05-19 09:55:45 +02:00
Benoit Marty
f47bef71a4 Merge pull request #1354 from vector-im/feature/identity
Identity server
2020-05-18 17:28:57 +02:00
Benoit Marty
92985fc8e7 Split long line 2020-05-18 17:25:15 +02:00
Benoit Marty
243b0a7d82 ktlint 2020-05-18 17:23:33 +02:00
Benoit Marty
92c719a803 Set identity server: do not show the error in the EditText when user want to use the default identity server 2020-05-18 17:23:33 +02:00
Benoit Marty
f4108ae0eb Properly handle Loading state: button were still active... Also finish the work on the controller 2020-05-18 17:23:33 +02:00
Benoit Marty
ecf3fee709 Integrate Valere's remarks - step 3: use viewModelScope in ViewModels 2020-05-18 17:23:33 +02:00
Benoit Marty
e67e472025 Integrate Valere's remarks - step 2: Stop using (or at least reduce usage of) GlobalScope 2020-05-18 17:23:33 +02:00
Benoit Marty
a6541481bf Integrate Valere's remarks - step 1 2020-05-18 17:23:33 +02:00
Benoit Marty
85a4f83662 Colorize the identity server url 2020-05-18 17:23:33 +02:00
Benoit Marty
22955e6b34 Use debouncedClicks every where, for faster UI (it uses throttleFirst operator instead of debounce) 2020-05-18 17:23:33 +02:00
Benoit Marty
9520aff848 Use debouncedClicks every where, for faster UI (it uses throttleFirst operator instead of debounce) 2020-05-18 17:23:33 +02:00
Benoit Marty
6b09a78ece Identity: Improve identity choice screen after review 2020-05-18 17:23:33 +02:00
Benoit Marty
789bcc8d77 Identity: Bugfix: do not fail when trying to disconnect the current identity server, if there is no token available 2020-05-18 17:23:33 +02:00
Benoit Marty
2914117a8e Move some classes 2020-05-18 17:23:33 +02:00
Benoit Marty
8049962a99 Create a Wellknown module, because both AuthModule and HomeServerCapability module need it 2020-05-18 17:23:33 +02:00
Benoit Marty
225b1c380e Identity: retrieve the default identity server url 2020-05-18 17:23:33 +02:00
Benoit Marty
60d80ea0ba Fix compilation issue after rebase 2020-05-18 17:23:33 +02:00
Benoit Marty
c8211098f3 Identity: The store has to be migrated properly because it contains user's data 2020-05-18 17:23:33 +02:00
Benoit Marty
e78fde4eca Identity: rename a few class and add a mapper to avoid using Entities in the code 2020-05-18 17:23:33 +02:00
Benoit Marty
59d60813fb Cleanup 2020-05-18 17:23:33 +02:00
Benoit Marty
4c31e52892 Add facilities and Javadoc on SessionParams data class 2020-05-18 17:23:33 +02:00
Benoit Marty
c646fd2b36 ktlint 2020-05-18 17:23:33 +02:00
Benoit Marty
6432859732 Avoid code duplication 2020-05-18 17:23:33 +02:00
Benoit Marty
2beef7d816 Identity: fix issue with logout request.
Also disconnect previous set identity server when changing url, when disconnecting, and when deactivating account
2020-05-18 17:23:33 +02:00
Benoit Marty
623056455b Identity: fix rendering error 2020-05-18 17:23:33 +02:00
Benoit Marty
7a4d9370e3 Identity: human readable errors 2020-05-18 17:23:33 +02:00
Benoit Marty
fe3138492e Identity: fix issue in dark theme 2020-05-18 17:23:33 +02:00
Benoit Marty
05a52164f3 Identity: Changelog and documentation 2020-05-18 17:23:33 +02:00
Benoit Marty
d14f1dd1ab Capability: do not update data if the corresponding request fails 2020-05-18 17:23:13 +02:00
Benoit Marty
88e8c11ee5 Identity: protect against outdated homeserver 2020-05-18 17:23:13 +02:00
Benoit Marty
7afc7bdb31 Identity refresh main setting page. 2020-05-18 17:23:13 +02:00
Benoit Marty
84a3754c9f Confirm identity server disconnection in all cases, as Riot-Web does 2020-05-18 17:23:13 +02:00
Benoit Marty
4b2f8e9174 Auto-review 2020-05-18 17:23:13 +02:00
Benoit Marty
a17932e17e Add missing internal 2020-05-18 17:23:13 +02:00
Benoit Marty
084c27a2bb Identity: cleanup 2020-05-18 17:23:13 +02:00
Benoit Marty
ed2f62cbe7 Identity: ping API V2 and cleanup 2020-05-18 17:23:13 +02:00
Benoit Marty
38fb7185b6 Identity: One class per file 2020-05-18 17:23:13 +02:00
Benoit Marty
ce42d2fb8a Identity: improve terms not signed case 2020-05-18 17:23:13 +02:00
Benoit Marty
af3fc22e2d Identity: correctly handle terms update 2020-05-18 17:22:40 +02:00
Benoit Marty
b659cb60a2 Improve code 2020-05-18 17:22:40 +02:00
Benoit Marty
34cf9903dc Improve code 2020-05-18 17:22:40 +02:00
Benoit Marty
062a21e39a Improve code 2020-05-18 17:22:40 +02:00
Benoit Marty
4510aff00a ktlint 2020-05-18 17:22:40 +02:00
Benoit Marty
d0953b8406 Identity: Cleanup 2020-05-18 17:22:40 +02:00
Benoit Marty
7822660ce7 Identity: Extract enum for Epoxy Items 2020-05-18 17:22:40 +02:00
Benoit Marty
bdfcf5c67c Identity: cleanup Epoxy items 2020-05-18 17:22:40 +02:00
Benoit Marty
ae0d09a049 Identity: cancel binding WIP 2020-05-18 17:22:40 +02:00
Benoit Marty
69759b7415 Identity: store sendAttempt in DB 2020-05-18 17:22:40 +02:00
Benoit Marty
7e8e1ab9b7 Identity: change DB and add sendAttempt 2020-05-18 17:22:40 +02:00
Benoit Marty
b44f5d3b4a Handle correctly the verification code error case 2020-05-18 17:22:40 +02:00
Benoit Marty
03f8b66993 Remove undocumented parameter
https://github.com/matrix-org/sydent/issues/195
2020-05-18 17:22:40 +02:00
Benoit Marty
e411f139c8 Identity: validate code received by SMS 2020-05-18 17:22:40 +02:00
Benoit Marty
e962d1dadf Small improvement 2020-05-18 17:22:40 +02:00
Benoit Marty
756b0febe6 Identity: Add some doc 2020-05-18 17:22:40 +02:00
Benoit Marty
1535f3e2e5 Identity: bind/unbnd: restore the bind in progress State 2020-05-18 17:22:40 +02:00
Benoit Marty
3e808dec90 Identity: bind/unbnd WIP 2020-05-18 17:22:40 +02:00
Benoit Marty
637f4a8350 Fix small UI bug 2020-05-18 17:22:40 +02:00
Benoit Marty
d3bc9f52fd Remove duplicated class 2020-05-18 17:22:40 +02:00
Benoit Marty
ffd8ac859d Identity: fix sync of indetity server change 2020-05-18 17:22:40 +02:00
Benoit Marty
6e43e9b51c Identity: refresh pepper, logout feature and other improvements 2020-05-18 17:22:40 +02:00
Benoit Marty
426171508e Import and adapt Terms Of Service management: SDK and UI (compiling) - still fixing issue 2020-05-18 17:22:40 +02:00
Benoit Marty
e86460b578 Import and adapt Terms Of Service management: SDK and UI (compiling) 2020-05-18 17:22:40 +02:00
Benoit Marty
8dd5f88dba Identity: cleanup UI 2020-05-18 17:21:59 +02:00
Benoit Marty
3aa6de7cf5 Identity: progressing 2020-05-18 17:21:59 +02:00
Benoit Marty
a75242c79d Retrieve ThreePids from homeserver 2020-05-18 17:21:59 +02:00
Benoit Marty
784918350b Identity: import UI/UX From Riot and adapt to RiotX architecture 2020-05-18 17:21:59 +02:00
Benoit Marty
0199cf9a03 Identity - Fix issue with Realm 2020-05-18 17:21:59 +02:00
Benoit Marty
ab6e7a3b8a Identity - WIP (compilation ok) 2020-05-18 17:21:59 +02:00
Benoit Marty
f489265ce7 Create AccessTokenProvider 2020-05-18 17:21:59 +02:00
Benoit Marty
6c9c3e5cb3 To merge with previous previous commit 2020-05-18 17:21:59 +02:00
Benoit Marty
9b7c2599a7 Add withOlmUtility facility 2020-05-18 17:21:59 +02:00
Benoit Marty
25bbd7c526 Identity - Create DB 2020-05-18 17:21:59 +02:00
Benoit Marty
e0c3f3638d Merge pull request #1370 from vector-im/feature/redacted_message
Feature/redacted message
2020-05-18 16:30:40 +02:00
Benoit Marty
d45653dbb3 Ganfra's review: Improve the filters declaration 2020-05-18 16:26:18 +02:00
Benoit Marty
f70623beea Ganfra's review: Handle filterRedacted in TimelineHiddenReadReceipts 2020-05-18 16:26:18 +02:00
Benoit Marty
e542e4ba22 Add a setting to hide redacted events (#951) 2020-05-18 16:26:18 +02:00
Benoit Marty
05d1e64cb5 New rendering for redacted message 2020-05-18 16:25:54 +02:00
Benoit Marty
adac80062c Merge pull request #1368 from vector-im/feature/switch_language
Feature/switch language
2020-05-18 16:22:07 +02:00
Benoit Marty
28f8d9500e Better coroutine management 2020-05-18 16:21:47 +02:00
Benoit Marty
538bda329e Lazy load available languages 2020-05-18 16:21:47 +02:00
Benoit Marty
a00ddca188 Create SystemLocaleProvider 2020-05-18 16:21:47 +02:00
Benoit Marty
8ac2cb0530 Cleanup 2020-05-18 16:21:47 +02:00
Benoit Marty
19d655ec41 Locales: improve algo 2020-05-18 16:21:47 +02:00
Benoit Marty
4961bb0e08 FontSize: rework by creating FontScaleValue data class. 2020-05-18 16:21:47 +02:00
Benoit Marty
f45040c405 Locale: support locale change 2020-05-18 16:21:24 +02:00
Benoit Marty
9fed62e4a7 Improve template 2020-05-18 16:21:00 +02:00
Benoit Marty
43b9e2cec9 Merge pull request #1382 from vector-im/feature/aiplane_mode
Better connectivity lost indicator when airplane mode is on
2020-05-18 15:35:14 +02:00
Benoit Marty
3185b88fe5 Better connectivity lost indicator when airplane mode is on 2020-05-18 15:09:14 +02:00
LinAGKar
c2906d9b06 Translated using Weblate (Swedish)
Currently translated at 14.6% (245 of 1682 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/sv/
2020-05-16 18:28:48 +00:00
Амёба
cfb615f972 Translated using Weblate (Russian)
Currently translated at 82.1% (1381 of 1682 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/ru/
2020-05-16 18:28:48 +00:00
Priit Jõerüüt
9c22c0952c Translated using Weblate (Estonian)
Currently translated at 5.9% (100 of 1682 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/et/
2020-05-16 18:28:48 +00:00
Priit Jõerüüt
5a834619c0 Translated using Weblate (Estonian)
Currently translated at 97.5% (159 of 163 strings)

Translation: Riot Android/RiotX Matrix SDK
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/et/
2020-05-16 18:28:43 +00:00
LinAGKar
3b62f50f7b Translated using Weblate (Swedish)
Currently translated at 14.4% (242 of 1682 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/sv/
2020-05-16 08:03:01 +00:00
LinAGKar
18e804d174 Translated using Weblate (Swedish)
Currently translated at 14.3% (241 of 1682 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/sv/
2020-05-16 07:22:14 +00:00
Szimszon
c105d82027 Translated using Weblate (Hungarian)
Currently translated at 100.0% (1682 of 1682 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/hu/
2020-05-16 07:22:11 +00:00
Kévin C
860921217d Translated using Weblate (French)
Currently translated at 100.0% (1682 of 1682 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/fr/
2020-05-16 07:22:06 +00:00
Priit Jõerüüt
3fe2f2876a Translated using Weblate (Estonian)
Currently translated at 1.6% (27 of 1682 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/et/
2020-05-16 07:22:05 +00:00
Marko Dimjašević
e84fd408be Translated using Weblate (Croatian)
Currently translated at 0.5% (8 of 1682 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/hr/
2020-05-16 07:22:05 +00:00
Marko Dimjašević
f361fd7355 Added translation using Weblate (Croatian) 2020-05-15 21:33:36 +00:00
ganfra
458e3ee5e8 Timeline: fetch next token with the help of getContext when required 2020-05-15 20:18:07 +02:00
Benoit Marty
5fa247a0c5 Remove temporary tool and strings_riotX.xml temporary files 2020-05-15 15:50:15 +02:00
Benoit Marty
48e58967b2 Version++ 2020-05-15 15:48:15 +02:00
Benoit Marty
d1d79c0191 Merge branch 'release/0.20.0' 2020-05-15 15:45:26 +02:00
Benoit Marty
0a41a9f773 Merge branch 'release/0.20.0' into develop 2020-05-15 15:45:26 +02:00
Benoit Marty
03fa0e6ad6 Prepare release 0.20.0 2020-05-15 15:44:36 +02:00
Benoit Marty
8eebcef4e9 Fix #1373 2020-05-15 15:36:52 +02:00
Benoit Marty
ea1c75c16a Fix lint issues in Strings 2020-05-15 12:58:14 +02:00
Benoit Marty
7a2aefd8fb Format string resources 2020-05-15 12:46:20 +02:00
Benoit Marty
33ec1bbfb3 Merge pull request #1371 from RiotTranslateBot/weblate-riot-android-riotx-application
Update from Weblate
2020-05-15 12:41:06 +02:00
Weblate
8883832b86 Merge branch 'origin/develop' into Weblate. 2020-05-15 10:09:23 +00:00
LinAGKar
308828ef50 Translated using Weblate (Swedish)
Currently translated at 14.3% (239 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/sv/
2020-05-15 10:04:42 +00:00
Benoit Marty
885dac4ad1 Translated using Weblate (French)
Currently translated at 100.0% (1672 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/fr/
2020-05-15 10:04:39 +00:00
Priit Jõerüüt
c03d61e09f Translated using Weblate (Estonian)
Currently translated at 1.5% (25 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/et/
2020-05-15 10:04:38 +00:00
Priit Jõerüüt
b2bacdfa4e Translated using Weblate (Estonian)
Currently translated at 92.6% (151 of 163 strings)

Translation: Riot Android/RiotX Matrix SDK
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/et/
2020-05-15 10:04:36 +00:00
Tirifto
06defaf14e Translated using Weblate (Esperanto)
Currently translated at 24.2% (404 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/eo/
2020-05-15 10:04:33 +00:00
ganfra
22e3b370e3 IntegrationConfig: make preferred non null as we should at least get the default one 2020-05-14 17:54:27 +02:00
ganfra
8f5589d3e1 Start creating the widget url builder 2020-05-14 17:05:22 +02:00
ganfra
03389fc040 Change some naming 2020-05-14 17:05:08 +02:00
Benoit Marty
4698cf7a9b Merge pull request #1367 from vector-im/feature/fix_crash_1366
Fix crash on restore backup from ky
2020-05-14 16:07:40 +02:00
Priit Jõerüüt
5004fba986 Added translation using Weblate (Estonian) 2020-05-14 08:16:34 +00:00
Priit Jõerüüt
8cc82fe5ba Added translation using Weblate (Estonian) 2020-05-14 08:13:31 +00:00
LinAGKar
c9fb231714 Translated using Weblate (Swedish)
Currently translated at 12.0% (200 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/sv/
2020-05-13 23:28:56 +00:00
Амёба
0f22b55786 Translated using Weblate (Russian)
Currently translated at 82.5% (1380 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/ru/
2020-05-13 23:28:55 +00:00
zurtel22
535148e68a Translated using Weblate (German)
Currently translated at 99.9% (1671 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-13 23:28:47 +00:00
Dominik Mahnkopf
878e093b6b Translated using Weblate (German)
Currently translated at 99.9% (1671 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-13 23:28:47 +00:00
Tirifto
0e5f741b6b Translated using Weblate (Esperanto)
Currently translated at 21.2% (355 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/eo/
2020-05-13 23:28:47 +00:00
Dominik Mahnkopf
36b1717fc1 Translated using Weblate (Dutch)
Currently translated at 68.4% (1144 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/nl/
2020-05-13 23:28:38 +00:00
tleydxdy
37392b5495 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (163 of 163 strings)

Translation: Riot Android/RiotX Matrix SDK
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/zh_Hans/
2020-05-13 23:28:38 +00:00
nikonak
84f2fc41b3 Translated using Weblate (German)
Currently translated at 99.9% (1671 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-13 20:46:48 +00:00
Dominik Mahnkopf
ebdf75091a Translated using Weblate (German)
Currently translated at 99.9% (1671 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-13 20:46:48 +00:00
nikonak
ce304ace2b Translated using Weblate (German)
Currently translated at 99.9% (1671 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-13 20:24:08 +00:00
Dominik Mahnkopf
0d2acec73e Translated using Weblate (German)
Currently translated at 99.9% (1671 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-13 20:24:08 +00:00
nikonak
0144764f69 Translated using Weblate (German)
Currently translated at 99.9% (1671 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-13 19:34:47 +00:00
Dominik Mahnkopf
aad4b3dc39 Translated using Weblate (German)
Currently translated at 99.9% (1671 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-13 19:34:47 +00:00
ganfra
996aa9ef66 Merge branch 'develop' into feature/integration_manager 2020-05-13 20:21:48 +02:00
ganfra
9778999a7f Create RoomWidget feature 2020-05-13 20:04:19 +02:00
ganfra
91301197ea Try to communicate with WidgetPostAPI 2020-05-13 20:04:08 +02:00
Valere
040deea655 Fix crash on restore backup from ky 2020-05-13 16:59:55 +02:00
Valere
1e2b5dd428 Merge pull request #1365 from vector-im/feature/fix_crash_1364
Fix crash 1364
2020-05-13 16:59:08 +02:00
Valere
8d32c27ce0 Fix crash 1364 2020-05-13 16:57:57 +02:00
Valere
074a9e9f29 Merge pull request #1338 from vector-im/feature/crash_manual_verify
Crashes when private key missing
2020-05-13 16:35:38 +02:00
Valere
650b6bd9ea Merge branch 'develop' into feature/crash_manual_verify 2020-05-13 16:35:28 +02:00
Benoit Marty
3dd74d6828 Merge pull request #1095 from vector-im/feature/wellknown
Add wellknown support in the login flow
2020-05-13 15:29:02 +02:00
Benoit Marty
f717a37a4a Split long line 2020-05-13 15:28:05 +02:00
Benoit Marty
d8b1372a0f Login request does not provide the full Wellknown data. Change the model to reflect that, to avoid misunderstanding. 2020-05-13 14:03:10 +02:00
Benoit Marty
678cf50dbd Add Javadoc 2020-05-13 13:56:33 +02:00
Benoit Marty
57fca80cbb Disable possibility to login using matrixId (waiting for design) 2020-05-13 13:33:12 +02:00
Benoit Marty
cf7de8bb8b Typo 2020-05-13 12:43:54 +02:00
Benoit Marty
a70fdedce5 Try to use wellKnown request, when user is entering a homeserver URL 2020-05-13 12:43:54 +02:00
Benoit Marty
c173235ee3 ktlint 2020-05-13 12:43:54 +02:00
Benoit Marty
f74b1e6c2e Migrate Login Navigation view model to regular ViewEvents 2020-05-13 12:43:54 +02:00
Benoit Marty
c9bc6f4a9e Support homeserver discovery from MXID - Wellknown (#476) 2020-05-13 12:42:08 +02:00
Benoit Marty
63c18e82c8 typo... 2020-05-13 00:34:33 +02:00
Benoit Marty
037b2e1d60 PR merged after a release, move 2 lines 2020-05-13 00:34:03 +02:00
Benoit Marty
aea9c958bf Merge pull request #1307 from vector-im/feature/invite_members_to_room
Invite members to an existing room
2020-05-13 00:29:55 +02:00
Benoit Marty
7f185a729e Merge pull request #1345 from emmaguy/direct-shortcuts
Add direct shortcuts
2020-05-13 00:25:58 +02:00
Emma Vanbrabant
d08b4e1ea0 PR feedback 2020-05-12 19:37:03 +01:00
onurays
4eaed945e2 Fix plurals. 2020-05-12 15:31:15 +03:00
HaHaNoname
14b1b10556 Translated using Weblate (Russian)
Currently translated at 75.2% (1258 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/ru/
2020-05-12 12:28:46 +00:00
Tirifto
df762e40bb Translated using Weblate (Esperanto)
Currently translated at 100.0% (163 of 163 strings)

Translation: Riot Android/RiotX Matrix SDK
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/eo/
2020-05-12 12:28:46 +00:00
Tirifto
684972185f Translated using Weblate (Esperanto)
Currently translated at 14.7% (245 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/eo/
2020-05-12 12:28:45 +00:00
onurays
04dd13d03b Use plurals in case of 3 or more invited users. 2020-05-12 14:10:23 +03:00
onurays
700fd47f22 Toast message formatting of invited users. 2020-05-12 12:10:45 +03:00
Benoit Marty
b36759deb4 Merge pull request #1226 from ndarilek/develop
Set `tickerText` to improve accessibility of notifications.
2020-05-11 22:28:36 +02:00
Benoit Marty
25d224be6b Merge branch 'develop' into develop 2020-05-11 22:27:16 +02:00
onurays
fe013f803e Add action menu icon to invite users. 2020-05-11 22:43:55 +03:00
ganfra
01d6b52a60 Widgets: handle scalar token 2020-05-11 20:00:50 +02:00
ganfra
ce884ac577 Merge branch 'develop' into feature/integration_manager 2020-05-11 15:48:27 +02:00
Benoit Marty
6abc51d05d Merge pull request #1339 from vector-im/feature/openId
Create a specific module for OpenId
2020-05-11 15:41:41 +02:00
LinAGKar
a98916c985 Translated using Weblate (Swedish)
Currently translated at 11.1% (186 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/sv/
2020-05-11 10:28:38 +00:00
Frisk
9e29533aad Translated using Weblate (Polish)
Currently translated at 93.3% (1560 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/pl/
2020-05-11 10:28:37 +00:00
tctovsli
7119403cde Translated using Weblate (Norwegian Bokmål)
Currently translated at 34.5% (577 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/nb_NO/
2020-05-11 10:28:36 +00:00
nikonak
7f55e4fb1e Translated using Weblate (German)
Currently translated at 99.9% (1671 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-11 10:28:34 +00:00
zurtel22
82df62a600 Translated using Weblate (German)
Currently translated at 99.9% (1671 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-11 10:28:34 +00:00
Pepper.Cabbit.Snoopy
d0c722eae1 Translated using Weblate (Chinese (Simplified))
Currently translated at 64.5% (1078 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/zh_Hans/
2020-05-11 10:28:33 +00:00
nikonak
40649e9c3c Translated using Weblate (German)
Currently translated at 99.9% (1671 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-10 22:23:53 +00:00
zurtel22
431b285806 Translated using Weblate (German)
Currently translated at 99.9% (1671 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-10 22:23:52 +00:00
nikonak
75f84fe1f4 Translated using Weblate (German)
Currently translated at 99.9% (1671 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-10 22:20:28 +00:00
zurtel22
98bf02efa9 Translated using Weblate (German)
Currently translated at 99.9% (1671 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-10 22:20:28 +00:00
nikonak
0eb68b531c Translated using Weblate (German)
Currently translated at 99.9% (1671 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-10 21:47:22 +00:00
zurtel22
9124844e3e Translated using Weblate (German)
Currently translated at 99.9% (1671 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-10 21:47:22 +00:00
Emma Vanbrabant
f568553d21 Add to changes 2020-05-09 21:07:03 +01:00
Emma Vanbrabant
92c9d4fc22 remove unused import
Signed-off-by: Emma Vanbrabant <emmag87@gmail.com>
2020-05-09 20:58:15 +01:00
Emma Vanbrabant
957d51cf3f Fix placeholder icons 2020-05-09 20:50:58 +01:00
Emma Vanbrabant
54ecc25831 Create ShortcutBuilder and use 2020-05-09 20:12:51 +01:00
kujaw
738a368a6f Translated using Weblate (Polish)
Currently translated at 93.1% (1557 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/pl/
2020-05-09 18:02:25 +00:00
LinAGKar
969f070175 Translated using Weblate (Swedish)
Currently translated at 10.6% (178 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/sv/
2020-05-09 16:28:51 +00:00
@a2sc:matrix.org
d8d78b124d Translated using Weblate (German)
Currently translated at 100.0% (1672 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-09 16:28:37 +00:00
Alexander Eisele
9a9f0c200e Translated using Weblate (German)
Currently translated at 100.0% (1672 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-09 16:28:37 +00:00
Tirifto
247ffc1270 Translated using Weblate (Esperanto)
Currently translated at 82.2% (134 of 163 strings)

Translation: Riot Android/RiotX Matrix SDK
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/eo/
2020-05-09 16:28:37 +00:00
LinAGKar
690d05aeca Translated using Weblate (Danish)
Currently translated at 23.8% (398 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/da/
2020-05-09 16:28:30 +00:00
LinAGKar
c33f3b76fa Translated using Weblate (Swedish)
Currently translated at 0.5% (8 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/sv/
2020-05-08 06:28:32 +00:00
laeberkaes
8616c454e1 Translated using Weblate (German)
Currently translated at 100.0% (163 of 163 strings)

Translation: Riot Android/RiotX Matrix SDK
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/de/
2020-05-08 06:28:31 +00:00
laeberkaes
17db994d35 Translated using Weblate (German)
Currently translated at 99.9% (1671 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-08 06:28:30 +00:00
Samu Voutilainen
6c1c1ca8b0 Translated using Weblate (Finnish)
Currently translated at 100.0% (163 of 163 strings)

Translation: Riot Android/RiotX Matrix SDK
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/fi/
2020-05-08 06:28:30 +00:00
Ville Ranki
f1613eacbb Translated using Weblate (Finnish)
Currently translated at 94.0% (1572 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/fi/
2020-05-08 06:28:30 +00:00
Besnik Bleta
67d1c2dc80 Translated using Weblate (Albanian)
Currently translated at 98.8% (161 of 163 strings)

Translation: Riot Android/RiotX Matrix SDK
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/sq/
2020-05-08 06:28:28 +00:00
Besnik Bleta
c2b2b856a1 Translated using Weblate (Albanian)
Currently translated at 99.6% (1665 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/sq/
2020-05-08 06:28:28 +00:00
LinAGKar
44f946513f Added translation using Weblate (Swedish) 2020-05-08 06:15:51 +00:00
Valere
1cafca6de6 Merge pull request #1334 from vector-im/feature/fix_1329
Fix #1329
2020-05-07 17:45:09 +02:00
Nolan Darilek
35ee7f0b40 Add changelog entry. 2020-05-07 15:38:28 +00:00
Nolan Darilek
6e8e7164c6 Use last event when generating ticker text. 2020-05-07 15:29:42 +00:00
Nolan Darilek
6bbded1e65 Use string resource for generating ticker text. 2020-05-07 15:14:31 +00:00
Ville Ranki
0aa90c3eea Translated using Weblate (Finnish)
Currently translated at 100.0% (163 of 163 strings)

Translation: Riot Android/RiotX Matrix SDK
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/fi/
2020-05-07 06:15:43 +00:00
Alexander Eisele
b44b0ec998 Translated using Weblate (German)
Currently translated at 99.9% (1671 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 22:10:26 +00:00
laeberkaes
07c6259734 Translated using Weblate (German)
Currently translated at 99.9% (1671 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 22:10:25 +00:00
Alexander Eisele
1785d4d0b4 Translated using Weblate (German)
Currently translated at 99.6% (1665 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 22:08:11 +00:00
laeberkaes
22d06928c8 Translated using Weblate (German)
Currently translated at 99.6% (1665 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 22:08:11 +00:00
Alexander Eisele
d6fe6e44bd Translated using Weblate (German)
Currently translated at 99.3% (1660 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 22:06:47 +00:00
laeberkaes
d51ee19f3f Translated using Weblate (German)
Currently translated at 99.3% (1660 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 22:06:47 +00:00
Alexander Eisele
717e5161a6 Translated using Weblate (German)
Currently translated at 98.9% (1654 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 22:05:07 +00:00
laeberkaes
be9fa268b1 Translated using Weblate (German)
Currently translated at 98.9% (1654 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 22:05:07 +00:00
Alexander Eisele
14e8bbcec6 Translated using Weblate (German)
Currently translated at 98.9% (1653 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 22:03:45 +00:00
laeberkaes
26105dc25f Translated using Weblate (German)
Currently translated at 98.9% (1653 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 22:03:45 +00:00
Alexander Eisele
53ba1c2068 Translated using Weblate (German)
Currently translated at 98.8% (1652 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 22:03:19 +00:00
laeberkaes
fa004c9d93 Translated using Weblate (German)
Currently translated at 98.8% (1652 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 22:03:18 +00:00
Alexander Eisele
be94921918 Translated using Weblate (German)
Currently translated at 98.7% (1650 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 22:00:54 +00:00
laeberkaes
2f5fe59aa6 Translated using Weblate (German)
Currently translated at 98.7% (1650 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 22:00:53 +00:00
Alexander Eisele
89fb2cf391 Translated using Weblate (German)
Currently translated at 98.3% (1644 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 21:55:58 +00:00
laeberkaes
f1d2abc9b1 Translated using Weblate (German)
Currently translated at 98.3% (1644 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 21:55:58 +00:00
Alexander Eisele
2aa8512f6f Translated using Weblate (German)
Currently translated at 98.1% (1641 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 21:52:02 +00:00
laeberkaes
2d31402cf0 Translated using Weblate (German)
Currently translated at 98.1% (1641 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 21:52:02 +00:00
Alexander Eisele
6d61848ed6 Translated using Weblate (German)
Currently translated at 98.1% (1640 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 21:42:56 +00:00
laeberkaes
0e0b724535 Translated using Weblate (German)
Currently translated at 98.1% (1640 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 21:42:55 +00:00
Alexander Eisele
e13915b0c7 Translated using Weblate (German)
Currently translated at 98.0% (1639 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 21:40:19 +00:00
laeberkaes
361f0415bb Translated using Weblate (German)
Currently translated at 98.0% (1639 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 21:40:18 +00:00
Alexander Eisele
c3b662fa1f Translated using Weblate (German)
Currently translated at 98.0% (1638 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 21:40:01 +00:00
laeberkaes
2d3e23ee11 Translated using Weblate (German)
Currently translated at 98.0% (1638 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 21:40:00 +00:00
Alexander Eisele
fc8ab0d462 Translated using Weblate (German)
Currently translated at 97.9% (1637 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 21:36:10 +00:00
laeberkaes
89629ffe93 Translated using Weblate (German)
Currently translated at 97.9% (1637 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 21:36:10 +00:00
Alexander Eisele
e97d565809 Translated using Weblate (German)
Currently translated at 97.8% (1636 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 21:35:28 +00:00
laeberkaes
7e3413eda7 Translated using Weblate (German)
Currently translated at 97.8% (1636 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 21:35:28 +00:00
Alexander Eisele
7966f6e308 Translated using Weblate (German)
Currently translated at 97.7% (1634 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 21:34:42 +00:00
laeberkaes
e1286a0ed4 Translated using Weblate (German)
Currently translated at 97.7% (1634 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 21:34:42 +00:00
Alexander Eisele
1e2d267fec Translated using Weblate (German)
Currently translated at 97.6% (1632 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 21:32:36 +00:00
laeberkaes
8b3403c115 Translated using Weblate (German)
Currently translated at 97.6% (1632 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 21:32:35 +00:00
Alexander Eisele
da4b029093 Translated using Weblate (German)
Currently translated at 97.5% (1631 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 21:32:22 +00:00
laeberkaes
b48113a353 Translated using Weblate (German)
Currently translated at 97.5% (1631 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 21:32:21 +00:00
Alexander Eisele
e1884e7c73 Translated using Weblate (German)
Currently translated at 97.5% (1630 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 21:32:01 +00:00
laeberkaes
daae030134 Translated using Weblate (German)
Currently translated at 97.5% (1630 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 21:32:01 +00:00
Alexander Eisele
19e1da1216 Translated using Weblate (German)
Currently translated at 97.3% (1627 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 21:30:27 +00:00
laeberkaes
e9bb95b3b3 Translated using Weblate (German)
Currently translated at 97.3% (1627 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 21:30:26 +00:00
Alexander Eisele
a43ca5925c Translated using Weblate (German)
Currently translated at 97.1% (1624 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 21:28:41 +00:00
laeberkaes
dd46798bda Translated using Weblate (German)
Currently translated at 97.1% (1624 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 21:28:41 +00:00
Alexander Eisele
d70a09ded8 Translated using Weblate (German)
Currently translated at 97.1% (1623 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 21:27:28 +00:00
laeberkaes
439aa7854c Translated using Weblate (German)
Currently translated at 97.1% (1623 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 21:27:28 +00:00
Benoit Marty
750550ad3e Create a specific module for OpenId 2020-05-06 22:14:56 +02:00
Besnik Bleta
b6af2269d2 Translated using Weblate (Albanian)
Currently translated at 99.6% (1665 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/sq/
2020-05-06 18:59:23 +00:00
ganfra
b047f36e86 Creates a Widget Manager to be used internally and state event service 2020-05-06 20:49:07 +02:00
kujaw
afbda4ac28 Translated using Weblate (Polish)
Currently translated at 93.1% (1556 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/pl/
2020-05-06 17:23:33 +00:00
Szimszon
f5fd0ac323 Translated using Weblate (Hungarian)
Currently translated at 100.0% (1672 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/hu/
2020-05-06 17:23:31 +00:00
Alexander Eisele
18de0ca951 Translated using Weblate (German)
Currently translated at 96.9% (1621 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 17:23:31 +00:00
Christopher Rossbach
b53c073b90 Translated using Weblate (German)
Currently translated at 96.9% (1621 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-06 17:23:30 +00:00
Kévin C
13ebef334f Translated using Weblate (French)
Currently translated at 100.0% (1672 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/fr/
2020-05-06 17:23:30 +00:00
Ville Ranki
b1ba4e393e Translated using Weblate (Finnish)
Currently translated at 93.8% (1568 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/fi/
2020-05-06 17:23:30 +00:00
Martijn de Boer
d898bc71f7 Translated using Weblate (Dutch)
Currently translated at 68.4% (1144 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/nl/
2020-05-06 17:23:20 +00:00
Valere
0afa7a706a Update change log 2020-05-06 18:20:43 +02:00
Valere
da68212255 Crashes when private key missing 2020-05-06 18:14:44 +02:00
ganfra
4fdd2f4eed Create WidgetsAPI 2020-05-06 15:53:28 +02:00
Valere
583139d51e klint 2020-05-06 15:06:34 +02:00
Valere
cee8ae3af4 Fix #1329
+ migration to remove duplicate
2020-05-06 15:04:17 +02:00
ganfra
182753e4ec Start creating integration manager 2020-05-06 11:53:35 +02:00
onurays
c7c6cf70e4 Code review fixes. 2020-05-06 11:20:08 +03:00
Dirmin
1491bddb3b Translated using Weblate (French)
Currently translated at 100.0% (1672 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/fr/
2020-05-06 06:42:49 +00:00
Alexander Eisele
ac5db83880 Translated using Weblate (German)
Currently translated at 96.5% (1614 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-05 13:35:17 +00:00
Christopher Rossbach
b2f3ba220e Translated using Weblate (German)
Currently translated at 96.5% (1614 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-05 13:35:17 +00:00
n3niu
deb783f797 Translated using Weblate (German)
Currently translated at 96.5% (1613 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-05 13:34:25 +00:00
Alexander Eisele
5fcf54cd57 Translated using Weblate (German)
Currently translated at 96.5% (1613 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-05 13:34:25 +00:00
ganfra
29c9d3070c Start creating bunch of necessary classes 2020-05-05 13:05:45 +02:00
Benoit Marty
4306cb7812 Upgrade build tools version (SDK 29) 2020-05-05 12:08:19 +02:00
Benoit Marty
a4b8dc9400 Fix test compilation issue 2020-05-05 11:49:03 +02:00
Benoit Marty
be9393fabe Merge branch 'hotfix/fix_crash_before_release' 2020-05-05 11:33:40 +02:00
Benoit Marty
c7a7ad7b57 Merge branch 'hotfix/fix_crash_before_release' into develop 2020-05-05 11:33:40 +02:00
Valere
78b7f03138 Fix / Sending events have warning until encrypted 2020-05-05 10:15:42 +02:00
Benoit Marty
ffeae7ec83 Fix timeline navigation when opening an event in a previous lastForward chunk.
In this case, we do not have a nextToken, but there are more event to load. So we perform a GET /context on the last known event.
Not sure it is correct to do that though...
2020-05-05 02:41:32 +02:00
Benoit Marty
db77e7b817 Create a fun 2020-05-05 02:41:32 +02:00
Benoit Marty
fcee85a682 Cleanup and doc 2020-05-05 02:41:32 +02:00
Benoit Marty
17ddb5ce43 if all events are rendered in the timeline (developer mode), render the room creation event. 2020-05-05 02:41:32 +02:00
Benoit Marty
53583c691f Add some logs 2020-05-05 02:41:32 +02:00
Benoit Marty
2b9d3960b3 Improve tests 2020-05-05 02:41:32 +02:00
Benoit Marty
92befcde5d Add test to cover previous last forward case (passing) 2020-05-05 02:41:32 +02:00
Benoit Marty
697eaec197 TI: After jump to unread, newer messages are never loaded (#1008) 2020-05-05 02:41:32 +02:00
Benoit Marty
86fba28313 After jump to unread, newer messages are never loaded (#1008) 2020-05-05 02:41:32 +02:00
Benoit Marty
f3c3c07d46 Kotlin sugar 2020-05-05 00:14:57 +02:00
Benoit Marty
8966e24925 Create a debug method to send x times the same event 2020-05-05 00:14:57 +02:00
Benoit Marty
becc5a7b54 Add assertion in debug 2020-05-05 00:14:57 +02:00
Benoit Marty
a61434ae08 doc 2020-05-05 00:14:57 +02:00
Benoit Marty
20b726819f Rename "LastLive" -> "LastForward" 2020-05-05 00:14:57 +02:00
Benoit Marty
bfd847179f Wait more 2020-05-05 00:14:57 +02:00
Benoit Marty
7e955ef0e4 Add possibility to create clear room 2020-05-05 00:14:57 +02:00
Benoit Marty
2697800deb Doc and cleanup 2020-05-05 00:14:57 +02:00
Benoit Marty
2c47fe9f0d typo 2020-05-05 00:14:57 +02:00
aWeinzierl
423f21b02e Translated using Weblate (German)
Currently translated at 96.4% (1611 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-04 18:43:34 +00:00
Alexander Eisele
eb6546d81c Translated using Weblate (German)
Currently translated at 96.4% (1611 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-04 18:43:33 +00:00
upgradetofreedom
4e2878300f Translated using Weblate (German)
Currently translated at 96.4% (1611 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-04 18:43:33 +00:00
Valere
4578b9df7f Fix / froezn object migration 2020-05-04 18:27:38 +02:00
Benoit Marty
d679c9d5d8 Cleanup 2020-05-04 17:30:55 +02:00
Benoit Marty
dc7b3dfc9d Fix crash when entering wrong passphrase 2020-05-04 17:30:13 +02:00
Benoit Marty
6843ea113b Version++ 2020-05-04 16:06:41 +02:00
Benoit Marty
0a8c954397 Merge remote-tracking branch 'origin/master' 2020-05-04 16:04:51 +02:00
Benoit Marty
358e10a093 Merge branch 'release/0.19.0' 2020-05-04 16:03:35 +02:00
Benoit Marty
c0b7ea6dd1 Merge branch 'release/0.19.0' into develop 2020-05-04 16:03:34 +02:00
Benoit Marty
0b5e618c1c Update CHANGES.md 2020-05-04 16:03:01 +02:00
Benoit Marty
1f528ee428 Format strings 2020-05-04 16:00:11 +02:00
Benoit Marty
bbd8b89589 Merge pull request #1321 from RiotTranslateBot/weblate-riot-android-riotx-application
Update from Weblate
2020-05-04 15:52:06 +02:00
Andrej Shadura
a5d2d65131 Translated using Weblate (Slovak)
Currently translated at 54.5% (912 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/sk/
2020-05-04 11:50:58 +00:00
Szimszon
b45504d97a Translated using Weblate (Hungarian)
Currently translated at 100.0% (163 of 163 strings)

Translation: Riot Android/RiotX Matrix SDK
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/hu/
2020-05-04 11:50:57 +00:00
Szimszon
0598ecaca3 Translated using Weblate (Hungarian)
Currently translated at 99.8% (1669 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/hu/
2020-05-04 11:50:57 +00:00
Alexander Eisele
0d9749a515 Translated using Weblate (German)
Currently translated at 95.9% (1604 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-04 11:50:55 +00:00
HayWo
836766f978 Translated using Weblate (German)
Currently translated at 95.9% (1604 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-04 11:50:55 +00:00
code-surfer
93851d0ab2 Translated using Weblate (German)
Currently translated at 95.9% (1604 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-04 11:50:55 +00:00
Ville Ranki
5fff637bee Translated using Weblate (Finnish)
Currently translated at 99.4% (162 of 163 strings)

Translation: Riot Android/RiotX Matrix SDK
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/fi/
2020-05-04 11:50:55 +00:00
Ville Ranki
eae015caa1 Translated using Weblate (Finnish)
Currently translated at 86.0% (1438 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/fi/
2020-05-04 11:50:54 +00:00
David
80a356c7e2 Translated using Weblate (Czech)
Currently translated at 98.4% (1645 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/cs/
2020-05-04 11:50:52 +00:00
onurays
3a0eed795a Lint fix. 2020-05-04 12:09:36 +03:00
onurays
c1c0c6f2c6 Lint fixes. 2020-05-04 11:22:27 +03:00
code-surfer
f04868ba19 Translated using Weblate (German)
Currently translated at 95.8% (1601 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-03 14:14:24 +00:00
n3niu
b052884912 Translated using Weblate (German)
Currently translated at 95.8% (1601 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-03 14:14:24 +00:00
code-surfer
7fb7729af6 Translated using Weblate (German)
Currently translated at 95.8% (1601 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-03 14:14:24 +00:00
random
2f5d824c65 Translated using Weblate (Italian)
Currently translated at 100.0% (163 of 163 strings)

Translation: Riot Android/RiotX Matrix SDK
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/it/
2020-05-03 14:14:24 +00:00
random
fbc46b3c8b Translated using Weblate (Italian)
Currently translated at 100.0% (1672 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/it/
2020-05-03 14:14:24 +00:00
n3niu
e986c9d343 Translated using Weblate (German)
Currently translated at 95.6% (1599 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/
2020-05-03 14:14:24 +00:00
Kévin C
3100473305 Translated using Weblate (French)
Currently translated at 100.0% (163 of 163 strings)

Translation: Riot Android/RiotX Matrix SDK
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/fr/
2020-05-03 14:14:24 +00:00
Kévin C
5eb9f32acb Translated using Weblate (French)
Currently translated at 100.0% (1672 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/fr/
2020-05-03 14:14:24 +00:00
Jeff Huang
0d12a80832 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (163 of 163 strings)

Translation: Riot Android/RiotX Matrix SDK
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/zh_Hant/
2020-05-03 14:14:24 +00:00
Jeff Huang
077c166c09 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (1672 of 1672 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/zh_Hant/
2020-05-03 14:14:24 +00:00
Akarshan Biswas
5d26b6a7cb Translated using Weblate (Bengali (India))
Currently translated at 12.3% (20 of 163 strings)

Translation: Riot Android/RiotX Matrix SDK
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/bn_IN/
2020-05-03 14:14:24 +00:00
Akarshan Biswas
68c1e8fc6d Added translation using Weblate (Bengali (India)) 2020-05-03 14:14:24 +00:00
yuuki-san
1ffd7dbb9f Translated using Weblate (Slovak)
Currently translated at 92.6% (151 of 163 strings)

Translation: Riot Android/RiotX Matrix SDK
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/sk/
2020-05-03 14:14:24 +00:00
yuuki-san
0cc48a190f Translated using Weblate (Slovak)
Currently translated at 54.2% (904 of 1667 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/sk/
2020-05-03 14:14:24 +00:00
random
8206a78156 Translated using Weblate (Italian)
Currently translated at 98.7% (1645 of 1667 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/it/
2020-05-03 14:14:24 +00:00
Jeff Huang
6a1e38ca04 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (1667 of 1667 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/zh_Hant/
2020-05-03 14:14:24 +00:00
Slavi Pantaleev
779f380d2f Translated using Weblate (Bulgarian)
Currently translated at 100.0% (163 of 163 strings)

Translation: Riot Android/RiotX Matrix SDK
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/bg/
2020-05-03 14:14:24 +00:00
rkfg
55f7461747 Translated using Weblate (Russian)
Currently translated at 75.4% (1257 of 1667 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/ru/
2020-05-03 14:14:24 +00:00
Kévin C
7665aba22c Translated using Weblate (French)
Currently translated at 100.0% (1667 of 1667 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/fr/
2020-05-03 14:14:24 +00:00
Jeff Huang
e96c5f7305 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (1667 of 1667 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/zh_Hant/
2020-05-03 14:14:24 +00:00
yuuki-san
c5ba34d619 Translated using Weblate (Slovak)
Currently translated at 54.0% (901 of 1667 strings)

Translation: Riot Android/RiotX application
Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/sk/
2020-05-03 14:14:24 +00:00
Valere
c13439eeb9 Merge pull request #1317 from vector-im/feature/fix_crash_bootstrap
Fix / Crash on bootstrap
2020-05-03 11:59:32 +02:00
Valere
d27b73f6be Fix / Crash on bootstrap
Exception: java.lang.IllegalArgumentException: 'value' is not a valid managed object.
2020-05-03 11:36:40 +02:00
Benoit Marty
bb427700d2 Merge pull request #1310 from vector-im/feature/room_creation
Several fixes on room creation collpasing events (Fixes #1309)
2020-04-30 18:19:49 +02:00
Valere
4589aaa11c Merge pull request #1312 from vector-im/feature/post_smoke_test_fix
Feature/post smoke test fix
2020-04-30 17:37:04 +02:00
Valere
b3dbcd7936 Show untrusted first 2020-04-30 15:43:19 +02:00
Valere
cac246aa15 update copy 2020-04-30 15:43:05 +02:00
Onuray Sahin
d2f0957eba Merge branch 'develop' into feature/invite_members_to_room 2020-04-30 16:11:52 +03:00
onurays
db18272ef2 Remove strings from strings_riotX.xml 2020-04-30 15:47:31 +03:00
onurays
cf5d89ea9b Documentation added for new parameter excludedUserIds. 2020-04-30 15:40:54 +03:00
onurays
0aeb327062 Changelog added. 2020-04-30 15:40:02 +03:00
onurays
5dc50195b3 Filter existing room members. 2020-04-30 15:28:20 +03:00
Benoit Marty
83db9b34d4 Merge pull request #1311 from vector-im/bmarty-patch-1
Add instruction regarding the template
2020-04-30 13:50:44 +02:00
Benoit Marty
a43df43642 Add instruction regarding the template 2020-04-30 13:10:53 +02:00
onurays
57a87ba620 Add InviteUsersToRoomActivity and mvrx classes. 2020-04-30 13:54:09 +03:00
Benoit Marty
f6cbc15cf7 Several fixes on room creation collpasing events (Fixes #1309)
- do not collapse room member events
- collapse other type of event: topic, alias, canonical alias, powel level
- Use correct user name for collapsed version (should be fixed twice due to the previous change of excluding some room member events)
- align "join" and "left" string with Riot-Web
2020-04-30 12:52:21 +02:00
Benoit Marty
7322144dc8 Remove duplicated strings 2020-04-30 12:15:26 +02:00
Valere
8e357c6b7f Merge pull request #1280 from vector-im/feature/e2e_timeline_decoration
Feature/e2e timeline decoration
2020-04-30 12:01:55 +02:00
Valere
7b20db64a5 Merge branch 'develop' into feature/e2e_timeline_decoration 2020-04-30 12:01:44 +02:00
Valere
429c634ed9 Merge pull request #1308 from vector-im/feature/fix_dm_shield_logic
Fix / Move DM shield rules to task
2020-04-30 12:00:18 +02:00
Valere
05230a6afa Code review 2020-04-30 11:38:32 +02:00
Valere
43eb804b23 Merge pull request #1303 from vector-im/feature/xs_old_new_session_detection
Feature/xs old new session detection
2020-04-30 11:23:15 +02:00
Valere
5840248ffa Fix / NPE Optional#get instead of getOrNull 2020-04-30 11:11:11 +02:00
Valere
6ea38c7eb0 Fix / Move DM shield rules to task 2020-04-30 10:55:25 +02:00
Valere
9586fa9f90 Typo in file name 2020-04-30 10:11:32 +02:00
Valere
0d0af6906e Code review 2020-04-30 10:10:56 +02:00
Valere
93070f3524 Fix / use distinct until change 2020-04-30 09:50:47 +02:00
Valere
7cf7b7e10e Fix / avoid showing legacy start toaster under verif bottomsheet 2020-04-30 09:50:38 +02:00
Valere
1de4869cde Fix / reuse cell keeps icon 2020-04-30 09:50:11 +02:00
onurays
a4eba653a3 Make a generic user directory search & selection views. 2020-04-30 02:50:30 +03:00
ganfra
21d0db8382 Merge pull request #1304 from vector-im/feature/template
Feature/template
2020-04-29 19:21:01 +02:00
ganfra
269d6e4d08 Remove AndroidManifest template 2020-04-29 19:19:50 +02:00
Valere
3cf341c3bf code quality 2020-04-29 18:48:26 +02:00
Valere
f0a9be2ec7 Better session detection 2020-04-29 18:46:36 +02:00
Valere
8955e5461c Add retry to sendToDeviceTask 2020-04-29 18:45:51 +02:00
Valere
087ff1c041 Fix / race when receive accept in sending start in to device 2020-04-29 18:44:25 +02:00
ganfra
1a307a0c4d Template: let the ViewModel factory be agnostic of the host 2020-04-29 17:58:54 +02:00
Benoit Marty
071a43c8d4 Merge pull request #1305 from vector-im/feature/fix_delay_initial_sync
Fix / ensure ux aware of wait
2020-04-29 17:12:58 +02:00
Valere
7b46c49ded Fix / missing primary key for migration 2020-04-29 16:35:50 +02:00
Valere
da5672d229 Fix / ensure ux aware of wait 2020-04-29 16:18:01 +02:00
Valere
dcfd9ee7a7 Fix copy 2020-04-29 15:12:07 +02:00
ganfra
35a6f90ed6 Create configure script for template 2020-04-29 14:41:45 +02:00
ganfra
d463e5e500 Create template 2020-04-29 14:38:01 +02:00
Valere
0f00597444 Fix / Regression on non e2e device
+ migrate to new rx objects
2020-04-29 12:35:22 +02:00
Valere
a806f70b35 New security alert to review old sessions 2020-04-29 12:04:59 +02:00
Benoit Marty
67f07bd1bb Merge pull request #1297 from vector-im/feature/xsigning_trust_optimization
Feature/xsigning trust optimization
2020-04-29 10:32:29 +02:00
Valere
39e18446ae fix typo 2020-04-29 09:34:28 +02:00
Benoit Marty
4dc0b00569 Import string from Matrix SDK 2020-04-28 23:54:35 +02:00
Benoit Marty
87979ccadd Merge pull request #1299 from vector-im/feature/emoji_perf
Emoji completion for 🎉
2020-04-28 23:41:02 +02:00
Benoit Marty
7c2a5af8f2 Merge pull request #1301 from vector-im/feature/strings
Feature/strings
2020-04-28 23:40:39 +02:00
Benoit Marty
dc6d4c6789 Remove problematic translation 2020-04-28 21:54:14 +02:00
Benoit Marty
db3d5e2677 Remove not used anymore translations 2020-04-28 21:36:34 +02:00
Benoit Marty
6dc8bdde04 Import translation from Riot-Android 2020-04-28 21:35:39 +02:00
Valere
c02cfb2f4f Merge pull request #1296 from vector-im/feature/untrusted_session_shields
Update manage sessions screen
2020-04-28 19:17:00 +02:00
Valere
947c46d7b5 Avoid negative margin 2020-04-28 19:16:29 +02:00
ganfra
8942ce964a Fix android test not compiling 2020-04-28 19:09:20 +02:00
Valere
a05c401892 Code review 2020-04-28 18:47:54 +02:00
onurays
f25c981173 Add menu item to invite users to the room. 2020-04-28 17:30:23 +03:00
ganfra
43055964ba Crypto store : avoid copying before mapping to other data 2020-04-28 16:26:04 +02:00
Benoit Marty
a4192a0761 Emoji completion 🎉 does not completes to 🎉 like on web (#1285) 2020-04-28 14:29:43 +02:00
Benoit Marty
9c8ff7de7f Add Android test for EmojiDataSource 2020-04-28 14:15:50 +02:00
Benoit Marty
b4247c89e4 Make fun internal 2020-04-28 14:15:50 +02:00
Valere
cdabca6def Fix copy 2020-04-28 13:20:30 +02:00
Valere
2d6f0205a4 Update manage sessions screen 2020-04-28 13:20:30 +02:00
ganfra
4e8177f738 Fix lint 2020-04-28 13:10:44 +02:00
Valere
798e9e4fde Merge pull request #1287 from vector-im/feature/improve_security_toaster
Remember ignored unknown sessions
2020-04-28 12:38:14 +02:00
Valere
8871390167 Code review 2020-04-28 12:25:50 +02:00
ganfra
fc86e7e1f6 ShieldTrust: use only active members 2020-04-28 11:00:41 +02:00
ganfra
21912c290a XSigning keys: use json instead of object serialization 2020-04-28 10:59:51 +02:00
Benoit Marty
df335c7aa3 Merge pull request #1290 from vector-im/feature/cleanup_ui_state
Clear preferences when user logs out
2020-04-28 10:54:48 +02:00
Benoit Marty
8bd4cc8f54 Merge pull request #1277 from vector-im/feature/sso
Use correct sso url
2020-04-27 14:36:37 +02:00
Benoit Marty
4e3df99e42 Merge pull request #1281 from vector-im/feature/various_issues_verification_ssss_bootstrap
Feature/various issues verification ssss bootstrap
2020-04-27 14:32:18 +02:00
Benoit Marty
b1e1b4a7dc Remove "Reset keys" developer action 2020-04-27 14:25:45 +02:00
Benoit Marty
a233e9b0a0 Avoid code duplication, and improve readability 2020-04-27 14:25:45 +02:00
Benoit Marty
ebecb9bb9a i18n 2020-04-27 14:25:07 +02:00
Benoit Marty
35962c3cb5 Do not propose bootsrap for SSO accounts
Because we do not support yet confirming account credentials using SSO
2020-04-27 14:25:07 +02:00
Benoit Marty
0ac6a26b6e Add "continue" button to the bootstrap bottom sheet 2020-04-27 14:25:07 +02:00
Benoit Marty
0a887c0926 Cleanup 2020-04-27 14:25:07 +02:00
Benoit Marty
54c0239969 fix layout issue when text is displayed on 2 lines 2020-04-27 14:25:07 +02:00
Benoit Marty
8559254593 Merge pull request #1289 from vector-im/feature/fix-edited_event_click
Do not handle url if it is not valid.
2020-04-27 14:24:25 +02:00
onurays
626eb4d06b Comments added to explain why we should check if the url is valid. 2020-04-27 13:44:16 +03:00
Benoit Marty
aa16ba88ae Add hint to translators 2020-04-27 12:41:47 +02:00
Benoit Marty
a633c11c1d Do not clear developer preference when logging out 2020-04-27 12:29:38 +02:00
Benoit Marty
a4931e21ae Clear sharedPreference when logging out 2020-04-27 12:26:19 +02:00
Valere
996fabb327 Merge pull request #1288 from vector-im/feature/fix_update_4s_backup_after_bootstrap
Fix / backup key was not save in 4S after bootstrap
2020-04-27 11:42:09 +02:00
onurays
6c4e71d7d4 Do not handle url if it is not valid. 2020-04-27 12:26:35 +03:00
Valere
ad0ad502aa Fix / backup key was not save in 4S after bootstrap 2020-04-27 11:14:13 +02:00
Valere
42b47c25aa Remember ignored unknown sessions 2020-04-27 10:09:37 +02:00
Benoit Marty
7ef1970a0b Better layout preview 2020-04-27 01:17:20 +02:00
Benoit Marty
409d751612 Merge pull request #1278 from vector-im/feature/fix_misleading_url_color
Fix the color of misleading url according to design document.
2020-04-27 00:50:03 +02:00
Valere
bdce71abfd Update change log 2020-04-24 16:50:56 +02:00
Valere
114bce5f64 Fix / DB crash due to deserializaion 2020-04-24 16:50:56 +02:00
Valere
20e5ebc88b Decorate timeline with e2e warning 2020-04-24 16:50:56 +02:00
onurays
52aa57ac7c Fix the color of misleading url according to design document. 2020-04-24 17:18:59 +03:00
Benoit Marty
8daf72a4b0 Use correct URL for SSO connection (#1178) 2020-04-24 15:54:02 +02:00
Benoit Marty
51eb2cda95 Move some constants to the Matrix SDK 2020-04-24 15:53:30 +02:00
Benoit Marty
57779c99c2 improve script 2020-04-24 14:39:55 +02:00
Benoit Marty
02e02ed691 Merge pull request #1275 from vector-im/feature/log_improvement
Log improvement for test
2020-04-24 14:38:28 +02:00
Benoit Marty
af0b798ef1 Ensure Timber log output when running tests
to squash
2020-04-24 13:38:28 +02:00
Benoit Marty
51be8d5ed5 Remove previous temporary solution 2020-04-24 13:26:25 +02:00
Benoit Marty
270bed5013 EventBus logs using Timber 2020-04-24 11:57:49 +02:00
Benoit Marty
20b3c33fb0 Remove bad comment 2020-04-24 11:57:49 +02:00
Benoit Marty
b2aaf1cca1 CurlLoggingInterceptor now uses Timber to log 2020-04-24 11:57:49 +02:00
Onuray Sahin
5f6969e2cc Merge pull request #1270 from vector-im/feature/misleading_url_target
Show a warning dialog if the text of the clicked link does not match
2020-04-24 11:53:16 +03:00
Onuray Sahin
f0648ee52a Merge branch 'develop' into feature/misleading_url_target 2020-04-24 11:24:39 +03:00
Valere
88c70a2c10 Merge pull request #1266 from vector-im/feature/update_ssss_activity
Feature/update ssss activity
2020-04-23 21:20:43 +02:00
Valere
22c3ed6bb9 Code review 2020-04-23 21:20:01 +02:00
Valere
b0d25fa84f Update vector/src/main/res/values/strings_riotX.xml
Co-Authored-By: Benoit Marty <benoitm@matrix.org>
2020-04-23 21:16:46 +02:00
Valere
57636207d2 Fix copy 2020-04-23 21:16:46 +02:00
Valere
eac9133bb1 update change log 2020-04-23 21:16:46 +02:00
Valere
f7e7659750 klint 2020-04-23 21:16:28 +02:00
Valere
e719541b5e Fix / crash when generating random key 2020-04-23 21:16:28 +02:00
Valere
bd7acfbb1a Add option to recover with recovery key 2020-04-23 21:16:28 +02:00
Valere
25b42cb4f3 Merge pull request #1272 from vector-im/feature/update_design_complete_secu
Update design wait for self verification
2020-04-23 21:14:02 +02:00
Valere
928149fe35 Merge branch 'develop' into feature/update_design_complete_secu 2020-04-23 21:13:53 +02:00
Onuray Sahin
a80181da9e Merge branch 'develop' into feature/misleading_url_target 2020-04-23 20:18:44 +03:00
onurays
72de5d6adc Code review fixes. 2020-04-23 20:17:52 +03:00
Benoit Marty
ed4154d763 Merge pull request #1261 from vector-im/feature/unwedging
Feature/unwedging
2020-04-23 18:20:31 +02:00
Benoit Marty
4ee13b6fa1 Merge branch 'develop' into feature/unwedging 2020-04-23 18:20:09 +02:00
Benoit Marty
33fb1dd147 Merge pull request #1262 from vector-im/feature/fix_add_by_user_id
Add user to direct chat by user id.
2020-04-23 18:05:15 +02:00
Valere
736905edf8 Merge pull request #1269 from vector-im/feature/complete_security_hide_4s
Hide Use recovery key when 4S is not setup
2020-04-23 18:03:14 +02:00
Benoit Marty
e8a91eab88 Merge pull request #1265 from vector-im/feature/deactivate
Deactivate account using password
2020-04-23 17:30:08 +02:00
Valere
b951af0116 RiotX spelling 2020-04-23 17:00:37 +02:00
onurays
c3299845c1 use generic cancel and continue strings. 2020-04-23 17:44:30 +03:00
onurays
54644db587 Dialog design fixes. 2020-04-23 17:37:30 +03:00
Valere
cb0e93c43e use theme notice color 2020-04-23 16:23:36 +02:00
Valere
4c4ec6cfe8 Code review accessibility 2020-04-23 16:13:19 +02:00
Valere
449be02f53 update icon tint 2020-04-23 16:05:43 +02:00
Valere
25d2c2e2c6 Update design wait for self verification 2020-04-23 15:45:21 +02:00
onurays
ec2ba7c0b2 Do not warn if the domain of urls are the same and colorize links. 2020-04-23 16:30:37 +03:00
onurays
06a13d5c20 Show a warning dialog if the text of the clicked link does not match the link target
Fixes #922
2020-04-23 15:42:57 +03:00
Valere
7e0591ffee Hide Use recovery key when 4S is not setup 2020-04-23 11:14:20 +02:00
Benoit Marty
1363100f94 Create DM: now any userId can be entered, so deal with the case of the userId does not exists.
Use same string resource value than Riot-Web
2020-04-22 23:03:04 +02:00
Benoit Marty
06cf59bca7 Even if it's not happening, do not add the search term if already present in the results. 2020-04-22 19:20:13 +02:00
Valere
e37dd547b8 code review 2020-04-22 18:50:59 +02:00
Benoit Marty
671c1259af Merge pull request #1239 from waylon531/develop
Use a bigger thread pool
2020-04-22 18:23:37 +02:00
Benoit Marty
3d07ccd98e auto-review. Password could be only spaces... 2020-04-22 18:03:47 +02:00
Benoit Marty
03b9774c56 ktlint 2020-04-22 17:56:13 +02:00
Benoit Marty
0f1ddee71c Use SwitchCompat 2020-04-22 17:54:25 +02:00
Benoit Marty
855efa93cc Remove cancel button, useless. 2020-04-22 17:29:34 +02:00
Valere
d0f776a9cf Discard session command only encrypted room 2020-04-22 16:41:34 +02:00
Benoit Marty
da66e38c68 Close drawer when opening settings 2020-04-22 16:02:06 +02:00
Benoit Marty
a4ba8c152d Add IME action to the password field 2020-04-22 15:51:34 +02:00
Valere
9b320ed3c7 Fix unwedging 2020-04-22 15:40:59 +02:00
Benoit Marty
c854491248 Be more robust 2020-04-22 15:00:04 +02:00
Benoit Marty
5755d5bfaa Deactivate account: unit test and cleanup 2020-04-22 14:36:01 +02:00
Benoit Marty
ff320fec55 Move internal class to internal package 2020-04-21 20:47:49 +02:00
Benoit Marty
8c8a84b039 Account deactivation: the task does the cleanup 2020-04-21 20:41:10 +02:00
Benoit Marty
045e3d7bae Account deactivation (with password only) (#35) 2020-04-21 20:31:54 +02:00
Valere
491f0e6032 Merge pull request #1259 from vector-im/feature/restore_backup_from_ssss
KeyBackup / Use 4S if key in quadS
2020-04-21 14:31:26 +02:00
onurays
3163bc8b80 Add user to direct chat by user id.
Fixes #1065
2020-04-21 15:25:48 +03:00
Benoit Marty
eca3bf0817 typo 2020-04-21 13:49:36 +02:00
Valere
63355ca256 code review 2020-04-21 11:06:56 +02:00
Benoit Marty
c39a0e4fd5 timout -> timeout 2020-04-21 00:29:44 +02:00
Benoit Marty
59280ed18e Small improvement in documentation 2020-04-21 00:29:02 +02:00
Benoit Marty
c1acb1af66 Add integration test for change password feature 2020-04-21 00:23:01 +02:00
Valere
8a4f0a0c00 KeyBackup / Use 4S if key in quadS 2020-04-20 19:21:44 +02:00
Benoit Marty
a6368c473e Restart broken Olm sessions ([MSC1719](https://github.com/matrix-org/matrix-doc/pull/1719)) 2020-04-20 18:07:14 +02:00
Benoit Marty
3615ca6b95 VersionName can be null when running integration test 2020-04-20 18:07:14 +02:00
Benoit Marty
ddb00ba23a Enable Timber log in integration tests 2020-04-20 18:07:14 +02:00
Benoit Marty
91cf4b647d var -> val 2020-04-20 18:07:14 +02:00
Benoit Marty
f989eed8b0 Use @Throws(MXCryptoError::class) 2020-04-20 18:07:14 +02:00
Benoit Marty
4d296ddc09 Avoid injecting credentials 2020-04-20 18:07:14 +02:00
Benoit Marty
6186c22e02 improve code 2020-04-20 18:07:14 +02:00
Benoit Marty
13cd13a42f Create RoomEncryptorsStore 2020-04-20 18:07:14 +02:00
Benoit Marty
a42eb42178 Avoid injecting Credentials 2020-04-20 18:07:14 +02:00
Benoit Marty
7924ef207c Add Javadoc 2020-04-20 18:07:14 +02:00
Benoit Marty
5900245018 Make the test fail before unwedging implementation 2020-04-20 18:07:14 +02:00
Benoit Marty
00c239bc42 cleanup 2020-04-20 18:07:14 +02:00
Benoit Marty
0cb43eef51 Add test for Unwedging (before implementing it) 2020-04-20 18:07:14 +02:00
Benoit Marty
41a8f40241 Improve API 2020-04-20 18:07:14 +02:00
Benoit Marty
a8641ef879 Split KeysBackup to several files. No other change. 2020-04-20 18:07:14 +02:00
Benoit Marty
4d207e6acd Merge pull request #1258 from vector-im/feature/strings
Strings
2020-04-20 17:41:50 +02:00
Valere
1227de3f9c Merge pull request #1256 from vector-im/feature/increase_default_timeout
Increase default timeout to match old riot
2020-04-20 17:13:59 +02:00
Benoit Marty
6cad129625 Still waiting for translation update 2020-04-20 16:13:16 +02:00
Benoit Marty
9ccf51fbc0 Import string from Riot - new strings 2020-04-20 15:20:08 +02:00
Benoit Marty
990867204e Import string from Riot 2020-04-20 15:17:14 +02:00
Onuray Sahin
5795b7e063 Merge pull request #1242 from vector-im/feature/save_media_to_gallery
Save media files to Gallery
2020-04-20 13:24:33 +03:00
Valere
b612a7e63c Merge pull request #1252 from vector-im/feature/fix_device_detection_debounce
Avoid unnecessary /device call
2020-04-20 12:07:17 +02:00
Valere
50c73b68aa cleaning 2020-04-20 11:31:42 +02:00
Valere
c7ac5e2293 Increase default timeout to match old riot 2020-04-20 11:26:03 +02:00
Valere
43cb1fe68b Code review 2020-04-20 11:12:35 +02:00
onurays
f807de9a83 Lint fix. 2020-04-20 11:53:33 +03:00
Onuray Sahin
754f220596 Merge branch 'develop' into feature/save_media_to_gallery 2020-04-20 11:21:14 +03:00
onurays
3f7ca8669a Remove duplicated save icon. 2020-04-20 00:48:52 +03:00
Valere
28c6921a0a Avoid unnecessary /device call 2020-04-17 18:08:29 +02:00
onurays
26bb8ce2be Give user a toast after adding media file to the gallery. 2020-04-17 16:53:40 +03:00
onurays
8434f9326e Save action added to bottom sheet. 2020-04-17 15:27:42 +03:00
Waylon Cude
68f93c6c31 Merge branch 'develop' of https://github.com/vector-im/riotX-android into develop
Signed-off-by: Waylon Cude <waylon.cude@finzdani.net>
2020-04-16 12:19:17 -07:00
Benoit Marty
7961423556 Merge pull request #1244 from vector-im/feature/media_path
Fix download and upload media path
2020-04-16 17:58:08 +02:00
Benoit Marty
ac07fb47d7 Better Kotlin code 2020-04-16 17:42:55 +02:00
Valere
fbcbd6def5 Merge pull request #1243 from vector-im/feature/update_x_signing_copy
Feature/update x signing copy
2020-04-16 17:30:11 +02:00
Valere
3fe15f2d45 code review 2020-04-16 17:02:01 +02:00
Valere
968377a5be Update vector/src/main/res/values/strings_riotX.xml
Co-Authored-By: Benoit Marty <benoitm@matrix.org>
2020-04-16 16:53:24 +02:00
Benoit Marty
5652140f5d Improve ContentUrlResolver 2020-04-16 16:41:45 +02:00
Benoit Marty
e97c95f40a Fix issue with media path (Fixes #1227) 2020-04-16 16:41:45 +02:00
Valere
7ac5f58f32 Show CrossSigning info even if not developer mode 2020-04-16 16:30:45 +02:00
Valere
ce2f4e163d Update password/recovery copy + update icons 2020-04-16 16:30:45 +02:00
Benoit Marty
cc94b6cf7d Merge pull request #1116 from vector-im/feature/worker_manager
Add some documentation on Workers
2020-04-16 16:28:20 +02:00
onurays
ab3cc90ed5 Share menu item added to video media viewer. 2020-04-16 16:46:00 +03:00
Valere
614127e46b Merge pull request #1240 from vector-im/feature/update_security_notice
Feature/update security notice
2020-04-16 15:33:54 +02:00
Valere
66fc38ad4b Remove GlobalScope usage 2020-04-16 15:09:16 +02:00
Valere
f68e84d9da Update toaster to match web 2020-04-16 15:09:16 +02:00
onurays
2b2e6dd6f8 Share menu item added to image media viewer. 2020-04-16 16:04:37 +03:00
Valere
621e78a864 Merge pull request #1235 from vector-im/feature/upgrate_cross_signing
Add migration state to bootstrap
2020-04-16 15:04:06 +02:00
Benoit Marty
828e972c74 Split long lines 2020-04-16 14:35:55 +02:00
Benoit Marty
15bd7d1c5b Change the regex to detect long lines to allow schema with UTF-8 chars 2020-04-16 14:35:23 +02:00
Benoit Marty
79e81dbdde ktlint 2020-04-16 14:01:15 +02:00
Benoit Marty
f93f50b582 Code readability 2020-04-16 14:00:24 +02:00
Benoit Marty
d934f92ebd Fix bad apostrophe 2020-04-16 13:58:54 +02:00
Waylon Cude
d20cf484ff Merge branch 'develop' of https://github.com/vector-im/riotX-android into develop
Signed-off-by: Waylon Cude <waylon.cude@finzdani.net>
2020-04-16 03:10:06 -07:00
Waylon Cude
ec4458e84a Updated CHANGES.md
Signed-off-by: Waylon Cude <waylon.cude@finzdani.net>
2020-04-16 02:50:58 -07:00
waylon531
6c1719e365 Use a bigger thread pool
This patch makes RiotX use an unbounded thread pool to handle
connections. The default thread pool for the android WorkManager has a
fairly anemic number of threads and I suspect this was causing
performance issues especially because of all the long-running jobs that
happen whenever you sync.

I tested this out on my phone and all of the sluggishness appears to
have gone away. I tested both the debug and release builds to make sure
it wasn't just some release optimization. RiotX is so much snappier now!

This fixes #1221

Signed-off-by: Waylon Cude <waylon.cude@finzdani.net>
2020-04-16 02:44:31 -07:00
Benoit Marty
467f48f1a6 Merge remote-tracking branch 'origin/develop' into develop 2020-04-16 11:33:22 +02:00
Valere
a44cb876c9 move strings to resources 2020-04-16 11:30:10 +02:00
Valere
e79c824913 Fix / password visibility initial state bug 2020-04-16 11:30:10 +02:00
Valere
b8e9cc70f2 fix / line too long 2020-04-16 11:30:10 +02:00
Valere
a2f32307f0 Support back from migrate recovery key 2020-04-16 11:30:10 +02:00
Valere
c1d39cefd5 Fix / avoid upgrade secu popup on account creation 2020-04-16 11:30:10 +02:00
Valere
0edc562120 Fix / test compilation 2020-04-16 11:30:10 +02:00
Valere
8ae2f06044 Add change log 2020-04-16 11:30:10 +02:00
Valere
aa496e6efb Add migration state to bootstrap 2020-04-16 11:30:10 +02:00
Benoit Marty
1372192031 Merge pull request #1091 from vector-im/feature/secure
Add a setting to prevent screenshot of the application, disabled by default (#1027)
2020-04-16 11:27:59 +02:00
Benoit Marty
ea03f76847 Merge pull request #1129 from vector-im/feature/update_password
Change password function implemented.
2020-04-16 11:26:33 +02:00
Benoit Marty
d74a5f9979 Typo 2020-04-16 11:23:41 +02:00
Benoit Marty
febadcc4f6 Merge pull request #1238 from vector-im/feature/thumbnail_info
`mimetype` field is optional
2020-04-16 10:57:29 +02:00
Benoit Marty
17ece54cb0 mimetype field is optional 2020-04-16 10:28:23 +02:00
Benoit Marty
da04a74350 Merge pull request #1143 from MatMaul/refresh-summary
Refresh the whole notifs when cleaning one so the summary get updated
2020-04-15 17:29:36 +02:00
Benoit Marty
634c8947bd Merge branch 'develop' into refresh-summary 2020-04-15 17:29:08 +02:00
Benoit Marty
f6f6fa99fb Merge pull request #1223 from vector-im/feature/cross_signing_as_task
Make initialize cross signing as a task
2020-04-15 17:21:25 +02:00
Benoit Marty
dcfbfc4981 Merge pull request #1230 from vector-im/feature/fix_download_file
Catch network errors during file downloading.
2020-04-15 16:54:31 +02:00
Benoit Marty
6201a9b8ef Merge branch 'develop' into feature/fix_download_file 2020-04-15 16:52:40 +02:00
Benoit Marty
1981d2e9ac Merge pull request #1233 from vector-im/feature/fix_local_echo_no_update
Fix / sending event not always updating
2020-04-15 16:51:16 +02:00
Benoit Marty
66f6b1ecac Merge pull request #1224 from vector-im/feature/composer_shield
Add shield in composer
2020-04-15 16:49:50 +02:00
Benoit Marty
affe2b59da Fix crash 2020-04-15 16:40:01 +02:00
Benoit Marty
757f8ec96a Change password: prevent cancellation when processing 2020-04-15 16:39:05 +02:00
Benoit Marty
bf5e2b96df Change password: bigger margins 2020-04-15 16:39:05 +02:00
Benoit Marty
5666965321 Change password: do not trim passwords 2020-04-15 16:39:05 +02:00
Benoit Marty
7bf1f916c4 Change password: lambda 2020-04-15 16:39:05 +02:00
Benoit Marty
d44e43d94b Change password: update wording of button (Nad's request) 2020-04-15 16:39:05 +02:00
Benoit Marty
9fe32fe915 Change password: hide the preference (as Riot-Web does) if it is not possible to change the password. 2020-04-15 16:39:05 +02:00
Benoit Marty
e21cb3082b Change password: update preference summary. Some people think we know the password. Using Riot-web wording 2020-04-15 16:39:05 +02:00
Benoit Marty
c50bc10f92 Code review: improve layout 2020-04-15 16:38:44 +02:00
Benoit Marty
1b416028b4 Code review: inline the error instead of using toast 2020-04-15 16:38:44 +02:00
Benoit Marty
85493b7532 Code review: use isInvalidPassword() extension everywhere. Also be robust if the Fragment is destroyed 2020-04-15 16:38:44 +02:00
onurays
dbabe0232f Do not override the default timeout. 2020-04-15 16:38:44 +02:00
onurays
dfc8e8ec4c AccountService is created. 2020-04-15 16:38:44 +02:00
onurays
f00db49bda Change password function implemented.
Fixes #528
2020-04-15 16:38:44 +02:00
onurays
b4a3eb2cb3 Fix return the exception instead of empty one. 2020-04-15 16:39:41 +03:00
Valere
81012746c4 Code review / added new key for message hint 2020-04-15 15:39:23 +02:00
Valere
1deacfbb34 Code review 2020-04-15 15:37:43 +02:00
Valere
c35d854776 Add shield in composer 2020-04-15 15:37:43 +02:00
Benoit Marty
c0fa259b40 Add a setting to prevent screenshot of the application, disabled by default (#1027) 2020-04-15 15:04:19 +02:00
Benoit Marty
391d3cb6b5 Merge pull request #1186 from duncanturk/improvement-957-catchup-indicator-on-invite
Fix #957 catchup indicator on invite
2020-04-15 15:02:16 +02:00
Benoit Marty
6d56220d98 Merge branch 'develop' into improvement-957-catchup-indicator-on-invite 2020-04-15 15:00:34 +02:00
Nolan Darilek
2e4d30ef29 Set tickerText to improve accessibility of notifications.
Signed-off-by: Nolan Darilek <nolan@thewordnerd.info>
2020-04-15 07:43:41 -05:00
Benoit Marty
c57fa3f0d0 Merge pull request #1176 from vector-im/feature/target-sdk-29
Increase targetSdk to 29
2020-04-15 14:32:16 +02:00
Benoit Marty
f2bca51046 Merge pull request #1232 from vector-im/feature/translations
string sync
2020-04-15 14:24:39 +02:00
Benoit Marty
6751d88ade Remove .idea exclusion 2020-04-15 13:00:03 +02:00
Benoit Marty
e26a0bc9ae Add Android SDK version 2020-04-15 12:57:15 +02:00
Benoit Marty
6dc517584f Fix merge issue 2020-04-15 12:56:33 +02:00
Benoit Marty
24d0cdef1f Add missing changes of SDK version and build tools 2020-04-15 12:53:28 +02:00
Benoit Marty
6639f89a68 Simpler code 2020-04-15 12:53:08 +02:00
Benoit Marty
0c0e9521f5 Fix lint issue 2020-04-15 09:50:25 +02:00
Valere
f2b684aa9e Fix / user and self signing failing
bad copy paste
2020-04-14 18:23:20 +02:00
Valere
68ca0e9d4b Fix / sending event not always updating 2020-04-14 17:35:11 +02:00
Benoit Marty
e54077e020 String copied to Riot project 2020-04-14 17:26:23 +02:00
Benoit Marty
9111800e7a Create specific string for RiotX 2020-04-14 17:23:59 +02:00
Benoit Marty
ef6847671a Import strings from Riot 2020-04-14 17:13:43 +02:00
Benoit Marty
b8cb0588fe Add new resources 2020-04-14 17:06:05 +02:00
onurays
667b371653 Continue supporting old APIs. 2020-04-14 16:29:11 +03:00
onurays
190fbb95ec Merge branch 'develop' into feature/target-sdk-29
# Conflicts:
#	vector/src/main/java/im/vector/riotx/features/crypto/verification/VerificationBottomSheetViewModel.kt
2020-04-14 13:59:54 +03:00
onurays
f97e08b4e5 Remove .gitignore which belongs to another PR. 2020-04-14 13:12:17 +03:00
onurays
7242cbda40 Catch network errors during file downloading.
Fixes #1229
2020-04-13 17:48:19 +03:00
Valere
9e3011d4c8 Make initialize cross signing as a task 2020-04-10 17:04:34 +02:00
Valere
eb50256af7 Merge pull request #1222 from vector-im/feature/verification_unified_emoji
Uniform emoji representation for all platform
2020-04-10 16:05:42 +02:00
Valere
ccacd20428 Merge branch 'develop' into feature/verification_unified_emoji 2020-04-10 16:05:33 +02:00
Valere
ac46fe9e16 Merge pull request #1218 from vector-im/feature/scan_confirm_update
Feature/scan confirm update
2020-04-10 16:05:02 +02:00
Valere
9cfb83f0d2 Remove outdated translation 2020-04-10 14:31:03 +02:00
Valere
943ba3bebd Fix / string bad argument number - lint 2020-04-10 13:14:12 +02:00
Valere
fccfd00949 Fix / design update 2020-04-10 12:12:21 +02:00
Valere
68323057aa Update change log 2020-04-10 12:12:21 +02:00
Valere
5081361c2d Update Scan confirm flow 2020-04-10 12:12:06 +02:00
Valere
3ba619d45c Merge pull request #1215 from vector-im/feature/ssss_and_backup
Fixes #1214
2020-04-10 12:10:42 +02:00
Valere
f5dc0b38ff Code review 2020-04-10 11:47:54 +02:00
Valere
8357abd455 Added prefix to resources to avoid accidental override 2020-04-10 11:18:41 +02:00
Valere
ede899d78e Fix / Bad smiley emojii 2020-04-10 11:09:16 +02:00
Valere
a703574004 Uniform emoji representation for all platform 2020-04-10 11:02:33 +02:00
Christopher Rossbach
ef2abbfbd4 Merge branch 'develop' into improvement-957-catchup-indicator-on-invite 2020-04-09 11:11:44 +02:00
Valere
7c0137e2dc Fix / await callback suspend forever 2020-04-09 10:46:52 +02:00
Valere
34dec64d9c Fixes #1214 2020-04-08 17:56:12 +02:00
Valere
3968bb3488 Merge pull request #1213 from vector-im/feature/timeline_sum_item
Feature/timeline sum item
2020-04-08 17:08:53 +02:00
Valere
6f2d7aebba code review 2020-04-08 16:37:52 +02:00
Valere
366a35913b Fix alignement 2020-04-08 16:31:01 +02:00
Valere
aec49fe542 Change log 2020-04-08 16:31:01 +02:00
Valere
f04d8b0e03 cleaning 2020-04-08 16:31:01 +02:00
Valere
08af61b778 rename layout 2020-04-08 16:31:01 +02:00
Valere
277f35a352 Merge room creation events in one summary 2020-04-08 16:31:01 +02:00
Valere
68512e475f WIP 2020-04-08 16:31:01 +02:00
Valere
0eff00ebee Merge pull request #1211 from vector-im/feature/fix_gossiping_to_early
Fix / Send gossip request on other done received
2020-04-08 16:30:17 +02:00
Onuray Sahin
8a4a288074 Merge branch 'develop' into feature/target-sdk-29 2020-04-08 14:15:02 +03:00
onurays
5b1f887760 Code review fixes. 2020-04-08 14:10:31 +03:00
onurays
dcb6af6c45 .gitignore file added. 2020-04-08 12:40:29 +03:00
Christopher Rossbach
3ff5952417 Merge branch 'develop' into improvement-957-catchup-indicator-on-invite 2020-04-07 20:53:31 +02:00
Valere
b480eb3688 Update change log 2020-04-07 19:20:49 +02:00
Valere
12abca1b80 Fix / Send gossip request on other done received 2020-04-07 19:09:56 +02:00
Valere
1d8ed387bc Merge pull request #1206 from vector-im/feature/gossip_keybackup_key
Feature/gossip keybackup key
2020-04-07 18:06:05 +02:00
Christopher Rossbach
5521c094f7 fix typing difference 2020-04-07 17:50:01 +02:00
Christopher Rossbach
222b72a014 Merge branch 'develop' into improvement-957-catchup-indicator-on-invite 2020-04-07 17:46:23 +02:00
Valere
8904ca27f2 clean 2020-04-07 15:30:19 +02:00
Valere
6c5da97c16 code review 2020-04-07 15:25:31 +02:00
Valere
d4d73db5ae keybackup gossip test 2020-04-07 15:15:45 +02:00
Valere
1a436f962f update change log
cleaning
2020-04-07 15:15:45 +02:00
Valere
dc61ee61f5 Fix / wrong export format 2020-04-07 15:15:45 +02:00
Valere
5b4b5e7a57 Gossip keybackup key after verification! 2020-04-07 15:15:45 +02:00
Valere
0164f94047 Merge pull request #1198 from vector-im/feature/crosssigning_bootstrap
Feature/crosssigning bootstrap
2020-04-07 15:14:54 +02:00
Valere
153587bd82 Merge branch 'develop' into feature/crosssigning_bootstrap 2020-04-07 15:14:43 +02:00
Valere
326f2e99fb klint 2020-04-06 10:00:59 +02:00
Valere
1dfd6f232a Code quality / line too long 2020-04-03 18:59:21 +02:00
Valere
42d61944b5 Merge pull request #1204 from vector-im/feature/increase_file_log_size
Increase file logger size
2020-04-03 16:40:18 +02:00
Valere
50a8ffeca1 Merge pull request #1203 from vector-im/feature/fix_e2e_null_alg
Feature/fix e2e null alg
2020-04-03 15:57:56 +02:00
Valere
f605bb8270 Code review 2020-04-03 15:57:05 +02:00
Valere
7ffb6113a4 Increase file logger size 2020-04-03 13:53:34 +02:00
Valere
156e6114c1 Updade change log 2020-04-03 13:43:40 +02:00
Valere
c91bc82cd9 Fix / Ensure encryption set even if faield to fetch members 2020-04-03 13:35:09 +02:00
Valere
8b481e2294 Remove dead code 2020-04-03 13:34:38 +02:00
Valere
92bf3f1349 Update change log
+ code quality
2020-04-03 11:14:14 +02:00
Valere
6474735662 Fix / devtools was not showing all json numbers 2020-04-03 10:31:44 +02:00
Valere
45c5626267 Add generate key option 2020-04-02 18:30:43 +02:00
Valere
c27264761d Back /Skip navigation 2020-04-02 18:11:52 +02:00
Valere
c6abfa14ea Fix / Bind continue button 2020-04-02 16:54:30 +02:00
Valere
2f237cf17b klint 2020-04-02 16:51:40 +02:00
Valere
bf5ba99653 Full bootstrap flow initial commit 2020-04-02 16:51:03 +02:00
Valere
8ecdac7c31 Fixes #1191 2020-03-31 17:08:11 +02:00
Valere
a40dd31543 Bootstrap bottomsheet 2020-03-27 17:09:18 +01:00
Christopher Rossbach
dff89cb2e1 document changes
Signed-off-by: Christopher Rossbach <31703168+duncanturk@users.noreply.github.com>
2020-03-27 14:41:48 +01:00
Christopher Rossbach
cdbb657961 Fix #957 by incrementing the catchup count on home icon.
Signed-off-by: Christopher Rossbach <31703168+duncanturk@users.noreply.github.com>
2020-03-27 14:24:42 +01:00
Onuray Sahin
443d45db6a Merge branch 'develop' into feature/target-sdk-29 2020-03-27 12:21:39 +03:00
Valere
a995615f87 Fix / protect against crash during migration 2020-03-26 18:20:12 +01:00
Valere
024c62515c Merge pull request #1181 from vector-im/feature/update_shield_logic
Update shield logic for DM
2020-03-26 16:58:10 +01:00
Valere
75e66a6550 Merge branch 'develop' into feature/update_shield_logic 2020-03-26 16:58:01 +01:00
Onuray Sahin
e2f7890bb8 Merge branch 'develop' into feature/target-sdk-29 2020-03-26 17:39:22 +03:00
onurays
0a77d5014e Fix nullability issues. 2020-03-26 17:19:29 +03:00
Valere
91464a071e Merge pull request #1180 from vector-im/feature/complete_security_design_update
Feature/complete security design update
2020-03-26 14:31:09 +01:00
Valere
5244612ef6 Update shield logic for DM 2020-03-26 14:26:34 +01:00
Valere
e51439ade0 updage change log 2020-03-26 14:10:19 +01:00
Valere
acd90657c7 Fix / prevent cancel when in conclusion fragment 2020-03-26 14:09:41 +01:00
onurays
e5482d48c0 Remove deprecated & unused ImageTools class. 2020-03-26 16:02:50 +03:00
onurays
5816a04a37 Use MediaStore instead of deprecated addCompletedDownload since Android Q. 2020-03-26 15:58:31 +03:00
onurays
4b7da9ae6b Replace deprecated getExternalStoragePublicDirectory with getExternalFilesDir. 2020-03-26 15:57:21 +03:00
onurays
f7cbc01023 Replace deprecated PreferenceManager with androidx version. 2020-03-26 15:56:33 +03:00
Valere
1de57bbf3b Fix / cancel copy when verifying other 2020-03-26 13:49:48 +01:00
Valere
42a8c561db Fix / Verification was not cancelled on back in ready state 2020-03-26 13:49:48 +01:00
Valere
5bef9aef6a Fix / add specific copy for other verif cancel confirm 2020-03-26 13:49:48 +01:00
Valere
f8c1ec985f re-prompt to verify on restart 2020-03-26 13:49:48 +01:00
onurays
12429d8091 Merge develop into the branch. 2020-03-26 14:39:50 +03:00
Onuray Sahin
3bb5e127d6 Merge pull request #1155 from vector-im/feature/multipicker
Multiple attachment picker implementation
2020-03-26 14:30:02 +03:00
Valere
1d46b523b9 Merge pull request #1172 from vector-im/feature/ensure_olm_account_unicity
Feature/ensure olm account unicity
2020-03-26 12:11:09 +01:00
Valere
6721f337bd Merge branch 'develop' into feature/ensure_olm_account_unicity 2020-03-26 12:11:00 +01:00
Valere
535cdf0ef5 Merge pull request #1162 from vector-im/feature/xs_detect_new_session
Feature/xs detect new session
2020-03-26 12:06:18 +01:00
Valere
19990b27bb Code review 2020-03-26 10:52:02 +01:00
Valere
4b3c5d5135 update change log 2020-03-26 10:35:43 +01:00
Valere
b6fe80faf4 Fix / device key could be rotated
MXOlmDevice constructor access IMXStore before is open (dagger)
2020-03-26 10:35:43 +01:00
Valere
638970fa77 Merge pull request #1175 from vector-im/feature/fix_ssss_symetric_get_secret
Fixes #1174
2020-03-26 10:34:49 +01:00
onurays
c63f3edb06 Initial fixes to support targetSdk 29. 2020-03-26 12:06:50 +03:00
Valere
9a6fe1af4e Fixes #1174 2020-03-26 09:49:34 +01:00
onurays
a01482dca4 Use Timber log instead of printStackTrace. 2020-03-25 18:51:55 +03:00
onurays
5db1010e47 Catch exceptions if the file cannot be decoded. 2020-03-25 18:39:35 +03:00
onurays
6130a0a654 Remove unused toString(). 2020-03-25 18:34:04 +03:00
onurays
3c1e1090e7 Avoid UNCHECKED_CAST. 2020-03-25 18:20:34 +03:00
onurays
5cb47dae35 Return a failure message if the file cannot be opened. 2020-03-25 18:03:20 +03:00
onurays
f68e98b2c7 Do not resize video thumbnail. 2020-03-25 17:35:18 +03:00
Valere
420a55da76 klint 2020-03-25 13:53:06 +01:00
onurays
f9aed28732 grantUriPermission to handle incoming sharing. 2020-03-25 15:51:15 +03:00
Valere
e30c17eab7 Update Changes log 2020-03-24 18:09:54 +01:00
Valere
2c9a8865bf Cancel all on going to settings 2020-03-24 17:48:16 +01:00
Valere
bddd70afdb Fix / IllegalState after token invalidation 2020-03-24 17:48:01 +01:00
Valere
c4388348f7 Show cancelled screen instead of dismissing 2020-03-24 17:38:46 +01:00
Valere
ee7828a445 Code quality 2020-03-24 16:21:22 +01:00
Valere
37ac45c90a Fix / handling of back 2020-03-24 15:51:09 +01:00
Valere
63d3bf93f2 Fix / for now keep old toaster 2020-03-24 15:50:49 +01:00
Valere
2de8865730 Fix / Key Request recipients 2020-03-24 15:49:41 +01:00
Valere
fcffe1f3c3 Clear alert when device is verified 2020-03-24 15:21:03 +01:00
Valere
cfcec04029 code cleaning 2020-03-24 14:57:51 +01:00
Valere
b56a41bec7 Custom alert design 2020-03-24 14:56:57 +01:00
onurays
6bf89aeac9 Remove JPEG_ prefix from file name. 2020-03-24 12:37:37 +03:00
onurays
e583c03751 Add documentation. 2020-03-24 12:32:37 +03:00
onurays
d20b1cb64a Add documentation. 2020-03-24 12:15:14 +03:00
Valere
22642e71a3 cleaning 2020-03-24 10:06:36 +01:00
Valere
6e85b20b0e Update copy for riotX default device Name 2020-03-24 10:06:30 +01:00
Valere
fcd290410e Also cancel pending request on back 2020-03-24 10:06:15 +01:00
onurays
727d86236b ImageUtils created with helper functions. 2020-03-24 11:31:27 +03:00
onurays
2651f82337 Refactor duplicated code. 2020-03-24 11:03:41 +03:00
Valere
3b62402cfe Fix / ensure keys trust is updated before checking devices 2020-03-23 19:15:29 +01:00
Valere
6cc8d1b205 Fix / concurrent start broke QR verification 2020-03-23 18:43:52 +01:00
Valere
49e5fafb2d New sign in detection flow 2020-03-23 16:27:32 +01:00
Valere
e36367c040 Fix / sending secret encryption + refactoring 2020-03-23 16:27:17 +01:00
onurays
f7fd23b153 App integration to the new multipicker library. 2020-03-23 16:31:32 +03:00
Valere
4f70c40b1a Refactor + share secret window implementation 2020-03-23 11:13:33 +01:00
onurays
5b875e0571 CameraPicker & incoming share implementation. 2020-03-22 18:27:59 +03:00
onurays
6db0de321c Initial implementation of multipicker. 2020-03-20 12:12:59 +03:00
Valere
0c1f30208d Fix / Epoxy divider not showing 2020-03-19 11:23:15 +01:00
Valere
08cfe79625 Merge pull request #1153 from vector-im/feature/fix_841
Fixes #841
2020-03-18 14:50:56 +01:00
Valere
22a599633d Merge pull request #1152 from vector-im/feature/concurrent_start_verification
Verif / handle concurrent start
2020-03-18 14:50:33 +01:00
Valere
14acbb2b4d Update changes 2020-03-18 12:06:37 +01:00
Valere
6f5bebedf8 Fixes #841 2020-03-18 11:53:38 +01:00
Valere
6fe77eba72 code review 2020-03-18 11:25:49 +01:00
Valere
286a5081ff Verif / handle concurrent start
Fixes #794
2020-03-18 10:07:57 +01:00
Valere
56c241c9bd Merge pull request #1140 from vector-im/feature/gossiping_work
Feature/gossiping work
2020-03-17 15:48:11 +01:00
Valere
68151d838f Update changes 2020-03-17 15:10:27 +01:00
Valere
572b174cfe code quality 2020-03-17 14:42:55 +01:00
Valere
b71d8185a2 Fix / gossiping sent to soon results in not getting keys
Overall improovment of logs
2020-03-17 14:40:05 +01:00
Valere
8051d9e3be cleaning 2020-03-17 14:40:05 +01:00
Valere
1bf8fef292 Fix realm migration 2020-03-17 14:40:05 +01:00
Valere
b8a9397e73 hide reRequest behind developer mode 2020-03-17 14:40:05 +01:00
Valere
009d691d5b post merge fix 2020-03-17 14:40:05 +01:00
Valere
6933159245 Remove refresh menu 2020-03-17 14:40:05 +01:00
Valere
75549c41e0 View source in audit + clean 2020-03-17 14:40:05 +01:00
Valere
5e2f888eaf Request secret from mobile to web 2020-03-17 14:40:05 +01:00
Valere
d3d6d44665 Post rebase fix 2020-03-17 14:40:05 +01:00
Valere
fc6225a7ac Gossiping refactoring 2020-03-17 14:40:05 +01:00
Valere
3639007985 Cancel transaction if failed to decrypt other part events 2020-03-17 14:40:05 +01:00
Valere
d5137897c1 Fix / crash No JsonAdapter for GossipingToDeviceObject 2020-03-17 14:40:05 +01:00
Valere
b67735c31a Incoming Secret Share request support
crypto DB migration
2020-03-17 14:40:05 +01:00
Valere
8ff31ac49d cleaning klint 2020-03-17 14:40:05 +01:00
Valere
5e0235e48d Add option to recover from backup + hide if not applicable 2020-03-17 14:40:05 +01:00
Valere
9e63a3219c Add Re-Request keys for fail to decrypt 2020-03-17 14:40:05 +01:00
Valere
757e90986e Key Req Dev tool initial commit 2020-03-17 14:40:05 +01:00
Valere
06fc5c2dd9 Log tunning 2020-03-17 14:40:05 +01:00
Valere
20dbe2dd0d version ++ 2020-03-17 14:18:08 +01:00
Valere
367f793929 Merge branch 'release/0.18.1' 2020-03-17 11:46:55 +01:00
Valere
6f56c74e9d Merge branch 'release/0.18.1' into develop 2020-03-17 11:46:55 +01:00
Valere
78d90c8f04 prepare release 0.18.1 2020-03-17 11:46:42 +01:00
Valere
75fa2904d3 Merge pull request #1149 from vector-im/feature/quick_fix_backup_update_banner
QuickFix / key banner not clickable
2020-03-17 11:12:43 +01:00
Valere
a9ed55e6a2 Fixes #757 2020-03-17 10:50:34 +01:00
Valere
b37600f536 QuickFix / key banner not clickable 2020-03-17 10:43:48 +01:00
Valere
ef2783e9f4 Merge pull request #1142 from vector-im/feature/fix_upload_error
Fix / correctly update local echo failed state
2020-03-17 09:48:43 +01:00
Valere
8827b4b5ef Fix / correctly update local echo failed state
+ endure Workmanager queues are reset after a clear cache
2020-03-17 09:47:27 +01:00
Valere
7664b716b3 Merge pull request #1146 from vector-im/feature/workaround_crash_select_gif_keyboard
WorkAround / crash android 10 gif from keyboard
2020-03-17 09:20:49 +01:00
unclejay
a2367ef14f added network proxy configuration 2020-03-16 21:12:15 +01:00
Valere
067a22883c WorkAround / crash android 10 gif from keyboard
fixes #1136
2020-03-16 16:01:55 +01:00
Valere
eb74523905 Fix / typo 2020-03-16 15:30:41 +01:00
Valere
18d82b1bea Merge pull request #1138 from vector-im/feature/join_command
Implementation of /join command (#12)
2020-03-16 10:15:25 +01:00
Mathieu Velten
687884431e Refresh the whole notifs when cleaning one so the summary get updated
Fix summary notification staying after "mark as read"
2020-03-13 23:42:28 +01:00
Valere
3c9c2e61d7 missing change log entry 2020-03-13 17:19:00 +01:00
onurays
e3246a1f2c Rename JoinedToAnotherRoom to JoinRoomCommandSucces. 2020-03-13 18:41:04 +03:00
Valere
642651a069 Merge pull request #1133 from vector-im/feature/quick_fix_redecrypt_remote_echo
Fix Message transitions in encrypted rooms
2020-03-13 12:18:59 +01:00
onurays
85a987ca8d Fix typo. 2020-03-13 14:02:42 +03:00
onurays
5cb7e455b1 Implementation of /join command. 2020-03-13 14:00:46 +03:00
Valere
7c1428e097 preserver relations as non encrypted 2020-03-12 10:05:55 +01:00
Valere
32fd4c1be9 save decryption result at encryption 2020-03-11 19:39:40 +01:00
Valere
f53fc205e1 Fix Message transitions in encrypted rooms
Fixes #518
2020-03-11 18:07:18 +01:00
Valere
54eca7525e Version ++ 2020-03-11 16:24:49 +01:00
Valere
dec591517c Merge branch 'release/0.18.0' 2020-03-11 13:41:49 +01:00
Valere
005a11b765 Merge branch 'release/0.18.0' into develop 2020-03-11 13:41:48 +01:00
Valere
d5cbcdd4e7 prepare release 0.18.0 2020-03-11 13:41:17 +01:00
Valere
fe1af4e34f Merge pull request #1131 from vector-im/feature/fix_qr_self_verification
Fix / Self verification mode 1 was not working
2020-03-11 13:19:16 +01:00
Valere
49f2064439 Fix / Self verification mode 1 was not working 2020-03-11 11:43:23 +01:00
Valere
ff5b284b2e Try to remove rule that is breaking CI 2020-03-11 11:19:22 +01:00
Valere
d9085b1231 Merge pull request #1128 from vector-im/feature/remove_runblocking_crypto
Remove dangerous runBlocking (and un-needed)
2020-03-11 10:42:48 +01:00
Valere
a9074cdbbb Remove dangerous runBlocking (and un-nedded) 2020-03-10 17:25:04 +01:00
Benoit Marty
09946ecf1b Merge pull request #1117 from vector-im/feature/pusher_fix
Pusher fix
2020-03-10 11:34:11 +01:00
Benoit Marty
d21a536542 Merge pull request #1115 from vector-im/feature/work_manager_script
Add script to dumpsys work manager data
2020-03-06 17:31:19 +01:00
Benoit Marty
937d497a1f Revert the check box in case of error 2020-03-06 17:24:57 +01:00
Benoit Marty
4261b0e78a Fix pusher issue. It was set by mistake when the notification for this device was disabled 2020-03-06 17:19:48 +01:00
Benoit Marty
71446a1a74 Remove useless check 2020-03-06 17:11:23 +01:00
Benoit Marty
a29ec7b0be Pusher: add a menu to force a refresh of the local data 2020-03-06 16:48:48 +01:00
Benoit Marty
13036a5933 Pusher: update javadoc 2020-03-06 16:37:13 +01:00
Benoit Marty
a8e19f3cc9 Understanding things 2020-03-06 15:57:49 +01:00
Benoit Marty
cb4752812a Hide private key 2020-03-06 15:53:55 +01:00
Benoit Marty
ccd9d2961d Cleanup 2020-03-06 15:45:39 +01:00
Benoit Marty
d1db17f244 Add doc on workers 2020-03-06 15:45:26 +01:00
Benoit Marty
aa4327c4da Add doc and log error from the workers 2020-03-06 15:44:55 +01:00
Benoit Marty
35179509f2 Merge pull request #1111 from vector-im/feature/verification_code
Feature/verification code
2020-03-06 15:02:57 +01:00
Benoit Marty
5008524635 Add script to dumpsys work manager data 2020-03-06 14:52:09 +01:00
Benoit Marty
147766176c Merge pull request #1090 from vector-im/feature/notif
Restore the push rule settings
2020-03-06 14:43:33 +01:00
Benoit Marty
23862cb3d0 Merge branch 'develop' into feature/notif 2020-03-06 14:43:23 +01:00
Benoit Marty
2b8e2a312b Avoid use toImmutableList() 2020-03-06 14:39:33 +01:00
Benoit Marty
62fdb4c27a Use getOrPut() 2020-03-06 14:37:30 +01:00
Benoit Marty
b929a2f185 Merge pull request #1099 from vector-im/feature/fix_share_image
Share images from clear and encrypted rooms.
2020-03-06 14:27:47 +01:00
Benoit Marty
fb858bc112 Rename to respect naming convention #3 2020-03-06 14:04:02 +01:00
Benoit Marty
5d0e917f04 Rename to respect naming convention #2 2020-03-06 13:50:00 +01:00
Benoit Marty
e420070066 Rename to respect naming convention 2020-03-06 13:40:35 +01:00
Benoit Marty
4504308f25 Less "!!" 2020-03-06 13:34:12 +01:00
onurays
05683967c0 Code review fixes. 2020-03-06 12:07:38 +01:00
Benoit Marty
23c20acff1 Remove TODO 2020-03-06 10:11:30 +01:00
Benoit Marty
be5e6eaa93 Rename parameter type for code clarity 2020-03-06 10:10:16 +01:00
Onuray Sahin
555863fecc Merge pull request #1112 from vector-im/feature/navigate_to_profile_from_avatar
Open room member profile from avatar of the room member state event.
2020-03-06 09:42:32 +01:00
onurays
b187699a86 Open room member profile from avatar of the room member state event. 2020-03-05 18:44:34 +01:00
Benoit Marty
d891da39e6 Merge pull request #1104 from vector-im/feature/buildkite
Pipeline file for Buildkite is now hosted on another Github repository
2020-03-05 18:20:17 +01:00
Benoit Marty
f37cd8cddc Merge pull request #1110 from vector-im/feature/cleanup
Cleanup
2020-03-05 18:18:49 +01:00
Benoit Marty
2d456d93a7 Common code step 2 2020-03-05 18:16:05 +01:00
Benoit Marty
de36a28541 Common code step 1 2020-03-05 18:00:35 +01:00
Benoit Marty
4634b963a2 Code cleanup 2020-03-05 17:55:13 +01:00
Benoit Marty
b3f887ca28 Code quality 2020-03-05 17:30:34 +01:00
Benoit Marty
3425dd0a63 Make the tests compile and pass 2020-03-05 17:28:35 +01:00
Benoit Marty
2a774833ec More optimization 2020-03-05 17:11:52 +01:00
Benoit Marty
bda4bbb59c More optimization 2020-03-05 16:45:49 +01:00
Benoit Marty
0828f9270e Create asValidObject method - make it works 2020-03-05 16:23:56 +01:00
Benoit Marty
e326631752 Create asValidObject method - make it compiles #2 2020-03-05 15:39:01 +01:00
Benoit Marty
a3f8a53a52 Create asValidObject method - make it compiles. 2020-03-05 15:29:44 +01:00
Benoit Marty
7b5a50ec6e Create asValidObject method - not compiling 2020-03-05 12:06:19 +01:00
Benoit Marty
36c52d24a7 Move method to interface step 3 2020-03-05 11:24:35 +01:00
Benoit Marty
1b29c7bf91 Move method to interface step 2 2020-03-05 11:22:42 +01:00
Benoit Marty
b6aee04e24 Move method to interface step 1 2020-03-05 11:21:44 +01:00
Benoit Marty
a264dcf5c4 Lint: fix TextFields 2020-03-05 11:09:58 +01:00
Benoit Marty
37afc983c3 Fix typos. The typos has been fixed on Weblate by me. 2020-03-05 11:02:14 +01:00
Benoit Marty
b10e9c54b4 Add BinaryOperationInTimber lint rule and fix existing errors 2020-03-05 10:40:36 +01:00
onurays
03d2cd0639 Lint fix. 2020-03-04 17:57:57 +01:00
onurays
b7ad50a3ce Make mimeType private to encourage using getSafeMimeType() method. 2020-03-04 16:52:52 +01:00
onurays
9cbaadedfb Unused context parameter is removed. 2020-03-04 16:52:08 +01:00
Benoit Marty
d6cdcc60d1 Remove unused png files 2020-03-04 16:48:13 +01:00
Onuray Sahin
1680cd8d8e Merge branch 'develop' into feature/fix_share_image 2020-03-04 16:27:01 +01:00
onurays
d4384328fe Use "image/jpeg" instead of "image/jpg" 2020-03-04 16:26:09 +01:00
Benoit Marty
5fd8425289 Remove unused files 2020-03-04 16:09:37 +01:00
Benoit Marty
dcb618c257 Merge pull request #1103 from vector-im/feature/space_in_passwords
Detect spaces in password if user fails to login (#1038)
2020-03-04 14:12:20 +01:00
Benoit Marty
277ad9e042 Merge branch 'develop' into feature/space_in_passwords 2020-03-04 14:12:12 +01:00
onurays
26d387cc12 Support sharing other media types. 2020-03-04 13:47:48 +01:00
Benoit Marty
4aebe6d303 Disable TravisCI checks, now done by Buildkite 2020-03-04 12:23:25 +01:00
Benoit Marty
7eccda6e25 Pipeline file for Buildkite is now hosted on another Github repository
https://github.com/matrix-org/pipelines/blob/master/riotx-android/pipeline.yml
2020-03-04 12:20:09 +01:00
Benoit Marty
78bc2bbaa5 AndroidStudio cleanup 2020-03-04 12:15:33 +01:00
Benoit Marty
cde068f267 Merge pull request #1079 from vector-im/feature/ftue
FTUE: do not display a different color when encrypting message when not in developer mode.
2020-03-04 12:14:24 +01:00
Benoit Marty
c8f43e73e2 Merge branch 'develop' into feature/ftue 2020-03-04 12:14:07 +01:00
Benoit Marty
f106f92d7e Merge pull request #1085 from vector-im/feature/ktlint_upgrade
ktlint 0.36.0, Chromebook support, Camera for QR code scanning
2020-03-04 12:11:19 +01:00
Benoit Marty
fa0e07e146 Merge branch 'develop' into feature/ktlint_upgrade 2020-03-04 12:10:56 +01:00
Benoit Marty
d6df0e451c Detect spaces in password if user fail to login (#1038) 2020-03-04 10:39:10 +01:00
Benoit Marty
0121eee5b8 changelog 2020-03-04 09:37:32 +01:00
Benoit Marty
30e46445ca Add documentation to install environment and run integration tests (#1098)
Add documentation to install environment and run integration tests
2020-03-04 09:35:09 +01:00
onurays
7158554ee2 Add fallback logic only if the mode is thumbnail. 2020-03-03 16:56:22 +01:00
onurays
34c5537436 Fix fallback to full image. 2020-03-03 16:42:33 +01:00
onurays
d09ac8fbce Try to show full image as the fallback of the thumbnail. 2020-03-03 14:54:05 +01:00
onurays
319667096f Return Try.Failure instead of throwing exception. 2020-03-03 13:41:40 +01:00
onurays
c4f2eeeab7 Changelog added. 2020-03-03 10:40:58 +01:00
onurays
5f14516dec Share images from clear and encrypted rooms. 2020-03-03 10:39:24 +01:00
Benoit Marty
5ff670b184 Merge pull request #1093 from vector-im/feature/plain_text
Add support for `/plain` command (#12)
2020-03-02 19:37:05 +01:00
Benoit Marty
b7ff546f66 Add support for /plain command (#12) 2020-03-01 09:59:00 +01:00
Benoit Marty
c13b636bae Code cleanup 2020-02-29 10:05:48 +01:00
Benoit Marty
a05caf6f0e Update the 2 notification settings screens by moving some pref to the root notification screen 2020-02-29 09:49:21 +01:00
Benoit Marty
3462df405c Fix GPlay build issue 2020-02-29 09:42:35 +01:00
Benoit Marty
6009026e2f Notification settings: create a category for troubleshhot 2020-02-29 09:35:26 +01:00
Benoit Marty
06e0af9a5b small mistake 2020-02-28 22:12:30 +01:00
Benoit Marty
3987a68a9a Changelog 2020-02-28 22:10:07 +01:00
Benoit Marty
1228fcda0d Rename class 2020-02-28 19:25:29 +01:00
Benoit Marty
c20de4feb0 Cleanup 2020-02-28 19:13:22 +01:00
Benoit Marty
957b9eee23 Cleanup 2020-02-28 19:06:26 +01:00
Benoit Marty
e5eb36e917 Cleanup 2020-02-28 19:04:30 +01:00
Benoit Marty
551604cdcb Add missing push rules 2020-02-28 19:02:13 +01:00
Benoit Marty
8a2bafec5f Restore push rule settings - fix issues 2020-02-28 18:35:51 +01:00
Benoit Marty
3013e311a4 Restore push rule settings - WIP 2020-02-28 16:51:11 +01:00
Benoit Marty
1c35d07acc PushRuleService.getPushRules() now returns a RuleSet. Use getAllRules() on this object to get all the rules. 2020-02-28 16:29:58 +01:00
Benoit Marty
039924436f Json parsing 2020-02-28 14:51:35 +01:00
Benoit Marty
41b4f412c4 Merge pull request #1089 from vector-im/feature/crash_in_attachment_preview
Fix crash on attachment preview screen (#1088)
2020-02-28 14:49:36 +01:00
Benoit Marty
2abe29300b Merge pull request #1087 from vector-im/feature/verification_cleanup
Verification cleanup
2020-02-28 14:48:27 +01:00
Valere
779026b0af Fix / mark master key as trusted after self verif 2020-02-28 11:46:32 +01:00
Benoit Marty
151fec5ce0 Fix crash on attachment preview screen (#1088) 2020-02-28 11:38:30 +01:00
Benoit Marty
b1b8513da4 Create fromBase64Safe() to parse data received from external source 2020-02-27 19:17:14 +01:00
Benoit Marty
0a9008a73d Be robust if other client sends padded base64 in the reciprocate 2020-02-27 18:35:05 +01:00
Benoit Marty
1ead2778c2 ... and rename the method fromBase64NoPadding() to fromBase64() 2020-02-27 18:33:57 +01:00
Benoit Marty
8299487f6d Avoid using encoder flag to decode Base64 string... 2020-02-27 18:13:42 +01:00
Benoit Marty
ceab0903cf Improve code - TU passed 2020-02-27 18:09:37 +01:00
Benoit Marty
77dd911054 Code quality 2020-02-27 17:42:25 +01:00
Benoit Marty
a914381090 Verification with QrCode: ensure there is a Camera to scan QrCodes. 2020-02-27 17:03:48 +01:00
Benoit Marty
9f28738fd6 Restore availability to Chromebooks (#932) 2020-02-27 15:41:35 +01:00
Benoit Marty
36a848471f Enable other lint check (no change necessary in source) 2020-02-27 15:27:46 +01:00
Benoit Marty
12861aacda lint: check negative margin 2020-02-27 15:11:43 +01:00
Benoit Marty
d85776297d Lint: fix IconDuplicates by remove unused resources 2020-02-27 14:56:18 +01:00
Benoit Marty
50031bef50 Lint: fix IconDipSize and IconDuplicatesConfig error (by removing unused resource) 2020-02-27 14:45:26 +01:00
Benoit Marty
c0d6b9d130 Lint fix IconXmlAndPng error 2020-02-27 14:35:57 +01:00
Benoit Marty
a1466e299b Fix missing recycle call and ensure this mistake will not happen again 2020-02-27 14:30:49 +01:00
Benoit Marty
bc9493d5b9 Upgrade ktlint to version 0.36.0 2020-02-27 12:48:17 +01:00
Benoit Marty
9bb4c7ed25 Version++ 2020-02-27 12:34:33 +01:00
Benoit Marty
128f3493b7 Merge branch 'release/0.17.0' 2020-02-27 12:32:36 +01:00
Benoit Marty
65e5a04836 Merge branch 'release/0.17.0' into develop 2020-02-27 12:32:35 +01:00
Benoit Marty
495e4792b1 Prepare release 0.17.0 2020-02-27 12:32:03 +01:00
Benoit Marty
f906fc894b Sync Strings with Riot 2020-02-27 11:59:39 +01:00
Benoit Marty
6e060f63c6 Try to decode QrCode data in the debug Activity 2020-02-27 11:32:59 +01:00
Benoit Marty
9c7f5251b0 Merge pull request #1084 from vector-im/feature/room_key_share_crash
Fix crash after rework. RoomKeyShare is now an interface
2020-02-26 20:45:50 +01:00
Benoit Marty
a296234163 Fix crash after rework. RoomKeyShare is now an interface 2020-02-26 20:35:34 +01:00
Benoit Marty
a4d7b79e3c Merge pull request #1083 from vector-im/feature/last_fixies
Last fixes before release
2020-02-26 18:37:21 +01:00
Benoit Marty
3ac2296464 Disable freestyle crop, usability was not easy 2020-02-26 17:46:33 +01:00
Benoit Marty
b5a402c1e1 Fix crash when editing image 2020-02-26 17:45:39 +01:00
Benoit Marty
b8eeede5fd Safer code 2020-02-26 17:28:27 +01:00
Benoit Marty
d3e7e7e109 Make the small avatar also clickable and little change in the API to factorize code 2020-02-26 17:17:39 +01:00
Benoit Marty
a3af0be103 prevent wildcard for import 2020-02-26 17:01:38 +01:00
Benoit Marty
6349f9828d Optimize import 2020-02-26 16:59:20 +01:00
Benoit Marty
989d396c78 Rename package "sas" to "verification" 2020-02-26 16:52:16 +01:00
Benoit Marty
73ac7ab341 Compact code 2020-02-26 16:48:50 +01:00
Benoit Marty
a3133773a3 generic name for parameter 2020-02-26 16:45:12 +01:00
Benoit Marty
6e67d4749f Merge pull request #1082 from vector-im/feature/fix_rageshakes
Fix crashes reported by rageshakes
2020-02-26 16:10:47 +01:00
Benoit Marty
38c1ef3eb6 Fix lint issue 2020-02-26 16:08:34 +01:00
Benoit Marty
674450ef29 Merge pull request #1076 from vector-im/feature/fullscreen_avatar
Display avatar in fullscreen.
2020-02-26 16:06:13 +01:00
Benoit Marty
5e775298a7 Merge pull request #1081 from vector-im/feature/fix_redacted_event_format
Fix redacted event format on room overview.
2020-02-26 15:57:10 +01:00
onurays
93a687a172 Code review fixes. 2020-02-26 17:55:23 +03:00
Benoit Marty
4ba8a42977 Fix crash reported from rageshake 2020-02-26 15:32:52 +01:00
Benoit Marty
054d7668ef Fix crash reported from rageshake 2020-02-26 15:19:47 +01:00
Benoit Marty
a13fec84b0 Fix crash reported from rageshake 2020-02-26 15:00:25 +01:00
Benoit Marty
4bb3fb128f Fix crash reported from rageshake 2020-02-26 14:54:36 +01:00
onurays
04726a1ace Fix redacted event format on room overview.
Fixes #758
2020-02-26 16:51:01 +03:00
Benoit Marty
ccf72ffaa7 Fix crash reported from rageshake 2020-02-26 14:50:01 +01:00
Onuray Sahin
d2efe0e10c Merge branch 'develop' into feature/fullscreen_avatar 2020-02-26 16:23:02 +03:00
Benoit Marty
054b467caf Fix crash reported from rageshake 2020-02-26 14:18:48 +01:00
Benoit Marty
4280bc0780 Fix crash reported from rageshake 2020-02-26 14:10:51 +01:00
Benoit Marty
e1ea742023 Fix crash reported from rageshake 2020-02-26 13:59:58 +01:00
Benoit Marty
b7cf7e06a7 Merge pull request #1015 from vector-im/feature/new_signin_passphrase
Feature/new signin passphrase
2020-02-26 13:56:31 +01:00
onurays
536dce7929 Code review fixes. 2020-02-26 15:30:03 +03:00
onurays
56fc91a8c3 Code review fixes. 2020-02-26 15:26:53 +03:00
Benoit Marty
6622e0daca Code quality 2020-02-26 12:43:41 +01:00
Benoit Marty
f35b0660ca Rename constant for code readability 2020-02-26 12:37:36 +01:00
Valere
9d1718cda8 post merge clean 2020-02-26 12:20:03 +01:00
Valere
f7c128be3d Fix tests 2020-02-26 12:20:03 +01:00
Valere
c80fb52410 dead code 2020-02-26 12:20:03 +01:00
Valere
32389e1291 Remove wizard stuff 2020-02-26 12:20:03 +01:00
Valere
99f9a9817e Use human readable error (not technical) 2020-02-26 12:20:03 +01:00
Valere
b4a783198b code review 2020-02-26 12:20:03 +01:00
Valere
0cfc9451ca Cleaning 2020-02-26 12:20:03 +01:00
Valere
4b75baf772 Fix / trust was not properly updated after 4S restore 2020-02-26 12:20:03 +01:00
Valere
c579de1033 Fix / Test crash when crypto DB closed
Quick Work around
2020-02-26 12:20:03 +01:00
Valere
d537abc522 Fix / sign current device after entering xsigning passphrase 2020-02-26 12:20:03 +01:00
Valere
030f027516 Fixes #1051
XSigning | Self verification Empty bottomsheet
2020-02-26 12:20:03 +01:00
Valere
cbd7c1aa63 Fix / Bad ordering of active sessions 2020-02-26 12:20:03 +01:00
Valere
bdb1df75d4 Check trust on crypto thread 2020-02-26 12:20:03 +01:00
Valere
817dc19b9a Cleaning 2020-02-26 12:20:03 +01:00
Valere
f9be4fa2bd Fixes #1047 2020-02-26 12:20:03 +01:00
Valere
412aed6dcb Fix / Update title before return 2020-02-26 12:20:03 +01:00
Valere
9fc44c11de Fixes #937
Disabling bounds change animation, as it's messing with fragment change apparition and expanded state of bottomsheet
2020-02-26 12:20:03 +01:00
Valere
bf23094158 Fix / Green shield in conclusion title when verified from private keys 2020-02-26 12:20:03 +01:00
Valere
94d36e0c85 cleaning jni 2020-02-26 12:20:03 +01:00
Valere
0064934db9 Changed Encryption algorithm of 4S 2020-02-26 12:20:03 +01:00
Valere
e2e4ddf5ba Post rebase fix 2020-02-26 12:20:03 +01:00
Valere
9a08f5ec4e WIP / Verify from passphrase UX 2020-02-26 12:19:31 +01:00
Valere
cb669ad881 4S Activity WIP 2020-02-26 12:15:59 +01:00
Valere
3dc89c8d87 Update Self Verification BottomSheet for quads 2020-02-26 12:15:59 +01:00
Benoit Marty
cb73955946 Merge pull request #1050 from vector-im/feature/fix_some_perf
Feature/fix some perf
2020-02-26 12:02:36 +01:00
ganfra
bfe15555a1 Update changes 2020-02-26 11:51:05 +01:00
ganfra
bddeb6cb72 Clean files 2020-02-26 11:50:41 +01:00
ganfra
d57f6838e9 Remove decryption from room summary mapper and make TimelineEventDecryptor scoped to session 2020-02-26 11:50:41 +01:00
ganfra
cf8ffa3a7a Force trust task on crypto dispatcher to use cached realm from crypto store 2020-02-26 11:49:08 +01:00
Benoit Marty
a69049645a FTUE: do not display a different color when encrypting message when not in developer mode. 2020-02-26 11:25:37 +01:00
Benoit Marty
40b4db4a64 Merge pull request #1060 from vector-im/feature/data_class_cleanup
Data class cleanup
2020-02-26 10:57:10 +01:00
Benoit Marty
246b39786c Merge pull request #1073 from vector-im/feature/improve_api
Improve api of CreateRoomParams
2020-02-26 10:55:48 +01:00
onurays
1a273407de Display avatar in fullscreen. 2020-02-26 12:12:49 +03:00
Benoit Marty
633f9d8522 ktlint 2020-02-26 09:55:57 +01:00
Benoit Marty
076ac23b38 Modification done by AndroidStudio 3.6 2020-02-26 07:59:54 +01:00
Benoit Marty
67180fd8db New direct chat: selecting several participants was not adding the room to the direct chats list 2020-02-26 07:38:10 +01:00
Benoit Marty
fc95bf4926 Improve CreateRoomParams API: update some API for better chaining of builder like methods (#1070) 2020-02-26 07:32:22 +01:00
Benoit Marty
e73f138151 Improve CreateRoomParams API: update Javadoc and ensure the return values will not be discarded (#1070) 2020-02-26 07:17:25 +01:00
Benoit Marty
30432cd3f4 Merge pull request #1069 from vector-im/feature/fix_dm
Fix dm chips
2020-02-25 19:28:46 +01:00
Benoit Marty
1072060cbb New direct chat: selecting a participant sometimes results in two breadcrumbs (#1022) 2020-02-25 19:00:38 +01:00
Benoit Marty
a55e0f1af4 Fix crash - workaround 2020-02-25 18:17:40 +01:00
Benoit Marty
b95dfa4473 Create getBestName method for User 2020-02-25 18:14:02 +01:00
Benoit Marty
ec0cba2b23 Merge pull request #1067 from vector-im/feature/roomId
Display internal id of a room section in room profile
2020-02-25 12:22:14 +01:00
Benoit Marty
cfe9c4bb41 Display internal id of a room section in room profile, with copy to clipboard action, only in developer mode 2020-02-25 12:21:04 +01:00
Benoit Marty
68400cce03 Merge pull request #1049 from vector-im/feature/fix_invites
Feature/fix invites
2020-02-25 11:39:35 +01:00
Benoit Marty
17e028178e Code robustness (avoid using !!) 2020-02-25 11:20:11 +01:00
ganfra
19b9617a09 Invite: fix inviterId being overrided 2020-02-25 10:53:47 +01:00
Benoit Marty
08e4b4473c Disable manual rules now checked by ktlint 2020-02-25 09:57:12 +01:00
Benoit Marty
b9b921a4df Code quality 2020-02-25 09:53:17 +01:00
ganfra
483256093a Invite: fix room member not saved 2020-02-24 18:27:18 +01:00
Benoit Marty
d710a59554 Update change log 2020-02-24 17:44:51 +01:00
Benoit Marty
1023982858 Code readability 2020-02-24 17:40:28 +01:00
Benoit Marty
9c566b19f7 Ensure all eventId start with $, even ids for local echo 2020-02-24 17:35:43 +01:00
ganfra
b694721728 Update CHANGES 2020-02-24 17:33:40 +01:00
ganfra
8b0305c91d Clean code 2020-02-24 17:33:40 +01:00
ganfra
133d8d7f14 RoomList: fix joining/rejecting state 2020-02-24 17:33:40 +01:00
ganfra
9cdb1da614 Start fixing notif for invites 2020-02-24 17:33:40 +01:00
ganfra
981c9ac4ac Invite sync: assign eventId and remove the primaryKey constraint 2020-02-24 17:33:40 +01:00
Benoit Marty
3e8a0f7252 Merge pull request #1044 from vector-im/feature/fix_big_image_rotation
Use exif info of the image for correct rotation.
2020-02-24 17:30:33 +01:00
Benoit Marty
281620b88d Merge pull request #1048 from vector-im/feature/profile_share_actions
Share action is added to room profile and room member profile
2020-02-24 17:29:17 +01:00
Benoit Marty
c6b3b1e648 Fix bug on test 2020-02-24 17:27:04 +01:00
Benoit Marty
96af1957f9 Fix bug on progress step, found by integration test testBackupWithPassword() 2020-02-24 16:27:58 +01:00
Benoit Marty
b680e24938 Fix some tests 2020-02-24 16:16:37 +01:00
onurays
dec62a893e Code review fixes. 2020-02-24 18:06:59 +03:00
onurays
b3d4747d97 Code review fixes. 2020-02-24 17:35:57 +03:00
onurays
1124aa25fd Code review fixes. 2020-02-24 17:22:07 +03:00
Benoit Marty
b3c8b5526d Each session now have it's proper crypto store 2020-02-24 15:03:12 +01:00
Benoit Marty
1e44e77503 Make code robust to int received instead of boolean
https://github.com/matrix-org/synapse/issues/6977
2020-02-24 14:42:47 +01:00
Valere
964b611f4e Merge pull request #1053 from vector-im/feature/fix_712
Fixes #712
2020-02-24 14:07:35 +01:00
Valere
3e587af163 klint 2020-02-24 14:07:15 +01:00
Benoit Marty
b03b6bfc37 Fix crash discovered thanks to integration tests 2020-02-24 12:53:18 +01:00
Benoit Marty
1a6d4d0b03 Try to fix XSigningTest 2020-02-21 19:20:40 +01:00
Valere
c41661ece8 Fixes #712 2020-02-21 19:05:20 +01:00
Benoit Marty
1b763fb4c8 Cleanup XSigningTest 2020-02-21 18:52:36 +01:00
Benoit Marty
9ef267cb07 Cleanup after each test 2020-02-21 18:36:13 +01:00
Benoit Marty
d167ff9496 Make KeysBackup test pass (still work to do) 2020-02-21 17:58:04 +01:00
Benoit Marty
ccfa59ad31 Cleanup var -> val 2020-02-21 15:05:48 +01:00
onurays
f650e29ddd Share action is added to room profile and room member profile
Fixes #858
2020-02-21 15:30:01 +03:00
Onuray Sahin
1eefda18e4 Merge branch 'develop' into feature/fix_big_image_rotation 2020-02-21 13:13:02 +03:00
Benoit Marty
d6434654e2 Merge pull request #1043 from vector-im/feature/join_federation
Fix join room over federation
2020-02-21 10:08:05 +01:00
Benoit Marty
b6372df676 Merge pull request #1037 from vector-im/feature/crosssigning_qr
Migrate to binary QR code verification (#994)
2020-02-21 10:01:49 +01:00
Benoit Marty
d7de072155 typo 2020-02-21 09:58:56 +01:00
onurays
a11d70f173 Use exif info of the image for correct rotation. 2020-02-21 00:51:22 +03:00
Benoit Marty
a9909b37ba Update after Valere's review 2020-02-20 19:54:35 +01:00
Benoit Marty
3f9a5a4e54 Leaving a room creates a stuck "leaving room" loading screen. (#1041) 2020-02-20 19:31:33 +01:00
Benoit Marty
198e23c204 Second fix for #808 2020-02-20 19:23:32 +01:00
Benoit Marty
aefffc0c05 RoomPreviewNoPreviewFragment use room alias if there is no name 2020-02-20 19:19:31 +01:00
Benoit Marty
fd05fe36f5 Fix joining rooms from directory via federation isn't working. (#808) 2020-02-20 19:01:36 +01:00
Benoit Marty
b72698d63c Fix another issue when there is no name and no canonical alias on a public room 2020-02-20 18:47:07 +01:00
Benoit Marty
eec65fb622 Join room by roomId or room alias 2020-02-20 18:17:57 +01:00
Benoit Marty
87021dd6ec Rename field 2020-02-20 18:16:10 +01:00
Benoit Marty
b85c76b172 Simplify code 2020-02-20 18:05:53 +01:00
Benoit Marty
d867b1345f Format 2020-02-20 15:15:38 +01:00
Benoit Marty
80ef2192b9 Merge pull request #1036 from vector-im/feature/fix_key_restoring
Fix threading issues while restoring keys backup.
2020-02-20 15:13:13 +01:00
onurays
7d232527c8 Documentation of the API change is added. 2020-02-20 16:39:48 +03:00
Benoit Marty
e61d563589 Split long lines 2020-02-20 10:16:09 +01:00
Benoit Marty
74175ddfa0 Add a test and create extension for Byte to avoid using UByte (still experimental) 2020-02-20 10:12:07 +01:00
Benoit Marty
382fc6f05c Fix issue with long transactionId 2020-02-19 18:59:39 +01:00
Benoit Marty
932c478ed5 Change log 2020-02-19 18:11:23 +01:00
Benoit Marty
e81439d57b Remove v2 suffix 2020-02-19 18:09:33 +01:00
Benoit Marty
f81eb298cb Cleanup QRCode v1 2020-02-19 18:06:51 +01:00
Benoit Marty
859b9e4f8e Migrate to QrCode v2 - TODO: cleanup 2020-02-19 17:50:30 +01:00
Benoit Marty
e00d3ef63d QrCodeV2 WIP (al tests passing) 2020-02-19 17:34:07 +01:00
onurays
a97971dd84 Fix threading issues while restoring keys backup. 2020-02-19 18:30:12 +03:00
Benoit Marty
35b10daef1 Ensure RiotX is able to scan binary QrCodes 2020-02-19 14:26:45 +01:00
Benoit Marty
66a2958c39 Add unit test to check byte array to string conversion 2020-02-19 14:21:41 +01:00
Benoit Marty
571db7da55 Merge pull request #1035 from vector-im/feature/share_text
Fix share text to a single room issue
2020-02-19 10:08:29 +01:00
Benoit Marty
c6b231c0b1 Create toState() fun and use the enum 2020-02-18 14:12:50 +01:00
Benoit Marty
53410789c0 Cleanup 2020-02-18 14:12:50 +01:00
Benoit Marty
f8276e48e3 add kluent for test 2020-02-18 14:09:42 +01:00
Benoit Marty
86c38ebd2d Create Set.toggle() method 2020-02-18 13:33:49 +01:00
Benoit Marty
d730f96c41 Do not show alert when sharing text to a single room 2020-02-18 12:24:27 +01:00
Benoit Marty
7b3fcb7798 When sharing to a room save a draft to pre-fill the composer 2020-02-18 12:11:51 +01:00
Benoit Marty
26e8a60312 Merge pull request #1032 from vector-im/feature/crash
Fix crash in the room directory, when public room has no name (#1023)
2020-02-18 11:48:29 +01:00
Benoit Marty
7133d513b4 Fix crash in the room directory, when public room has no name (#1023) 2020-02-18 10:45:14 +01:00
Benoit Marty
8d1b2b35fd Merge pull request #1010 from vector-im/feature/attachment_process
Attachment process
2020-02-18 09:19:17 +01:00
Benoit Marty
b811bf9e7f Fix issue after merge 2020-02-17 23:21:08 +01:00
Benoit Marty
ebda12dd76 Merge branch 'develop' into feature/attachment_process 2020-02-17 19:22:50 +01:00
Benoit Marty
adc545a93d Merge pull request #1026 from vector-im/feature/crypto_service_renaming
Feature/crypto service renaming
2020-02-17 19:21:02 +01:00
Benoit Marty
fc740ae347 Merge pull request #1016 from vector-im/feature/cleanup_quadS
Cleanup quad s and AccountData service
2020-02-17 18:52:23 +01:00
Benoit Marty
67ed86fee5 Rename KeysBackup to DefaultKeysBackupService 2020-02-17 18:51:06 +01:00
Benoit Marty
f716e9d789 Fix compilation issue 2020-02-17 18:49:45 +01:00
Benoit Marty
141c7d6af0 Update comment 2020-02-17 18:43:04 +01:00
Benoit Marty
7495533edc Use let 2020-02-17 18:16:37 +01:00
Benoit Marty
f2f94c4a93 Reduce code duplication 2020-02-17 17:56:11 +01:00
Benoit Marty
4995c14f69 Add log 2020-02-17 17:46:15 +01:00
Benoit Marty
002e881704 Fix multiple share intent issue 2020-02-17 17:26:19 +01:00
Benoit Marty
51bbee297c Remove useless confirmation when shared data are previewables 2020-02-17 17:06:15 +01:00
Benoit Marty
82bd8a2e2a Ask for write permission before editing media 2020-02-17 16:29:10 +01:00
Benoit Marty
d67cd2cbef Small iteration on UI 2020-02-17 16:21:10 +01:00
ganfra
6d2025b61a Update CHANGES 2020-02-17 15:54:17 +01:00
ganfra
91cbcebf73 Make test compile 2020-02-17 15:50:42 +01:00
ganfra
fd0dceb597 Clean code 2020-02-17 15:23:24 +01:00
Benoit Marty
48a033b3bd Fix navigation issue when sharing text to multiple rooms 2020-02-17 14:58:20 +01:00
Benoit Marty
a3b205b310 No preview for elements sent from the keyboard 2020-02-17 14:48:12 +01:00
Benoit Marty
ca0cd9e97d Better code 2020-02-17 14:38:56 +01:00
Benoit Marty
31d5578063 Media preview: do not propose to edit Gif 2020-02-17 14:35:57 +01:00
Benoit Marty
b6f5e27155 Fix issue after merge of develop 2020-02-17 13:50:36 +01:00
Benoit Marty
13d3aa9ff1 Merge branch 'develop' into feature/attachment_process 2020-02-17 13:48:21 +01:00
Benoit Marty
629ecf786a Merge pull request #1024 from vector-im/feature/wording
Account creation: wrongly hints that an email can be used to create an account (#941)
2020-02-17 13:34:04 +01:00
Benoit Marty
ecf07ff64a Account creation: wrongly hints that an email can be used to create an account (#941) 2020-02-17 10:30:54 +01:00
ganfra
e349a35419 Crypto: expose cryptoService by a getter, removing the session implementation delegation 2020-02-16 15:40:31 +01:00
Benoit Marty
a61f508b5d Fix a nice bug 2020-02-14 22:00:36 +01:00
Benoit Marty
76085a4284 AccountData cleanup and Javadoc 2020-02-14 21:50:37 +01:00
Benoit Marty
446d826dd3 Create tag interface AccountDataContent 2020-02-14 20:53:45 +01:00
Benoit Marty
2d6f57e214 More cleanup/code lisibility 2020-02-14 20:50:21 +01:00
Ganard
a305ce302e Coroutine sequencer: use semaphore 2020-02-14 19:37:51 +01:00
Benoit Marty
7ddea99fc6 Move and improve withOlmDecryption() and withOlmEncryption() 2020-02-14 18:51:27 +01:00
Benoit Marty
4c3b754de4 Use const from DefaultSharedSecretStorageService 2020-02-14 18:33:15 +01:00
Benoit Marty
7878da25b8 Use doSync<>() to reduce boilerplate and add test checks
and more cleanup
2020-02-14 18:18:20 +01:00
Benoit Marty
01597a89dc Avoid code duplication 2020-02-14 17:53:27 +01:00
Valere
b04ee7153a Merge pull request #995 from vector-im/feature/4s_msc1946
Feature/4s msc1946
2020-02-14 17:49:16 +01:00
Benoit Marty
db19ab0531 Merge branch 'develop' into feature/4s_msc1946 2020-02-14 17:45:44 +01:00
Benoit Marty
cad818c341 ktlint 2020-02-14 17:05:14 +01:00
Benoit Marty
1660a0f846 Version++ 2020-02-14 15:16:00 +01:00
Benoit Marty
4987a75039 Merge branch 'release/0.16.0' into develop 2020-02-14 15:14:54 +01:00
Valere
35835be03e klint 2020-02-14 12:06:07 +01:00
Valere
f99eca8014 Code review 2020-02-14 10:48:18 +01:00
Valere
e0eede1150 cleaning 2020-02-14 10:48:18 +01:00
Valere
64647cb465 Fix / Save account data after update (local echo) 2020-02-14 10:48:18 +01:00
Valere
def01cca8f Fix test + changes 2020-02-14 10:48:18 +01:00
Valere
61ea4191dc Update json viewer lib 2020-02-14 10:48:18 +01:00
Valere
108ebea84e SSSS service + test 2020-02-14 10:48:18 +01:00
Valere
bf06b57bad Refactor Account Data
Auto stash before rebase of "develop"
2020-02-14 10:48:18 +01:00
Benoit Marty
2c2bf61727 Update Changelog 2020-02-14 09:40:07 +01:00
Benoit Marty
6c0bddc893 Code quality 2020-02-13 23:20:35 +01:00
Benoit Marty
930d62c87b Restore Breadcrumbs comparator, we can maybe improve this later 2020-02-13 23:00:03 +01:00
Benoit Marty
b66b96899e Better Kotlin code 2020-02-13 22:56:11 +01:00
Benoit Marty
e6bd09859f Compress image before sending 2020-02-13 22:50:55 +01:00
Benoit Marty
385fa317c0 Add a green frame around current small preview 2020-02-13 20:45:03 +01:00
Benoit Marty
ecd547b86c Auto close the room picker and open the first room when data are shared in case of multi selection 2020-02-13 20:10:59 +01:00
Benoit Marty
d87b951403 Improve code 2020-02-13 20:10:59 +01:00
Benoit Marty
06ba478232 Send files to several rooms at a time 2020-02-13 20:10:59 +01:00
Benoit Marty
81de914360 Propose to edit media before sending, when coming form another application 2020-02-13 20:10:59 +01:00
Benoit Marty
b7ec495d6b Add comment 2020-02-13 19:52:11 +01:00
Benoit Marty
a8953568f3 Set custom colors 2020-02-13 19:52:11 +01:00
Benoit Marty
41b20863fb Mention uCrop library copyright 2020-02-13 19:52:11 +01:00
Benoit Marty
94340a49d7 Ask for permission 2020-02-13 19:52:11 +01:00
Benoit Marty
c67fd508e7 Cleanup 2020-02-13 19:52:11 +01:00
Ganard
eccc52fe13 Sharing: start extracting from RoomList as it's getting messy 2020-02-13 19:52:11 +01:00
Ganard
b7a7aa2f15 Attachment: continue working on preview screen 2020-02-13 19:52:11 +01:00
ganfra
6471787232 Share: start managing multi selection and warning 2020-02-13 19:52:11 +01:00
ganfra
41f1ec5d88 Attachments: preview with pager mode 2020-02-13 19:51:20 +01:00
Ganard
a26e959430 Attachements: introduce structure for preview, cropping and compressing 2020-02-13 19:51:20 +01:00
3770 changed files with 180377 additions and 82196 deletions

View File

@@ -1,95 +0,0 @@
# Use Docker file from https://hub.docker.com/r/runmymind/docker-android-sdk
# Last docker plugin version can be found here:
# https://github.com/buildkite-plugins/docker-buildkite-plugin/releases
# We propagate the environment to the container (sse https://github.com/buildkite-plugins/docker-buildkite-plugin#propagate-environment-optional-boolean)
steps:
- label: "Compile and run Unit tests"
agents:
# We use a medium sized instance instead of the normal small ones because
# gradle build can be memory hungry
queue: "medium"
commands:
- "./gradlew clean test --stacktrace"
plugins:
- docker#v3.1.0:
image: "runmymind/docker-android-sdk"
propagate-environment: true
- label: "Compile Android tests"
agents:
# We use a medium sized instance instead of the normal small ones because
# gradle build can be memory hungry
queue: "medium"
commands:
- "./gradlew clean assembleAndroidTest --stacktrace"
plugins:
- docker#v3.1.0:
image: "runmymind/docker-android-sdk"
propagate-environment: true
- label: "Assemble GPlay Debug version"
agents:
# We use a xlarge sized instance instead of the normal small ones because
# gradle build can be memory hungry
queue: "xlarge"
commands:
- "./gradlew clean lintGplayRelease assembleGplayDebug --stacktrace"
artifact_paths:
- "vector/build/outputs/apk/gplay/debug/*.apk"
branches: "!master"
plugins:
- docker#v3.1.0:
image: "runmymind/docker-android-sdk"
propagate-environment: true
- label: "Assemble FDroid Debug version"
agents:
# We use a xlarge sized instance instead of the normal small ones because
# gradle build can be memory hungry
queue: "xlarge"
commands:
- "./gradlew clean lintFdroidRelease assembleFdroidDebug --stacktrace"
artifact_paths:
- "vector/build/outputs/apk/fdroid/debug/*.apk"
branches: "!master"
plugins:
- docker#v3.1.0:
image: "runmymind/docker-android-sdk"
propagate-environment: true
- label: "Build Google Play unsigned APK"
agents:
# We use a xlarge sized instance instead of the normal small ones because
# gradle build can be memory hungry
queue: "xlarge"
commands:
- "./gradlew clean assembleGplayRelease --stacktrace"
artifact_paths:
- "vector/build/outputs/apk/gplay/release/*.apk"
branches: "master"
plugins:
- docker#v3.1.0:
image: "runmymind/docker-android-sdk"
propagate-environment: true
# Code quality
- label: "Code quality"
command:
- "./tools/check/check_code_quality.sh"
- label: "ktlint"
command:
- "curl -sSLO https://github.com/pinterest/ktlint/releases/download/0.34.2/ktlint && chmod a+x ktlint"
- "./ktlint --android --experimental -v"
plugins:
- docker#v3.1.0:
image: "openjdk"
# Check that indonesians files are identical.
# Due to Android issue, the resource folder must be values-in/, and Weblate export data into values-id/.
# If this step fails, it means that Weblate has updated the file in value-id/ so to fix it, copy the file to values-in/
- label: "Indonesian"
command:
- "diff ./vector/src/main/res/values-id/strings.xml ./vector/src/main/res/values-in/strings.xml"

View File

@@ -12,7 +12,7 @@ max_line_length=off
# Comma-separated list of rules to disable (Since 0.34.0)
# Note that rules in any ruleset other than the standard ruleset will need to be prefixed
# by the ruleset identifier.
disabled_rules=no-wildcard-imports,no-multi-spaces,colon-spacing,chain-wrapping,import-ordering,experimental:annotation
disabled_rules=no-multi-spaces,colon-spacing,chain-wrapping,import-ordering,experimental:annotation
# The following (so far identified) rules are kept:
# no-blank-line-before-rbrace
@@ -30,3 +30,4 @@ disabled_rules=no-wildcard-imports,no-multi-spaces,colon-spacing,chain-wrapping,
# no-empty-class-body
# experimental:multiline-if-else
# experimental:no-empty-first-line-in-method-block
# no-wildcard-imports

34
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,34 @@
---
name: Bug report
about: Create a report to help us improve Element
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Smartphone (please complete the following information):**
- Device: [e.g. Samsung S6]
- OS: [e.g. Android 6.0]
**Additional context**
- App version and store [e.g. 1.0.0 - F-Droid]
- Homeserver: [e.g. matrix.org]
Add any other context about the problem here.

View File

@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: type:suggestion
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

10
.github/ISSUE_TEMPLATE/matrix-sdk.md vendored Normal file
View File

@@ -0,0 +1,10 @@
---
name: Matrix SDK
about: Report issue or ask for a feature regarding the Android Matrix SDK
title: "[SDK] "
labels: matrix-sdk
assignees: ''
---
<!-- This issue template should be used by third party application maintainers, to report a bug or to request a feature on the SDK module of the application Element Android-->

View File

@@ -1,10 +1,10 @@
### Pull Request Checklist
<!-- Please read [CONTRIBUTING.md](https://github.com/vector-im/riotX-android/blob/develop/CONTRIBUTING.md) before submitting your pull request -->
<!-- Please read [CONTRIBUTING.md](https://github.com/vector-im/element-android/blob/develop/CONTRIBUTING.md) before submitting your pull request -->
- [ ] Changes has been tested on an Android device or Android emulator with API 16
- [ ] Changes has been tested on an Android device or Android emulator with API 21
- [ ] UI change has been tested on both light and dark themes
- [ ] Pull request is based on the develop branch
- [ ] Pull request updates [CHANGES.md](https://github.com/vector-im/riotX-android/blob/develop/CHANGES.md)
- [ ] Pull request updates [CHANGES.md](https://github.com/vector-im/element-android/blob/develop/CHANGES.md)
- [ ] Pull request includes screenshots or videos if containing UI changes
- [ ] Pull request includes a [sign off](https://github.com/matrix-org/synapse/blob/master/CONTRIBUTING.md#sign-off)

View File

@@ -0,0 +1,10 @@
name: "Validate Gradle Wrapper"
on: [push, pull_request]
jobs:
validation:
name: "Validation"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: gradle/wrapper-validation-action@v1

View File

@@ -0,0 +1,18 @@
name: Update Gradle Wrapper
on:
schedule:
- cron: "0 0 * * *"
jobs:
update-gradle-wrapper:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Update Gradle Wrapper
uses: gradle-update/update-gradle-wrapper-action@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
target-branch: develop

View File

@@ -1,13 +1,19 @@
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<option name="RIGHT_MARGIN" value="160" />
<AndroidXmlCodeStyleSettings>
<option name="ARRANGEMENT_SETTINGS_MIGRATED_TO_191" value="true" />
</AndroidXmlCodeStyleSettings>
<JetCodeStyleSettings>
<option name="PACKAGES_TO_USE_STAR_IMPORTS">
<value>
<package name="kotlinx.android.synthetic" withSubpackages="true" static="false" />
<package name="kotlinx.android.synthetic" alias="false" withSubpackages="true" />
</value>
</option>
<option name="PACKAGES_IMPORT_LAYOUT">
<value>
<package name="" alias="false" withSubpackages="true" />
<package name="java" alias="false" withSubpackages="true" />
<package name="javax" alias="false" withSubpackages="true" />
<package name="kotlin" alias="false" withSubpackages="true" />
<package name="" alias="true" withSubpackages="true" />
</value>
</option>
<option name="ALIGN_IN_COLUMNS_CASE_BRANCH" value="true" />

View File

@@ -7,22 +7,30 @@
<w>ciphertext</w>
<w>coroutine</w>
<w>decryptor</w>
<w>displayname</w>
<w>emoji</w>
<w>emojis</w>
<w>fdroid</w>
<w>gplay</w>
<w>hmac</w>
<w>homeserver</w>
<w>jitsi</w>
<w>ktlint</w>
<w>linkified</w>
<w>linkify</w>
<w>megolm</w>
<w>msisdn</w>
<w>msisdns</w>
<w>pbkdf</w>
<w>pids</w>
<w>pkcs</w>
<w>riotx</w>
<w>signin</w>
<w>signout</w>
<w>signup</w>
<w>ssss</w>
<w>threepid</w>
<w>unwedging</w>
</words>
</dictionary>
</component>

View File

@@ -23,10 +23,10 @@ android:
- platform-tools
# The BuildTools version used by your project
- build-tools-28.0.3
- build-tools-29.0.3
# The SDK version used to compile your project
- android-28
- android-29
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
@@ -49,12 +49,12 @@ script:
# Build Android test (assembleAndroidTest) (disabled for now)
# Code quality (lintGplayRelease lintFdroidRelease)
# Split into two steps because if a task contain Fdroid, PlayService will be disabled
- ./gradlew clean assembleGplayRelease lintGplayRelease --stacktrace
- ./gradlew clean assembleFdroidRelease lintFdroidRelease --stacktrace
# Done by Buildkite now: - ./gradlew clean assembleGplayRelease lintGplayRelease --stacktrace
# Done by Buildkite now: - ./gradlew clean assembleFdroidRelease lintFdroidRelease --stacktrace
# Run unitary test (Disable for now, see https://travis-ci.org/vector-im/riot-android/builds/502504370)
# - ./gradlew testGplayReleaseUnitTest --stacktrace
# Other code quality check
- ./tools/check/check_code_quality.sh
# Done by Buildkite now: - ./tools/check/check_code_quality.sh
- ./tools/travis/check_pr.sh
# Check that indonesians file are identical. Due to Android issue, the resource folder must be value-in/, and Weblate export data into value-id/.
- diff ./vector/src/main/res/values-id/strings.xml ./vector/src/main/res/values-in/strings.xml
# Done by Buildkite now: - diff ./vector/src/main/res/values-id/strings.xml ./vector/src/main/res/values-in/strings.xml

View File

@@ -1,4 +1,4 @@
A full developer contributors list can be found [here](https://github.com/vector-im/riotX-android/graphs/contributors).
A full developer contributors list can be found [here](https://github.com/vector-im/element-android/graphs/contributors).
# Core team:
@@ -28,8 +28,8 @@ Even if we try to be able to work on all the functionalities, we have more knowl
# Other contributors
First of all, we thank all contributors who use RiotX and report problems on this GitHub project or via the integrated rageshake function.
First of all, we thank all contributors who use Element and report problems on this GitHub project or via the integrated rageshake function.
We do not forget all translators, for their work of translating RiotX into many languages. They are also the authors of RiotX.
We do not forget all translators, for their work of translating Element into many languages. They are also the authors of Element.
Feel free to add your name below, when you contribute to the project!

View File

@@ -1,3 +1,560 @@
Changes in Element 1.0.9 (2020-XX-XX)
===================================================
Features ✨:
- Hide encrypted history (before user is invited). Can be shown if wanted in developer settings
Improvements 🙌:
- Wording differentiation for direct rooms (#2176)
- PIN code: request PIN code if phone has been locked
- Small optimisation of scrolling experience in timeline (#2114)
- Allow user to reset cross signing if he has no way to recover (#2052)
Bugfix 🐛:
- Improve support for image/audio/video/file selection with intent changes (#1376)
- Fix Splash layout on small screens
Translations 🗣:
-
SDK API changes ⚠️:
-
Build 🧱:
- Use Update Gradle Wrapper Action
- Updates Gradle Wrapper from 5.6.4 to 6.6.1. (#2193)
Other changes:
- Added registration/verification automated UI tests
- Create a script to help getting public information form any homeserver
Changes in Element 1.0.8 (2020-09-25)
===================================================
Improvements 🙌:
- Add "show password" in import Megolm keys dialog
- Visually disable call buttons in menu and prohibit calling when permissions are insufficient (#2112)
- Better management of requested permissions (#2048)
- Add a setting to show timestamp for all messages (#2123)
- Use cache for user color
- Allow using an outdated homeserver, at user's risk (#1972)
- Restore small logo on login screens and fix scrolling issue on those screens
- PIN Code Improvements: Add more settings: biometrics, grace period, notification content (#1985)
Bugfix 🐛:
- Long message cannot be sent/takes infinite time & blocks other messages (#1397)
- Fix crash when wellknown are malformed, or redirect to some HTML content (reported by rageshakes)
- User Verification in DM not working
- Manual import of Megolm keys does back up the imported keys
- Auto scrolling to the latest message when sending (#2094)
- Fix incorrect permission check when creating widgets (#2137)
- Pin code: user has to enter pin code twice (#2005)
SDK API changes ⚠️:
- Rename `tryThis` to `tryOrNull`
Other changes:
- Add an advanced action to reset an account data entry
Changes in Element 1.0.7 (2020-09-17)
===================================================
Improvements 🙌:
- Handle date formatting properly (show time am/pm if needed, display year when needed)
- Improve F-Droid Notification (#2055)
Bugfix 🐛:
- Clear the notification when the event is read elsewhere (#1822)
- Speakerphone is not used for ringback tone (#1644, #1645)
- Back camera preview is not mirrored anymore (#1776)
- Various report of people that cannot play video (#2107)
- Rooms incorrectly marked as unread (#588)
- Allow users to show/hide room member state events (#1231)
- Fix stuck on loader when launching home
SDK API changes ⚠️:
- Create a new RawService to get plain data from the server.
Other changes:
- Performance: share Realm instance used on UI thread and improve SharedPreferences reading time.
Changes in Element 1.0.6 (2020-09-08)
===================================================
Features ✨:
- List phone numbers and emails added to the Matrix account, and add emails and phone numbers to account (#44, #45)
Improvements 🙌:
- You can now join room through permalink and within room directory search
- Add long click gesture to copy userId, user display name, room name, room topic and room alias (#1774)
- Fix several issues when uploading big files (#1889)
- Do not propose to verify session if there is only one session and 4S is not configured (#1901)
- Call screen does not use proximity sensor (#1735)
Bugfix 🐛:
- Display name not shown under Settings/General (#1926)
- Editing message forgets line breaks and markdown (#1939)
- Words containing my name should not trigger notifications (#1781)
- Fix changing language issue
- Fix FontSize issue (#1483, #1787)
- Fix bad color for settings icon on Android < 24 (#1786)
- Change user or room avatar: when selecting Gallery, I'm not proposed to crop the selected image (#1590)
- Loudspeaker is always used (#1685)
- Fix uploads still don't work with room v6 (#1879)
- Can't handle ongoing call events in background (#1992)
- Handle room, user and group links by the Element app (#1795)
- Update associated site domain (#1833)
- Crash / Attachment viewer: Cannot draw a recycled Bitmap #2034
- Login with Matrix-Id | Autodiscovery fails if identity server is invalid and Homeserver ok (#2027)
- Support for image compression on Android 10
- Verification popup won't show
- Android 6: App crash when read Contact permission is granted (#2064)
- JSON for verification events leaks in to the room list (#1246)
- Replies to poll appears in timeline as unsupported events during sending (#1004)
Translations 🗣:
- The SDK is now using SAS string translations from [Weblate Matrix-doc project](https://translate.riot.im/projects/matrix-doc/) (#1909)
- New translation to kabyle
Build 🧱:
- Some dependencies have been upgraded (coroutine, recyclerView, appCompat, core-ktx, firebase-messaging)
- Buildkite:
New pipeline location: https://github.com/matrix-org/pipelines/blob/master/element-android/pipeline.yml
New build location: https://buildkite.com/matrix-dot-org/element-android
Other changes:
- Use File extension functions to make code more concise (#1996)
- Create a script to import SAS strings (#1909)
- Support `data-mx-[bg-]color` attributes on `<font>` tags.
Changes in Element 1.0.5 (2020-08-21)
===================================================
Features :
- Protect access to the app by a pin code (#1700)
- Conference with Jitsi support (#43)
Improvements 🙌:
- Share button in rooms gives room ID link without via parameters (#1927)
- Give user the possibility to prevent accidental call (#1869)
- Display device information (name, id and key) in Cryptography setting screen (#1784)
- Ensure users do not accidentally ignore other users (#1890)
- Better handling DM creation when invitees cannot be inviting due to denied federation
- Support new config.json format and config.domain.json files (#1682)
- Increase Font size on Calling screen (#1643)
- Make the user's Avatar live in the general settings
Bugfix 🐛:
- Fix incorrect date format for some Asian languages (#1928)
- Fix invisible toolbar (Status.im theme) (#1746)
- Fix relative date time formatting (#822)
- Fix crash reported by RageShake
- Fix refreshing of sessions list when another session is logged out
- Fix IllegalArgumentException: Receiver not registered: NetworkInfoReceiver (#1960)
- Failed to build unique file (#1954)
- Highlighted Event when opening a permalink from another room (#1033)
- A Kick appears has "someone has made no change" (#1959)
- Avoid NetworkOnMainThreadException when setting a user avatar
- Renew turnserver credentials when ttl runs out
Translations 🗣:
- Add PlayStore description resources in the Triple-T format, to let Weblate handle them
SDK API changes :
- Rename package `im.vector.matrix.android` to `org.matrix.android.sdk`
- Rename package `im.vector.matrix.rx` to `org.matrix.android.sdk.rx`
Build 🧱:
- Fix RtlHardcoded issues (use `Start` and `End` instead of `Left` and `Right` layout attributes)
Other changes:
- Use `Context#getSystemService` extension function provided by `core-ktx` (#1702)
- Hide Flair settings, this is not implemented yet.
- Rename package `im.vector.riotx.attachmentviewer` to `im.vector.lib.attachmentviewer`
- Rename package `im.vector.riotx.multipicker` to `im.vector.lib.multipicker`
- Rename package `im.vector.riotx` to `im.vector.app`
- Remove old code that was used on devices with api level <21
- Add Official Gradle Wrapper Validation Action
Changes in Element 1.0.4 (2020-08-03)
===================================================
Bugfix 🐛:
- Fix Crash when opening invite to room user screen
Changes in Element 1.0.3 (2020-07-31)
===================================================
Features :
- Support server admin option to disable E2EE for DMs / private rooms [users can still enable] (#1794)
Bugfix 🐛:
- Crash reported on playstore for HomeActivity launch (151 reports)
Changes in Element 1.0.2 (2020-07-29)
===================================================
Improvements 🙌:
- Added Session Database migration to avoid unneeded initial syncs
Changes in Element 1.0.1 (2020-07-28)
===================================================
Improvements 🙌:
- Sending events is now retried only 3 times, so we avoid blocking the sending queue too long.
- Display warning when fail to send events in room list
- Improve UI of edit role action in member profile
- Moderation | New screen to display list of banned users in room settings, with unban action
Bugfix 🐛:
- Fix theme issue on Room directory screen (#1613)
- Fix notification not dismissing when entering a room
- Fix uploads don't work with Room v6 (#1558)
- Fix Requesting avatar thumbnails in Element uses wrong http "user-agent" string (#1725)
- Fix 404 on EMS (#1761)
- Fix Infinite loop at startup when migrating account from Riot (#1699)
- Fix Element crashes in loop after initial sync (#1709)
- Remove inner mx-reply tags before replying
- Fix timeline items not loading when there are only filtered events
- Fix "Voice & Video" grayed out in Settings (#1733)
- Fix Allow VOIP call in all rooms with 2 participants (even if not DM)
- Migration from old client does not enable notifications (#1723)
Other changes:
- i18n deactivated account error
Changes in Element 1.0.0 (2020-07-15)
===================================================
Features :
- Re-branding: The app is now called Element. New name, new themes, new icons, etc. More details here: https://element.io/blog/welcome-to-element/ (#1691)
Bugfix 🐛:
- Video calls are shown as a voice ones in the timeline (#1676)
- Fix regression: not able to create a room without IS configured (#1679)
Changes in Riot.imX 0.91.5 (2020-07-11)
===================================================
Features :
- 3pid invite: it is now possible to invite people by email. An Identity Server has to be configured (#548)
Improvements 🙌:
- Cleaning chunks with lots of events as long as a threshold has been exceeded (35_000 events in DB) (#1634)
- Creating and listening to EventInsertEntity. (#1634)
- Handling (almost) properly the groups fetching (#1634)
- Improve fullscreen media display (#327)
- Setup server recovery banner (#1648)
- Set up SSSS from security settings (#1567)
- New lab setting to add 'unread notifications' tab to main screen
- Render third party invite event (#548)
- Display three pid invites in the room members list (#548)
Bugfix 🐛:
- Integration Manager: Wrong URL to review terms if URL in config contains path (#1606)
- Regression Composer does not grow, crops out text (#1650)
- Bug / Unwanted draft (#698)
- All users seems to be able to see the enable encryption option in room settings (#1341)
- Leave room only leaves the current version (#1656)
- Regression | Share action menu do not work (#1647)
- verification issues on transition (#1555)
- Fix issue when restoring keys backup using recovery key
SDK API changes :
- CreateRoomParams has been updated
Build 🧱:
- Upgrade some dependencies
- Revert to build-tools 3.5.3
Other changes:
- Use Intent.ACTION_CREATE_DOCUMENT to save megolm key or recovery key in a txt file
- Use `Context#withStyledAttributes` extension function (#1546)
Changes in Riot.imX 0.91.4 (2020-07-06)
===================================================
Features :
- Re-activate Wellknown support with updated UI (#1614)
Improvements 🙌:
- Upload device keys only once to the homeserver and fix crash when no network (#1629)
Bugfix 🐛:
- Fix crash when coming from a notification (#1601)
- Fix Exception when importing keys (#1576)
- File isn't downloaded when another file with the same name already exists (#1578)
- saved images don't show up in gallery (#1324)
- Fix reply fallback leaking sender locale (#429)
Build 🧱:
- Fix lint false-positive about WorkManager (#1012)
- Upgrade build-tools from 3.5.3 to 3.6.3
- Upgrade gradle from 5.4.1 to 5.6.4
Changes in Riot.imX 0.91.3 (2020-07-01)
===================================================
Notes:
- This version is the third beta version of RiotX codebase published as Riot-Android on the PlayStore.
- Changelog below includes changes of v0.91.0, v0.91.1, and v0.91.2, because the first beta versions have been tagged and
published from the branch feature/migration_from_legacy.
- This version uses temporary name `Riot.imX`, to distinguish the app with RiotX app.
Features :
- Call with WebRTC support (##611)
- Add capability to change the display name (#1529)
Improvements 🙌:
- "Add Matrix app" menu is now always visible (#1495)
- Handle `/op`, `/deop`, and `/nick` commands (#12)
- Prioritising Recovery key over Recovery passphrase (#1463)
- Room Settings: Name, Topic, Photo, Aliases, History Visibility (#1455)
- Update user avatar (#1054)
- Allow self-signed certificate (#1564)
- Improve file download and open in timeline
- Catchup tab is removed temporarily (#1565)
- Render room avatar change (#1319)
Bugfix 🐛:
- Fix dark theme issue on login screen (#1097)
- Incomplete predicate in RealmCryptoStore#getOutgoingRoomKeyRequest (#1519)
- User could not redact message that they have sent (#1543)
- Use vendor prefix for non merged MSC (#1537)
- Compress images before sending (#1333)
- Searching by displayname is case sensitive (#1468)
- Fix layout overlap issue (#1407)
Build 🧱:
- Enable code optimization (Proguard)
- SDK is now API level 21 minimum, and so RiotX (#405)
Other changes:
- Use `SharedPreferences#edit` extension function consistently (#1545)
- Use `retrofit2.Call.awaitResponse` extension provided by Retrofit 2. (#1526)
- Fix minor typo in contribution guide (#1512)
- Fix self-assignment of callback in `DefaultRoomPushRuleService#setRoomNotificationState` (#1520)
- Random housekeeping clean-ups indicated by Lint (#1520, #1541)
- Keys Backup API now use the unstable prefix (#1503)
- Remove deviceId from /keys/upload/{deviceId} as not spec-compliant (#1502)
Changes in RiotX 0.22.0 (2020-06-15)
===================================================
Features :
- Integration Manager and Widget support (#48)
- Send stickers (#51)
Improvements 🙌:
- New wording for notice when current user is the sender
- Hide "X made no changes" event by default in timeline (#1430)
- Hide left rooms in breadcrumbs (#766)
- Handle PowerLevel properly (#627)
- Correctly handle SSO login redirection
- SSO login is now performed in the default browser, or in Chrome Custom tab if available (#1400)
- Improve checking of homeserver version support (#1442)
- Add capability to add and remove a room from the favorites (#1217)
Bugfix 🐛:
- Switch theme is not fully taken into account without restarting the app
- Temporary fix to show error when user is creating an account on matrix.org with userId containing only digits (#1410)
- Reply composer overlay stays on screen too long after send (#1169)
- Fix navigation bar icon contrast on API in [21,27[ (#1342)
- Fix status bar icon contrast on API in [21,23[
- Wrong /query request (#1444)
- Make Credentials.homeServer optional because it is deprecated (#1443)
- Fix issue on dark themes, after alert popup dismiss
Other changes:
- Send plain text in the body of events containing formatted body, as per https://matrix.org/docs/spec/client_server/latest#m-room-message-msgtypes
- Update link to Modular url from "https://modular.im/" to "https://modular.im/services/matrix-hosting-riot" and open it using ChromeCustomTab
Changes in RiotX 0.21.0 (2020-05-28)
===================================================
Features :
- Identity server support (#607)
- Switch language support (#41)
- Display list of attachments of a room (#860)
Improvements 🙌:
- Better connectivity lost indicator when airplane mode is on
- Add a setting to hide redacted events (#951)
- Render formatted_body for m.notice and m.emote (#1196)
- Change icon to magnifying-glass to filter room (#1384)
Bugfix 🐛:
- After jump to unread, newer messages are never loaded (#1008)
- Fix issues with FontScale switch (#69, #645)
- "Seen by" uses 12h time (#1378)
- Enable markdown (if active) when sending emote (#734)
- Screenshots for Rageshake now includes Dialogs such as BottomSheet (#1349)
SDK API changes :
- initialize with proxy configuration
Other changes:
- support new key agreement method for SAS (#1374)
Changes in RiotX 0.20.0 (2020-05-15)
===================================================
Features :
- Add Direct Shortcuts (#652)
Improvements 🙌:
- Invite member(s) to an existing room (#1276)
- Improve notification accessibility with ticker text (#1226)
- Support homeserver discovery from MXID (DISABLED: waiting for design) (#476)
Bugfix 🐛:
- Fix | Verify Manually by Text crashes if private SSK not known (#1337)
- Sometimes the same device appears twice in the list of devices of a user (#1329)
- Random Crashes while doing sth with cross signing keys (#1364)
- Crash | crash while restoring key backup (#1366)
SDK API changes :
- excludedUserIds parameter added to the UserService.getPagedUsersLive() function
Changes in RiotX 0.19.0 (2020-05-04)
===================================================
Features :
- Change password (#528)
- Cross-Signing | Support SSSS secret sharing (#944)
- Cross-Signing | Verify new session from existing session (#1134)
- Cross-Signing | Bootstraping cross signing with 4S from mobile (#985)
- Save media files to Gallery (#973)
- Account deactivation (with password only) (#35)
Improvements 🙌:
- Verification DM / Handle concurrent .start after .ready (#794)
- Reimplementation of multiple attachment picker
- Cross-Signing | Update Shield Logic for DM (#963)
- Cross-Signing | Complete security new session design update (#1135)
- Cross-Signing | Setup key backup as part of SSSS bootstrapping (#1201)
- Cross-Signing | Gossip key backup recovery key (#1200)
- Show room encryption status as a bubble tile (#1078)
- UX/UI | Add indicator to home tab on invite (#957)
- Cross-Signing | Restore history after recover from passphrase (#1214)
- Cross-Sign | QR code scan confirmation screens design update (#1187)
- Emoji Verification | It's not the same butterfly! (#1220)
- Cross-Signing | Composer decoration: shields (#1077)
- Cross-Signing | Migrate existing keybackup to cross signing with 4S from mobile (#1197)
- Show a warning dialog if the text of the clicked link does not match the link target (#922)
- Cross-Signing | Consider not using a spinner on the 'complete security' prompt (#1271)
- Restart broken Olm sessions ([MSC1719](https://github.com/matrix-org/matrix-doc/pull/1719))
- Cross-Signing | Hide Use recovery key when 4S is not setup (#1007)
- Cross-Signing | Trust account xSigning keys by entering Recovery Key (select file or copy) #1199
- E2E timeline decoration (#1279)
- Manage Session Settings / Cross Signing update (#1295)
- Cross-Signing | Review sessions toast update old vs new (#1293, #1306)
Bugfix 🐛:
- Fix summary notification staying after "mark as read"
- Missing avatar/displayname after verification request message (#841)
- Crypto | RiotX sometimes rotate the current device keys (#1170)
- RiotX can't restore cross signing keys saved by web in SSSS (#1174)
- Cross- Signing | After signin in new session, verification paper trail in DM is off (#1191)
- Failed to encrypt message in room (message stays in red), [thanks to pwr22] (#925)
- Cross-Signing | web <-> riotX After QR code scan, gossiping fails (#1210)
- Fix crash when trying to download file without internet connection (#1229)
- Local echo are not updated in timeline (for failed & encrypted states)
- Render image event even if thumbnail_info does not have mimetype defined (#1209)
- RiotX now uses as many threads as it needs to do work and send messages (#1221)
- Fix issue with media path (#1227)
- Add user to direct chat by user id (#1065)
- Use correct URL for SSO connection (#1178)
- Emoji completion :tada: does not completes to 🎉 like on web (#1285)
- Fix bad Shield Logic for DM (#963)
Translations 🗣:
- Weblate now create PR directly to RiotX GitHub project
SDK API changes ⚠️:
- Increase targetSdkVersion to 29
Build 🧱:
- Compile with Android SDK 29 (Android Q)
Other changes:
- Add a setting to prevent screenshots of the application, disabled by default (#1027)
- Increase File Logger capacities ( + use dev log preferences)
Changes in RiotX 0.18.1 (2020-03-17)
===================================================
Improvements 🙌:
- Implementation of /join command
Bugfix 🐛:
- Message transitions in encrypted rooms are jarring #518
- Images that failed to send are waiting to be sent forever #1145
- Fix / Crashed when trying to send a gif from the Gboard #1136
- Fix / Cannot click on key backup banner when new keys are available
Changes in RiotX 0.18.0 (2020-03-11)
===================================================
Improvements 🙌:
- Share image and other media from e2e rooms (#677)
- Add support for `/plain` command (#12)
- Detect spaces in password if user fail to login (#1038)
- FTUE: do not display a different color when encrypting message when not in developer mode.
- Open room member profile from avatar of the room member state event (#935)
- Restore the push rules configuration in the settings
Bugfix 🐛:
- Fix crash on attachment preview screen (#1088)
- "Share" option is not appearing in encrypted rooms for images (#1031)
- Set "image/jpeg" as MIME type of images instead of "image/jpg" (#1075)
- Self verification via QR code is failing (#1130)
SDK API changes ⚠️:
- PushRuleService.getPushRules() now returns a RuleSet. Use getAllRules() on this object to get all the rules.
Build 🧱:
- Upgrade ktlint to version 0.36.0
- Pipeline file for Buildkite is now hosted on another Github repository: https://github.com/matrix-org/pipelines/blob/master/riotx-android/pipeline.yml
Other changes:
- Restore availability to Chromebooks (#932)
- Add a [documentation](./docs/integration_tests.md) to run integration tests
Changes in RiotX 0.17.0 (2020-02-27)
===================================================
Features ✨:
- Secured Shared Storage Support (#984, #936)
- It's now possible to select several rooms (with a possible mix of clear/encrypted rooms) when sharing elements to RiotX (#1010)
- Media preview: media are previewed before being sent to a room (#1010)
- Image edition: it's now possible to edit image before sending: crop, rotate, and delete actions are supported (#1010)
- Sending image: image are sent to rooms with a reduced size. It's still possible to send original image file (#1010)
Improvements 🙌:
- Migrate to binary QR code verification (#994)
- Share action is added to room profile and room member profile (#858)
- Display avatar in fullscreen (#861)
- Fix some performance issues with crypto
Bugfix 🐛:
- Account creation: wrongly hints that an email can be used to create an account (#941)
- Fix crash in the room directory, when public room has no name (#1023)
- Fix restoring keys backup with passphrase (#526)
- Fix rotation of full-size image (#647)
- Fix joining rooms from directory via federation isn't working. (#808)
- Leaving a room creates a stuck "leaving room" loading screen. (#1041)
- Fix some invitation handling issues (#1013)
- New direct chat: selecting a participant sometimes results in two breadcrumbs (#1022)
- New direct chat: selecting several participants was not adding the room to the direct chats list
- Room overview shows deleted messages as “Encrypted message” (#758)
SDK API changes ⚠️:
- Get crypto methods through Session.cryptoService()
- ProgressListener.onProgress() function will be invoked on the background thread instead of UI thread
- Improve CreateRoomParams API (#1070)
Changes in RiotX 0.16.0 (2020-02-14)
===================================================
@@ -330,6 +887,7 @@ Bugfix:
- Fix messages with empty `in_reply_to` not rendering (#447)
- Fix clear cache (#408) and Logout (#205)
- Fix `(edited)` link can be copied to clipboard (#402)
- KeyBackup / SSSS | Should get the key from SSSS instead of asking recovery Key (#1163)
Build:
- Split APK: generate one APK per arch, to reduce APK size of about 30%
@@ -373,7 +931,7 @@ Mode details here: https://medium.com/@RiotChat/introducing-the-riotx-beta-for-a
=======================================================
Changes in RiotX 0.X.0 (2020-XX-XX)
Changes in Element 1.X.X (2020-XX-XX)
===================================================
Features ✨:

View File

@@ -2,9 +2,7 @@
Please read https://github.com/matrix-org/synapse/blob/master/CONTRIBUTING.md
Android support can be found in this [![Riot Android Matrix room #riot-android:matrix.org](https://img.shields.io/matrix/riot-android:matrix.org.svg?label=%23riot-android:matrix.org&logo=matrix&server_fqdn=matrix.org)](https://matrix.to/#/#riot-android:matrix.org) room.
Dedicated room for RiotX: [![RiotX Android Matrix room #riot-android:matrix.org](https://img.shields.io/matrix/riotx:matrix.org.svg?label=%23RiotX:matrix.org&logo=matrix&server_fqdn=matrix.org)](https://matrix.to/#/#riotx:matrix.org)
Android support can be found in this [![Element Android Matrix room #element-android:matrix.org](https://img.shields.io/matrix/element-android:matrix.org.svg?label=%23element-android:matrix.org&logo=matrix&server_fqdn=matrix.org)](https://matrix.to/#/#element-android:matrix.org) room.
# Specific rules for Matrix Android projects
@@ -13,16 +11,36 @@ Dedicated room for RiotX: [![RiotX Android Matrix room #riot-android:matrix.org]
Please set the "hard wrap" setting of Android Studio to 160 chars, this is the setting we use internally to format the source code (Menu `Settings/Editor/Code Style` then `Hard wrap at`).
Please ensure that your using the project formatting rules (which are in the project at .idea/codeStyles/), and format the file before committing them.
### Template
An Android Studio template has been added to the project to help creating all files needed when adding a new screen to the application. Fragment, ViewModel, Activity, etc.
To install the template (to be done only once):
- Go to folder `./tools/template`.
- Mac OSX: Run the script `./configure.sh`.
Linux: Run `ANDROID_STUDIO=/path/to/android-studio ./configure`
- e.g. `ANDROID_STUDIO=/usr/local/android-studio ./configure`
- Restart Android Studio.
To create a new screen:
- First create a new package in your code.
- Then right click on the package, and select `New/New Vector/RiotX Feature`.
- Follow the Wizard, especially replace `Main` by something more relevant to your feature.
- Click on `Finish`.
- Remaining steps are described as TODO in the generated files, or will be pointed out by the compilator, or at runtime :)
Note that if the templates are modified, the only things to do is to restart Android Studio for the change to take effect.
## Compilation
For now, the Matrix SDK and the RiotX application are in the same project. So there is no specific thing to do, this project should compile without any special action.
For now, the Matrix SDK and the Element application are in the same project. So there is no specific thing to do, this project should compile without any special action.
## I want to help translating RiotX
## I want to help translating Element
If you want to fix an issue with an English string, please submit a PR.
If you want to fix an issue in other languages, or add a missing translation, or even add a new language, please use [Weblate](https://translate.riot.im/projects/riot-android/).
For the moment, Strings from Riot will be used, there is no dedicated project in Weblate for RiotX.
If you want to fix an issue in other languages, or add a missing translation, or even add a new language, please use [Weblate](https://translate.riot.im/projects/element-android/).
## I want to submit a PR to fix an issue
@@ -79,9 +97,11 @@ Make sure the following commands execute without any error:
### Tests
RiotX is currently supported on Android KitKat (API 19+): please test your change on an Android device (or Android emulator) running with API 19. Many issues can happen (including crashes) on older devices.
Element is currently supported on Android Lollipop (API 21+): please test your change on an Android device (or Android emulator) running with API 21. Many issues can happen (including crashes) on older devices.
Also, if possible, please test your change on a real device. Testing on Android emulator may not be sufficient.
You should consider adding Unit tests with your PR, and also integration tests (AndroidTest). Please refer to [this document](./docs/integration_tests.md) to install and run the integration test environment.
### Internationalisation
When adding new string resources, please only add new entries in file `value/strings.xml`. Translations will be added later by the community of translators with a specific tool named [Weblate](https://translate.riot.im/projects/riot-android/).
@@ -96,7 +116,7 @@ Please consider accessibility as an important point. As a minimum requirement, i
When adding or editing layouts, make sure the layout will render correctly if device uses a RTL (Right To Left) language.
You can check this in the layout editor preview by selecting any RTL language (ex: Arabic).
Also please check that the colors are ok for all the current themes of RiotX. Please use `?attr` instead of `@color` to reference colors in the layout. You can check this in the layout editor preview by selecting all the main themes (`AppTheme.Status`, `AppTheme.Dark`, etc.).
Also please check that the colors are ok for all the current themes of Element. Please use `?attr` instead of `@color` to reference colors in the layout. You can check this in the layout editor preview by selecting all the main themes (`AppTheme.Status`, `AppTheme.Dark`, etc.).
### Authors

View File

@@ -1,38 +1,34 @@
[![Buildkite](https://badge.buildkite.com/657d3db27364448d69d54f66c690f7788bc6aa80a7628e37f3.svg?branch=develop)](https://buildkite.com/matrix-dot-org/riotx-android/builds?branch=develop)
[![Weblate](https://translate.riot.im/widgets/riot-android/-/svg-badge.svg)](https://translate.riot.im/engage/riot-android/?utm_source=widget)
[![RiotX Android Matrix room #riot-android:matrix.org](https://img.shields.io/matrix/riotx:matrix.org.svg?label=%23RiotX:matrix.org&logo=matrix&server_fqdn=matrix.org)](https://matrix.to/#/#riotx:matrix.org)
[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=vector.android.riotx&metric=alert_status)](https://sonarcloud.io/dashboard?id=vector.android.riotx)
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=vector.android.riotx&metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=vector.android.riotx)
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=vector.android.riotx&metric=bugs)](https://sonarcloud.io/dashboard?id=vector.android.riotx)
[![Buildkite](https://badge.buildkite.com/ad0065c1b70f557cd3b1d3d68f9c2154010f83c4d6f71706a9.svg?branch=develop)](https://buildkite.com/matrix-dot-org/element-android/builds?branch=develop)
[![Weblate](https://translate.riot.im/widgets/element-android/-/svg-badge.svg)](https://translate.riot.im/engage/element-android/?utm_source=widget)
[![Element Android Matrix room #element-android:matrix.org](https://img.shields.io/matrix/element-android:matrix.org.svg?label=%23element-android:matrix.org&logo=matrix&server_fqdn=matrix.org)](https://matrix.to/#/#element-android:matrix.org)
[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=im.vector.app.android&metric=alert_status)](https://sonarcloud.io/dashboard?id=im.vector.app.android)
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=im.vector.app.android&metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=im.vector.app.android)
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=im.vector.app.android&metric=bugs)](https://sonarcloud.io/dashboard?id=im.vector.app.android)
# RiotX Android
# Element Android
RiotX is an Android Matrix Client currently in beta but in active development.
Element Android is an Android Matrix Client provided by [Element](https://element.io/).
It is a total rewrite of [Riot-Android](https://github.com/vector-im/riot-android) with a new user experience. RiotX will become the official replacement as soon as all features are implemented.
It is a total rewrite of [Riot-Android](https://github.com/vector-im/riot-android) with a new user experience.
[<img src="https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png" alt="Get it on Google Play" height="60">](https://play.google.com/store/apps/details?id=im.vector.riotx)
[<img src="https://f-droid.org/badge/get-it-on.png" alt="Get it on F-Droid" height="60">](https://f-droid.org/app/im.vector.riotx)
[<img src="resources/img/google-play-badge.png" alt="Get it on Google Play" height="60">](https://play.google.com/store/apps/details?id=im.vector.app)
[<img src="resources/img/f-droid-badge.png" alt="Get it on F-Droid" height="60">](https://f-droid.org/app/im.vector.app)
Nightly build: [![Buildkite](https://badge.buildkite.com/657d3db27364448d69d54f66c690f7788bc6aa80a7628e37f3.svg?branch=develop)](https://buildkite.com/matrix-dot-org/riotx-android/builds?branch=develop)
Nightly build: [![Buildkite](https://badge.buildkite.com/ad0065c1b70f557cd3b1d3d68f9c2154010f83c4d6f71706a9.svg?branch=develop)](https://buildkite.com/matrix-dot-org/element-android/builds?branch=develop)
# New Android SDK
RiotX is based on a new Android SDK fully written in Kotlin (like RiotX). In order to make the early development as fast as possible, RiotX and the new SDK currently share the same git repository. We will make separate repos once the SDK is stable enough.
Element is based on a new Android SDK fully written in Kotlin (like Element). In order to make the early development as fast as possible, Element and the new SDK currently share the same git repository.
At each Element release, the SDK module is copied to a dedicated repository: https://github.com/matrix-org/matrix-android-sdk2. That way, third party apps can add a regular gradle dependency to use it. So more details on how to do that here: https://github.com/matrix-org/matrix-android-sdk2.
# Roadmap
The current target is to release an application out of beta with the same level of features (and even more) as Riot.
The roadmap has 3 phases:
- [phase 0](https://github.com/vector-im/riotX-android/labels/phase0): Prototyping / Project setup
- [phase 1](https://github.com/vector-im/riotX-android/labels/phase1): Beta release to the Play Store
- [phase 2](https://github.com/vector-im/riotX-android/labels/phase2): Out of beta
The version 1.0.0 of Element still misses some features which was previously included in Riot-Android.
The team will work to add them on a regular basis.
## Contributing
Please refer to [CONTRIBUTING.md](https://github.com/vector-im/riotX-android/blob/develop/CONTRIBUTING.md) if you want to contribute on Matrix Android projects!
Please refer to [CONTRIBUTING.md](https://github.com/vector-im/element-android/blob/develop/CONTRIBUTING.md) if you want to contribute on Matrix Android projects!
Come chat with the community in the dedicated Matrix [room](https://matrix.to/#/#riotx:matrix.org).
Come chat with the community in the dedicated Matrix [room](https://matrix.to/#/#element-android:matrix.org).

1
attachment-viewer/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/build

View File

@@ -0,0 +1,78 @@
/*
* Copyright (c) 2020 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
buildscript {
repositories {
maven {
url 'https://jitpack.io'
content {
// PhotoView
includeGroupByRegex 'com\\.github\\.chrisbanes'
}
}
jcenter()
}
}
android {
compileSdkVersion 29
defaultConfig {
minSdkVersion 21
targetSdkVersion 29
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}
dependencies {
implementation 'com.github.chrisbanes:PhotoView:2.0.0'
implementation 'io.reactivex.rxjava2:rxkotlin:2.3.0'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.3.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.google.android.material:material:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.navigation:navigation-fragment-ktx:2.1.0'
implementation 'androidx.navigation:navigation-ui-ktx:2.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}

View File

21
attachment-viewer/proguard-rules.pro vendored Normal file
View File

@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="im.vector.lib.attachmentviewer" />

View File

@@ -0,0 +1,35 @@
/*
* Copyright (c) 2020 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package im.vector.lib.attachmentviewer
import android.view.View
import android.widget.ImageView
import android.widget.ProgressBar
class AnimatedImageViewHolder constructor(itemView: View) :
BaseViewHolder(itemView) {
val touchImageView: ImageView = itemView.findViewById(R.id.imageView)
val imageLoaderProgress: ProgressBar = itemView.findViewById(R.id.imageLoaderProgress)
internal val target = DefaultImageLoaderTarget(this, this.touchImageView)
override fun onRecycled() {
super.onRecycled()
touchImageView.setImageDrawable(null)
}
}

View File

@@ -0,0 +1,31 @@
/*
* Copyright (c) 2020 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package im.vector.lib.attachmentviewer
sealed class AttachmentEvents {
data class VideoEvent(val isPlaying: Boolean, val progress: Int, val duration: Int) : AttachmentEvents()
}
interface AttachmentEventListener {
fun onEvent(event: AttachmentEvents)
}
sealed class AttachmentCommands {
object PauseVideo : AttachmentCommands()
object StartVideo : AttachmentCommands()
data class SeekTo(val percentProgress: Int) : AttachmentCommands()
}

View File

@@ -0,0 +1,45 @@
/*
* Copyright (c) 2020 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package im.vector.lib.attachmentviewer
import android.content.Context
import android.view.View
sealed class AttachmentInfo(open val uid: String) {
data class Image(override val uid: String, val url: String, val data: Any?) : AttachmentInfo(uid)
data class AnimatedImage(override val uid: String, val url: String, val data: Any?) : AttachmentInfo(uid)
data class Video(override val uid: String, val url: String, val data: Any, val thumbnail: Image?) : AttachmentInfo(uid)
// data class Audio(override val uid: String, val url: String, val data: Any) : AttachmentInfo(uid)
// data class File(override val uid: String, val url: String, val data: Any) : AttachmentInfo(uid)
}
interface AttachmentSourceProvider {
fun getItemCount(): Int
fun getAttachmentInfoAt(position: Int): AttachmentInfo
fun loadImage(target: ImageLoaderTarget, info: AttachmentInfo.Image)
fun loadImage(target: ImageLoaderTarget, info: AttachmentInfo.AnimatedImage)
fun loadVideo(target: VideoLoaderTarget, info: AttachmentInfo.Video)
fun overlayViewAtPosition(context: Context, position: Int): View?
fun clear(id: String)
}

View File

@@ -0,0 +1,335 @@
/*
* Copyright (c) 2020 New Vector Ltd
* Copyright (C) 2018 stfalcon.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package im.vector.lib.attachmentviewer
import android.graphics.Color
import android.os.Bundle
import android.view.GestureDetector
import android.view.MotionEvent
import android.view.ScaleGestureDetector
import android.view.View
import android.view.ViewGroup
import android.view.WindowManager
import android.widget.ImageView
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.GestureDetectorCompat
import androidx.core.view.ViewCompat
import androidx.core.view.isVisible
import androidx.core.view.updatePadding
import androidx.transition.TransitionManager
import androidx.viewpager2.widget.ViewPager2
import kotlinx.android.synthetic.main.activity_attachment_viewer.*
import java.lang.ref.WeakReference
import kotlin.math.abs
abstract class AttachmentViewerActivity : AppCompatActivity(), AttachmentEventListener {
lateinit var pager2: ViewPager2
lateinit var imageTransitionView: ImageView
lateinit var transitionImageContainer: ViewGroup
var topInset = 0
var bottomInset = 0
var systemUiVisibility = true
private var overlayView: View? = null
set(value) {
if (value == overlayView) return
overlayView?.let { rootContainer.removeView(it) }
rootContainer.addView(value)
value?.updatePadding(top = topInset, bottom = bottomInset)
field = value
}
private lateinit var swipeDismissHandler: SwipeToDismissHandler
private lateinit var directionDetector: SwipeDirectionDetector
private lateinit var scaleDetector: ScaleGestureDetector
private lateinit var gestureDetector: GestureDetectorCompat
var currentPosition = 0
private var swipeDirection: SwipeDirection? = null
private fun isScaled() = attachmentsAdapter.isScaled(currentPosition)
private var wasScaled: Boolean = false
private var isSwipeToDismissAllowed: Boolean = true
private lateinit var attachmentsAdapter: AttachmentsAdapter
private var isOverlayWasClicked = false
// private val shouldDismissToBottom: Boolean
// get() = e == null
// || !externalTransitionImageView.isRectVisible
// || !isAtStartPosition
private var isImagePagerIdle = true
fun setSourceProvider(sourceProvider: AttachmentSourceProvider) {
attachmentsAdapter.attachmentSourceProvider = sourceProvider
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
// This is important for the dispatchTouchEvent, if not we must correct
// the touch coordinates
window.decorView.systemUiVisibility = (
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
or View.SYSTEM_UI_FLAG_IMMERSIVE)
window.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS)
window.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION, WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION)
setContentView(R.layout.activity_attachment_viewer)
attachmentPager.orientation = ViewPager2.ORIENTATION_HORIZONTAL
attachmentsAdapter = AttachmentsAdapter()
attachmentPager.adapter = attachmentsAdapter
imageTransitionView = transitionImageView
transitionImageContainer = findViewById(R.id.transitionImageContainer)
pager2 = attachmentPager
directionDetector = createSwipeDirectionDetector()
gestureDetector = createGestureDetector()
attachmentPager.registerOnPageChangeCallback(object : ViewPager2.OnPageChangeCallback() {
override fun onPageScrollStateChanged(state: Int) {
isImagePagerIdle = state == ViewPager2.SCROLL_STATE_IDLE
}
override fun onPageSelected(position: Int) {
onSelectedPositionChanged(position)
}
})
swipeDismissHandler = createSwipeToDismissHandler()
rootContainer.setOnTouchListener(swipeDismissHandler)
rootContainer.viewTreeObserver.addOnGlobalLayoutListener { swipeDismissHandler.translationLimit = dismissContainer.height / 4 }
scaleDetector = createScaleGestureDetector()
ViewCompat.setOnApplyWindowInsetsListener(rootContainer) { _, insets ->
overlayView?.updatePadding(top = insets.systemWindowInsetTop, bottom = insets.systemWindowInsetBottom)
topInset = insets.systemWindowInsetTop
bottomInset = insets.systemWindowInsetBottom
insets
}
}
fun onSelectedPositionChanged(position: Int) {
attachmentsAdapter.recyclerView?.findViewHolderForAdapterPosition(currentPosition)?.let {
(it as? BaseViewHolder)?.onSelected(false)
}
attachmentsAdapter.recyclerView?.findViewHolderForAdapterPosition(position)?.let {
(it as? BaseViewHolder)?.onSelected(true)
if (it is VideoViewHolder) {
it.eventListener = WeakReference(this)
}
}
currentPosition = position
overlayView = attachmentsAdapter.attachmentSourceProvider?.overlayViewAtPosition(this@AttachmentViewerActivity, position)
}
override fun onPause() {
attachmentsAdapter.onPause(currentPosition)
super.onPause()
}
override fun onResume() {
super.onResume()
attachmentsAdapter.onResume(currentPosition)
}
override fun dispatchTouchEvent(ev: MotionEvent): Boolean {
// The zoomable view is configured to disallow interception when image is zoomed
// Check if the overlay is visible, and wants to handle the click
if (overlayView?.isVisible == true && overlayView?.dispatchTouchEvent(ev) == true) {
return true
}
// Log.v("ATTACHEMENTS", "================\ndispatchTouchEvent $ev")
handleUpDownEvent(ev)
// Log.v("ATTACHEMENTS", "scaleDetector is in progress ${scaleDetector.isInProgress}")
// Log.v("ATTACHEMENTS", "pointerCount ${ev.pointerCount}")
// Log.v("ATTACHEMENTS", "wasScaled $wasScaled")
if (swipeDirection == null && (scaleDetector.isInProgress || ev.pointerCount > 1 || wasScaled)) {
wasScaled = true
// Log.v("ATTACHEMENTS", "dispatch to pager")
return attachmentPager.dispatchTouchEvent(ev)
}
// Log.v("ATTACHEMENTS", "is current item scaled ${isScaled()}")
return (if (isScaled()) super.dispatchTouchEvent(ev) else handleTouchIfNotScaled(ev)).also {
// Log.v("ATTACHEMENTS", "\n================")
}
}
private fun handleUpDownEvent(event: MotionEvent) {
// Log.v("ATTACHEMENTS", "handleUpDownEvent $event")
if (event.action == MotionEvent.ACTION_UP) {
handleEventActionUp(event)
}
if (event.action == MotionEvent.ACTION_DOWN) {
handleEventActionDown(event)
}
scaleDetector.onTouchEvent(event)
gestureDetector.onTouchEvent(event)
}
private fun handleEventActionDown(event: MotionEvent) {
swipeDirection = null
wasScaled = false
attachmentPager.dispatchTouchEvent(event)
swipeDismissHandler.onTouch(rootContainer, event)
isOverlayWasClicked = dispatchOverlayTouch(event)
}
private fun handleEventActionUp(event: MotionEvent) {
// wasDoubleTapped = false
swipeDismissHandler.onTouch(rootContainer, event)
attachmentPager.dispatchTouchEvent(event)
isOverlayWasClicked = dispatchOverlayTouch(event)
}
private fun handleSingleTap(event: MotionEvent, isOverlayWasClicked: Boolean) {
// TODO if there is no overlay, we should at least toggle system bars?
if (overlayView != null && !isOverlayWasClicked) {
toggleOverlayViewVisibility()
super.dispatchTouchEvent(event)
}
}
private fun toggleOverlayViewVisibility() {
if (systemUiVisibility) {
// we hide
TransitionManager.beginDelayedTransition(rootContainer)
hideSystemUI()
overlayView?.isVisible = false
} else {
// we show
TransitionManager.beginDelayedTransition(rootContainer)
showSystemUI()
overlayView?.isVisible = true
}
}
private fun handleTouchIfNotScaled(event: MotionEvent): Boolean {
// Log.v("ATTACHEMENTS", "handleTouchIfNotScaled $event")
directionDetector.handleTouchEvent(event)
return when (swipeDirection) {
SwipeDirection.Up, SwipeDirection.Down -> {
if (isSwipeToDismissAllowed && !wasScaled && isImagePagerIdle) {
swipeDismissHandler.onTouch(rootContainer, event)
} else true
}
SwipeDirection.Left, SwipeDirection.Right -> {
attachmentPager.dispatchTouchEvent(event)
}
else -> true
}
}
private fun handleSwipeViewMove(translationY: Float, translationLimit: Int) {
val alpha = calculateTranslationAlpha(translationY, translationLimit)
backgroundView.alpha = alpha
dismissContainer.alpha = alpha
overlayView?.alpha = alpha
}
private fun dispatchOverlayTouch(event: MotionEvent): Boolean =
overlayView
?.let { it.isVisible && it.dispatchTouchEvent(event) }
?: false
private fun calculateTranslationAlpha(translationY: Float, translationLimit: Int): Float =
1.0f - 1.0f / translationLimit.toFloat() / 4f * abs(translationY)
private fun createSwipeToDismissHandler()
: SwipeToDismissHandler = SwipeToDismissHandler(
swipeView = dismissContainer,
shouldAnimateDismiss = { shouldAnimateDismiss() },
onDismiss = { animateClose() },
onSwipeViewMove = ::handleSwipeViewMove)
private fun createSwipeDirectionDetector() =
SwipeDirectionDetector(this) { swipeDirection = it }
private fun createScaleGestureDetector() =
ScaleGestureDetector(this, ScaleGestureDetector.SimpleOnScaleGestureListener())
private fun createGestureDetector() =
GestureDetectorCompat(this, object : GestureDetector.SimpleOnGestureListener() {
override fun onSingleTapConfirmed(e: MotionEvent): Boolean {
if (isImagePagerIdle) {
handleSingleTap(e, isOverlayWasClicked)
}
return false
}
override fun onDoubleTap(e: MotionEvent?): Boolean {
return super.onDoubleTap(e)
}
})
override fun onEvent(event: AttachmentEvents) {
if (overlayView is AttachmentEventListener) {
(overlayView as? AttachmentEventListener)?.onEvent(event)
}
}
protected open fun shouldAnimateDismiss(): Boolean = true
protected open fun animateClose() {
window.statusBarColor = Color.TRANSPARENT
finish()
}
fun handle(commands: AttachmentCommands) {
(attachmentsAdapter.recyclerView?.findViewHolderForAdapterPosition(currentPosition) as? BaseViewHolder)
?.handleCommand(commands)
}
private fun hideSystemUI() {
systemUiVisibility = false
// Enables regular immersive mode.
// For "lean back" mode, remove SYSTEM_UI_FLAG_IMMERSIVE.
// Or for "sticky immersive," replace it with SYSTEM_UI_FLAG_IMMERSIVE_STICKY
window.decorView.systemUiVisibility = (View.SYSTEM_UI_FLAG_IMMERSIVE
// Set the content to appear under the system bars so that the
// content doesn't resize when the system bars hide and show.
or View.SYSTEM_UI_FLAG_LAYOUT_STABLE
or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
// Hide the nav bar and status bar
or View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
or View.SYSTEM_UI_FLAG_FULLSCREEN)
}
// Shows the system bars by removing all the flags
// except for the ones that make the content appear under the system bars.
private fun showSystemUI() {
systemUiVisibility = true
window.decorView.systemUiVisibility = (View.SYSTEM_UI_FLAG_LAYOUT_STABLE
or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN)
}
}

View File

@@ -0,0 +1,115 @@
/*
* Copyright (c) 2020 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package im.vector.lib.attachmentviewer
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
class AttachmentsAdapter : RecyclerView.Adapter<BaseViewHolder>() {
var attachmentSourceProvider: AttachmentSourceProvider? = null
set(value) {
field = value
notifyDataSetChanged()
}
var recyclerView: RecyclerView? = null
override fun onAttachedToRecyclerView(recyclerView: RecyclerView) {
this.recyclerView = recyclerView
}
override fun onDetachedFromRecyclerView(recyclerView: RecyclerView) {
this.recyclerView = null
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): BaseViewHolder {
val inflater = LayoutInflater.from(parent.context)
val itemView = inflater.inflate(viewType, parent, false)
return when (viewType) {
R.layout.item_image_attachment -> ZoomableImageViewHolder(itemView)
R.layout.item_animated_image_attachment -> AnimatedImageViewHolder(itemView)
R.layout.item_video_attachment -> VideoViewHolder(itemView)
else -> UnsupportedViewHolder(itemView)
}
}
override fun getItemViewType(position: Int): Int {
val info = attachmentSourceProvider!!.getAttachmentInfoAt(position)
return when (info) {
is AttachmentInfo.Image -> R.layout.item_image_attachment
is AttachmentInfo.Video -> R.layout.item_video_attachment
is AttachmentInfo.AnimatedImage -> R.layout.item_animated_image_attachment
// is AttachmentInfo.Audio -> TODO()
// is AttachmentInfo.File -> TODO()
}
}
override fun getItemCount(): Int {
return attachmentSourceProvider?.getItemCount() ?: 0
}
override fun onBindViewHolder(holder: BaseViewHolder, position: Int) {
attachmentSourceProvider?.getAttachmentInfoAt(position)?.let {
holder.bind(it)
when (it) {
is AttachmentInfo.Image -> {
attachmentSourceProvider?.loadImage((holder as ZoomableImageViewHolder).target, it)
}
is AttachmentInfo.AnimatedImage -> {
attachmentSourceProvider?.loadImage((holder as AnimatedImageViewHolder).target, it)
}
is AttachmentInfo.Video -> {
attachmentSourceProvider?.loadVideo((holder as VideoViewHolder).target, it)
}
// else -> {
// // }
}
}
}
override fun onViewAttachedToWindow(holder: BaseViewHolder) {
holder.onAttached()
}
override fun onViewRecycled(holder: BaseViewHolder) {
holder.onRecycled()
}
override fun onViewDetachedFromWindow(holder: BaseViewHolder) {
holder.onDetached()
}
fun isScaled(position: Int): Boolean {
val holder = recyclerView?.findViewHolderForAdapterPosition(position)
if (holder is ZoomableImageViewHolder) {
return holder.touchImageView.attacher.scale > 1f
}
return false
}
fun onPause(position: Int) {
val holder = recyclerView?.findViewHolderForAdapterPosition(position) as? BaseViewHolder
holder?.entersBackground()
}
fun onResume(position: Int) {
val holder = recyclerView?.findViewHolderForAdapterPosition(position) as? BaseViewHolder
holder?.entersForeground()
}
}

View File

@@ -0,0 +1,45 @@
/*
* Copyright (c) 2020 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package im.vector.lib.attachmentviewer
import android.view.View
import androidx.recyclerview.widget.RecyclerView
abstract class BaseViewHolder constructor(itemView: View) :
RecyclerView.ViewHolder(itemView) {
open fun onRecycled() {
boundResourceUid = null
}
open fun onAttached() {}
open fun onDetached() {}
open fun entersBackground() {}
open fun entersForeground() {}
open fun onSelected(selected: Boolean) {}
open fun handleCommand(commands: AttachmentCommands) {}
var boundResourceUid: String? = null
open fun bind(attachmentInfo: AttachmentInfo) {
boundResourceUid = attachmentInfo.uid
}
}
class UnsupportedViewHolder constructor(itemView: View) :
BaseViewHolder(itemView)

View File

@@ -0,0 +1,106 @@
/*
* Copyright (c) 2020 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package im.vector.lib.attachmentviewer
import android.graphics.drawable.Animatable
import android.graphics.drawable.Drawable
import android.widget.ImageView
import android.widget.LinearLayout
import androidx.core.view.isVisible
import androidx.core.view.updateLayoutParams
interface ImageLoaderTarget {
fun contextView(): ImageView
fun onResourceLoading(uid: String, placeholder: Drawable?)
fun onLoadFailed(uid: String, errorDrawable: Drawable?)
fun onResourceCleared(uid: String, placeholder: Drawable?)
fun onResourceReady(uid: String, resource: Drawable)
}
internal class DefaultImageLoaderTarget(val holder: AnimatedImageViewHolder, private val contextView: ImageView)
: ImageLoaderTarget {
override fun contextView(): ImageView {
return contextView
}
override fun onResourceLoading(uid: String, placeholder: Drawable?) {
if (holder.boundResourceUid != uid) return
holder.imageLoaderProgress.isVisible = true
}
override fun onLoadFailed(uid: String, errorDrawable: Drawable?) {
if (holder.boundResourceUid != uid) return
holder.imageLoaderProgress.isVisible = false
holder.touchImageView.setImageDrawable(errorDrawable)
}
override fun onResourceCleared(uid: String, placeholder: Drawable?) {
if (holder.boundResourceUid != uid) return
holder.touchImageView.setImageDrawable(placeholder)
}
override fun onResourceReady(uid: String, resource: Drawable) {
if (holder.boundResourceUid != uid) return
holder.imageLoaderProgress.isVisible = false
// Glide mess up the view size :/
holder.touchImageView.updateLayoutParams {
width = LinearLayout.LayoutParams.MATCH_PARENT
height = LinearLayout.LayoutParams.MATCH_PARENT
}
holder.touchImageView.setImageDrawable(resource)
if (resource is Animatable) {
resource.start()
}
}
internal class ZoomableImageTarget(val holder: ZoomableImageViewHolder, private val contextView: ImageView) : ImageLoaderTarget {
override fun contextView() = contextView
override fun onResourceLoading(uid: String, placeholder: Drawable?) {
if (holder.boundResourceUid != uid) return
holder.imageLoaderProgress.isVisible = true
holder.touchImageView.setImageDrawable(placeholder)
}
override fun onLoadFailed(uid: String, errorDrawable: Drawable?) {
if (holder.boundResourceUid != uid) return
holder.imageLoaderProgress.isVisible = false
holder.touchImageView.setImageDrawable(errorDrawable)
}
override fun onResourceCleared(uid: String, placeholder: Drawable?) {
if (holder.boundResourceUid != uid) return
holder.touchImageView.setImageDrawable(placeholder)
}
override fun onResourceReady(uid: String, resource: Drawable) {
if (holder.boundResourceUid != uid) return
holder.imageLoaderProgress.isVisible = false
// Glide mess up the view size :/
holder.touchImageView.updateLayoutParams {
width = LinearLayout.LayoutParams.MATCH_PARENT
height = LinearLayout.LayoutParams.MATCH_PARENT
}
holder.touchImageView.setImageDrawable(resource)
}
}
}

View File

@@ -0,0 +1,39 @@
/*
* Copyright (c) 2020 New Vector Ltd
* Copyright (C) 2018 stfalcon.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package im.vector.lib.attachmentviewer
sealed class SwipeDirection {
object NotDetected : SwipeDirection()
object Up : SwipeDirection()
object Down : SwipeDirection()
object Left : SwipeDirection()
object Right : SwipeDirection()
companion object {
fun fromAngle(angle: Double): SwipeDirection {
return when (angle) {
in 0.0..45.0 -> Right
in 45.0..135.0 -> Up
in 135.0..225.0 -> Left
in 225.0..315.0 -> Down
in 315.0..360.0 -> Right
else -> NotDetected
}
}
}
}

View File

@@ -0,0 +1,91 @@
/*
* Copyright (c) 2020 New Vector Ltd
* Copyright (C) 2018 stfalcon.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package im.vector.lib.attachmentviewer
import android.content.Context
import android.view.MotionEvent
import kotlin.math.sqrt
class SwipeDirectionDetector(
context: Context,
private val onDirectionDetected: (SwipeDirection) -> Unit
) {
private val touchSlop: Int = android.view.ViewConfiguration.get(context).scaledTouchSlop
private var startX: Float = 0f
private var startY: Float = 0f
private var isDetected: Boolean = false
fun handleTouchEvent(event: MotionEvent) {
when (event.action) {
MotionEvent.ACTION_DOWN -> {
startX = event.x
startY = event.y
}
MotionEvent.ACTION_CANCEL, MotionEvent.ACTION_UP -> {
if (!isDetected) {
onDirectionDetected(SwipeDirection.NotDetected)
}
startY = 0.0f
startX = startY
isDetected = false
}
MotionEvent.ACTION_MOVE -> if (!isDetected && getEventDistance(event) > touchSlop) {
isDetected = true
onDirectionDetected(getDirection(startX, startY, event.x, event.y))
}
}
}
/**
* Given two points in the plane p1=(x1, x2) and p2=(y1, y1), this method
* returns the direction that an arrow pointing from p1 to p2 would have.
*
* @param x1 the x position of the first point
* @param y1 the y position of the first point
* @param x2 the x position of the second point
* @param y2 the y position of the second point
* @return the direction
*/
private fun getDirection(x1: Float, y1: Float, x2: Float, y2: Float): SwipeDirection {
val angle = getAngle(x1, y1, x2, y2)
return SwipeDirection.fromAngle(angle)
}
/**
* Finds the angle between two points in the plane (x1,y1) and (x2, y2)
* The angle is measured with 0/360 being the X-axis to the right, angles
* increase counter clockwise.
*
* @param x1 the x position of the first point
* @param y1 the y position of the first point
* @param x2 the x position of the second point
* @param y2 the y position of the second point
* @return the angle between two points
*/
private fun getAngle(x1: Float, y1: Float, x2: Float, y2: Float): Double {
val rad = Math.atan2((y1 - y2).toDouble(), (x2 - x1).toDouble()) + Math.PI
return (rad * 180 / Math.PI + 180) % 360
}
private fun getEventDistance(ev: MotionEvent): Float {
val dx = ev.getX(0) - startX
val dy = ev.getY(0) - startY
return sqrt((dx * dx + dy * dy).toDouble()).toFloat()
}
}

View File

@@ -0,0 +1,126 @@
/*
* Copyright (c) 2020 New Vector Ltd
* Copyright (C) 2018 stfalcon.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package im.vector.lib.attachmentviewer
import android.animation.Animator
import android.animation.AnimatorListenerAdapter
import android.annotation.SuppressLint
import android.graphics.Rect
import android.view.MotionEvent
import android.view.View
import android.view.ViewPropertyAnimator
import android.view.animation.AccelerateInterpolator
class SwipeToDismissHandler(
private val swipeView: View,
private val onDismiss: () -> Unit,
private val onSwipeViewMove: (translationY: Float, translationLimit: Int) -> Unit,
private val shouldAnimateDismiss: () -> Boolean
) : View.OnTouchListener {
companion object {
private const val ANIMATION_DURATION = 200L
}
var translationLimit: Int = swipeView.height / 4
private var isTracking = false
private var startY: Float = 0f
@SuppressLint("ClickableViewAccessibility")
override fun onTouch(v: View, event: MotionEvent): Boolean {
when (event.action) {
MotionEvent.ACTION_DOWN -> {
if (swipeView.hitRect.contains(event.x.toInt(), event.y.toInt())) {
isTracking = true
}
startY = event.y
return true
}
MotionEvent.ACTION_UP, MotionEvent.ACTION_CANCEL -> {
if (isTracking) {
isTracking = false
onTrackingEnd(v.height)
}
return true
}
MotionEvent.ACTION_MOVE -> {
if (isTracking) {
val translationY = event.y - startY
swipeView.translationY = translationY
onSwipeViewMove(translationY, translationLimit)
}
return true
}
else -> {
return false
}
}
}
internal fun initiateDismissToBottom() {
animateTranslation(swipeView.height.toFloat())
}
private fun onTrackingEnd(parentHeight: Int) {
val animateTo = when {
swipeView.translationY < -translationLimit -> -parentHeight.toFloat()
swipeView.translationY > translationLimit -> parentHeight.toFloat()
else -> 0f
}
if (animateTo != 0f && !shouldAnimateDismiss()) {
onDismiss()
} else {
animateTranslation(animateTo)
}
}
private fun animateTranslation(translationTo: Float) {
swipeView.animate()
.translationY(translationTo)
.setDuration(ANIMATION_DURATION)
.setInterpolator(AccelerateInterpolator())
.setUpdateListener { onSwipeViewMove(swipeView.translationY, translationLimit) }
.setAnimatorListener(onAnimationEnd = {
if (translationTo != 0f) {
onDismiss()
}
// remove the update listener, otherwise it will be saved on the next animation execution:
swipeView.animate().setUpdateListener(null)
})
.start()
}
}
internal fun ViewPropertyAnimator.setAnimatorListener(
onAnimationEnd: ((Animator?) -> Unit)? = null,
onAnimationStart: ((Animator?) -> Unit)? = null
) = this.setListener(
object : AnimatorListenerAdapter() {
override fun onAnimationEnd(animation: Animator?) {
onAnimationEnd?.invoke(animation)
}
override fun onAnimationStart(animation: Animator?) {
onAnimationStart?.invoke(animation)
}
})
internal val View?.hitRect: Rect
get() = Rect().also { this?.getHitRect(it) }

View File

@@ -0,0 +1,89 @@
/*
* Copyright (c) 2020 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package im.vector.lib.attachmentviewer
import android.graphics.drawable.Drawable
import android.widget.ImageView
import androidx.core.view.isVisible
import java.io.File
interface VideoLoaderTarget {
fun contextView(): ImageView
fun onThumbnailResourceLoading(uid: String, placeholder: Drawable?)
fun onThumbnailLoadFailed(uid: String, errorDrawable: Drawable?)
fun onThumbnailResourceCleared(uid: String, placeholder: Drawable?)
fun onThumbnailResourceReady(uid: String, resource: Drawable)
fun onVideoFileLoading(uid: String)
fun onVideoFileLoadFailed(uid: String)
fun onVideoFileReady(uid: String, file: File)
fun onVideoURLReady(uid: String, path: String)
}
internal class DefaultVideoLoaderTarget(val holder: VideoViewHolder, private val contextView: ImageView) : VideoLoaderTarget {
override fun contextView(): ImageView = contextView
override fun onThumbnailResourceLoading(uid: String, placeholder: Drawable?) {
}
override fun onThumbnailLoadFailed(uid: String, errorDrawable: Drawable?) {
}
override fun onThumbnailResourceCleared(uid: String, placeholder: Drawable?) {
if (holder.boundResourceUid != uid) return
holder.thumbnailImage.setImageDrawable(placeholder)
}
override fun onThumbnailResourceReady(uid: String, resource: Drawable) {
if (holder.boundResourceUid != uid) return
holder.thumbnailImage.setImageDrawable(resource)
}
override fun onVideoFileLoading(uid: String) {
if (holder.boundResourceUid != uid) return
holder.thumbnailImage.isVisible = true
holder.loaderProgressBar.isVisible = true
holder.videoView.isVisible = false
}
override fun onVideoFileLoadFailed(uid: String) {
if (holder.boundResourceUid != uid) return
holder.videoFileLoadError()
}
override fun onVideoFileReady(uid: String, file: File) {
if (holder.boundResourceUid != uid) return
arrangeForVideoReady()
holder.videoReady(file)
}
override fun onVideoURLReady(uid: String, path: String) {
if (holder.boundResourceUid != uid) return
arrangeForVideoReady()
holder.videoReady(path)
}
private fun arrangeForVideoReady() {
holder.thumbnailImage.isVisible = false
holder.loaderProgressBar.isVisible = false
holder.videoView.isVisible = true
}
}

View File

@@ -0,0 +1,170 @@
/*
* Copyright (c) 2020 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package im.vector.lib.attachmentviewer
import android.util.Log
import android.view.View
import android.widget.ImageView
import android.widget.ProgressBar
import android.widget.TextView
import android.widget.VideoView
import androidx.core.view.isVisible
import io.reactivex.Observable
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.disposables.Disposable
import java.io.File
import java.lang.ref.WeakReference
import java.util.concurrent.TimeUnit
// TODO, it would be probably better to use a unique media player
// for better customization and control
// But for now VideoView is enough, it released player when detached, we use a timer to update progress
class VideoViewHolder constructor(itemView: View) :
BaseViewHolder(itemView) {
private var isSelected = false
private var mVideoPath: String? = null
private var progressDisposable: Disposable? = null
private var progress: Int = 0
private var wasPaused = false
var eventListener: WeakReference<AttachmentEventListener>? = null
val thumbnailImage: ImageView = itemView.findViewById(R.id.videoThumbnailImage)
val videoView: VideoView = itemView.findViewById(R.id.videoView)
val loaderProgressBar: ProgressBar = itemView.findViewById(R.id.videoLoaderProgress)
val videoControlIcon: ImageView = itemView.findViewById(R.id.videoControlIcon)
val errorTextView: TextView = itemView.findViewById(R.id.videoMediaViewerErrorView)
internal val target = DefaultVideoLoaderTarget(this, thumbnailImage)
override fun onRecycled() {
super.onRecycled()
progressDisposable?.dispose()
progressDisposable = null
mVideoPath = null
}
fun videoReady(file: File) {
mVideoPath = file.path
if (isSelected) {
startPlaying()
}
}
fun videoReady(path: String) {
mVideoPath = path
if (isSelected) {
startPlaying()
}
}
fun videoFileLoadError() {
}
override fun entersBackground() {
if (videoView.isPlaying) {
progress = videoView.currentPosition
progressDisposable?.dispose()
progressDisposable = null
videoView.stopPlayback()
videoView.pause()
}
}
override fun entersForeground() {
onSelected(isSelected)
}
override fun onSelected(selected: Boolean) {
if (!selected) {
if (videoView.isPlaying) {
progress = videoView.currentPosition
videoView.stopPlayback()
} else {
progress = 0
}
progressDisposable?.dispose()
progressDisposable = null
} else {
if (mVideoPath != null) {
startPlaying()
}
}
isSelected = true
}
private fun startPlaying() {
thumbnailImage.isVisible = false
loaderProgressBar.isVisible = false
videoView.isVisible = true
videoView.setOnPreparedListener {
progressDisposable?.dispose()
progressDisposable = Observable.interval(100, TimeUnit.MILLISECONDS)
.timeInterval()
.observeOn(AndroidSchedulers.mainThread())
.subscribe {
val duration = videoView.duration
val progress = videoView.currentPosition
val isPlaying = videoView.isPlaying
// Log.v("FOO", "isPlaying $isPlaying $progress/$duration")
eventListener?.get()?.onEvent(AttachmentEvents.VideoEvent(isPlaying, progress, duration))
}
}
try {
videoView.setVideoPath(mVideoPath)
} catch (failure: Throwable) {
// Couldn't open
Log.v(VideoViewHolder::class.java.name, "Failed to start video")
}
if (!wasPaused) {
videoView.start()
if (progress > 0) {
videoView.seekTo(progress)
}
}
}
override fun handleCommand(commands: AttachmentCommands) {
if (!isSelected) return
when (commands) {
AttachmentCommands.StartVideo -> {
wasPaused = false
videoView.start()
}
AttachmentCommands.PauseVideo -> {
wasPaused = true
videoView.pause()
}
is AttachmentCommands.SeekTo -> {
val duration = videoView.duration
if (duration > 0) {
val seekDuration = duration * (commands.percentProgress / 100f)
videoView.seekTo(seekDuration.toInt())
}
}
}
}
override fun bind(attachmentInfo: AttachmentInfo) {
super.bind(attachmentInfo)
progress = 0
wasPaused = false
}
}

View File

@@ -0,0 +1,47 @@
/*
* Copyright (c) 2020 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package im.vector.lib.attachmentviewer
import android.view.View
import android.widget.ProgressBar
import com.github.chrisbanes.photoview.PhotoView
class ZoomableImageViewHolder constructor(itemView: View) :
BaseViewHolder(itemView) {
val touchImageView: PhotoView = itemView.findViewById(R.id.touchImageView)
val imageLoaderProgress: ProgressBar = itemView.findViewById(R.id.imageLoaderProgress)
init {
touchImageView.setAllowParentInterceptOnEdge(false)
touchImageView.setOnScaleChangeListener { scaleFactor, _, _ ->
// Log.v("ATTACHEMENTS", "scaleFactor $scaleFactor")
// It's a bit annoying but when you pitch down the scaling
// is not exactly one :/
touchImageView.setAllowParentInterceptOnEdge(scaleFactor <= 1.0008f)
}
touchImageView.setScale(1.0f, true)
touchImageView.setAllowParentInterceptOnEdge(true)
}
internal val target = DefaultImageLoaderTarget.ZoomableImageTarget(this, touchImageView)
override fun onRecycled() {
super.onRecycled()
touchImageView.setImageDrawable(null)
}
}

View File

@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/rootContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".AttachmentViewerActivity">
<View
android:id="@+id/backgroundView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:alpha="1"
android:background="@android:color/black" />
<FrameLayout
android:id="@+id/dismissContainer"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:id="@+id/transitionImageContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:ignore="UselessParent"
tools:visibility="invisible">
<ImageView
android:id="@+id/transitionImageView"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:ignore="ContentDescription" />
</FrameLayout>
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/attachmentPager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/transparent"
android:orientation="horizontal"
android:visibility="visible" />
</FrameLayout>
</FrameLayout>

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools">
<ImageView
android:id="@+id/imageView"
android:visibility="visible"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<ProgressBar
android:layout_centerInParent="true"
android:id="@+id/imageLoaderProgress"
style="?android:attr/progressBarStyle"
android:layout_width="40dp"
android:layout_height="40dp"
android:visibility="visible"
tools:visibility="gone" />
</RelativeLayout>

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools">
<com.github.chrisbanes.photoview.PhotoView
android:id="@+id/touchImageView"
android:visibility="visible"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<ProgressBar
android:layout_centerInParent="true"
android:id="@+id/imageLoaderProgress"
style="?android:attr/progressBarStyle"
android:layout_width="40dp"
android:layout_height="40dp"
android:visibility="visible"
tools:visibility="gone" />
</RelativeLayout>

View File

@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools">
<ImageView
android:id="@+id/videoThumbnailImage"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:scaleType="centerInside" />
<VideoView
android:id="@+id/videoView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true" />
<ImageView
android:id="@+id/videoControlIcon"
android:layout_centerInParent="true"
android:visibility="gone"
tools:visibility="visible"
android:layout_width="44dp"
android:layout_height="44dp"
/>
<ProgressBar
android:layout_centerInParent="true"
android:id="@+id/videoLoaderProgress"
style="?android:attr/progressBarStyle"
android:layout_width="40dp"
android:layout_height="40dp"
android:visibility="invisible"
tools:visibility="visible" />
<TextView
android:id="@+id/videoMediaViewerErrorView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_margin="16dp"
android:textSize="16sp"
android:visibility="gone"
tools:text="Error"
tools:visibility="visible" />
</RelativeLayout>

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/design_default_color_primary">
<TextView
android:id="@+id/testPage"
android:layout_centerInParent="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="1"
android:textSize="80sp"
android:textStyle="bold" />
</RelativeLayout>

View File

@@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.3.50'
ext.kotlin_version = '1.3.72'
repositories {
google()
jcenter()
@@ -10,12 +10,13 @@ buildscript {
}
}
dependencies {
// Warning: 3.6.3 leads to infinite gradle builds. Stick to 3.5.3 for the moment
classpath 'com.android.tools.build:gradle:3.5.3'
classpath 'com.google.gms:google-services:4.3.2'
classpath "com.airbnb.okreplay:gradle-plugin:1.5.0"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.7.1'
classpath 'com.google.android.gms:oss-licenses-plugin:0.9.5'
classpath 'com.google.android.gms:oss-licenses-plugin:0.10.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
@@ -34,6 +35,14 @@ allprojects {
includeGroupByRegex "com\\.github\\.jaiselrahman"
// And monarchy
includeGroupByRegex "com\\.github\\.Zhuinden"
// And ucrop
includeGroupByRegex "com\\.github\\.yalantis"
// JsonViewer
includeGroupByRegex 'com\\.github\\.BillCarsonFr'
// PhotoView
includeGroupByRegex 'com\\.github\\.chrisbanes'
// PFLockScreen-Android
includeGroupByRegex 'com\\.github\\.vector-im'
}
}
maven {
@@ -43,6 +52,12 @@ allprojects {
}
}
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
// Jitsi repo
maven {
url "https://github.com/vector-im/jitsi_libre_maven/raw/master/android-sdk-2.9.3"
// Note: to test Jitsi release you can use a local file like this:
// url "file:///Users/bmarty/workspaces/jitsi_libre_maven/android-sdk-2.9.3"
}
google()
jcenter()
}
@@ -66,15 +81,15 @@ apply plugin: 'org.sonarqube'
sonarqube {
properties {
property "sonar.projectName", "RiotX-Android"
property "sonar.projectKey", "vector.android.riotx"
property "sonar.projectName", "Element-Android"
property "sonar.projectKey", "im.vector.app.android"
property "sonar.host.url", "https://sonarcloud.io"
property "sonar.projectVersion", project(":vector").android.defaultConfig.versionName
property "sonar.sourceEncoding", "UTF-8"
property "sonar.links.homepage", "https://github.com/vector-im/riotX-android/"
property "sonar.links.ci", "https://buildkite.com/matrix-dot-org/riotx-android"
property "sonar.links.scm", "https://github.com/vector-im/riotX-android/"
property "sonar.links.issue", "https://github.com/vector-im/riotX-android/issues"
property "sonar.links.homepage", "https://github.com/vector-im/element-android/"
property "sonar.links.ci", "https://buildkite.com/matrix-dot-org/element-android"
property "sonar.links.scm", "https://github.com/vector-im/element-android/"
property "sonar.links.issue", "https://github.com/vector-im/element-android/issues"
property "sonar.organization", "new_vector_ltd_organization"
property "sonar.login", project.hasProperty("SONAR_LOGIN") ? SONAR_LOGIN : "invalid"
}
@@ -85,11 +100,18 @@ project(":vector") {
properties {
property "sonar.sources", project(":vector").android.sourceSets.main.java.srcDirs
// exclude source code from analyses separated by a colon (:)
// property "sonar.exclusions", "**/*.*"
// Exclude Java source
property "sonar.exclusions", "**/BugReporterMultipartBody.java"
}
}
}
project(":diff-match-patch") {
sonarqube {
skipProject = true
}
}
//project(":matrix-sdk-android") {
// sonarqube {
// properties {

285
docs/add_threePids.md Normal file
View File

@@ -0,0 +1,285 @@
# Adding and removing ThreePids to an account
## Add email
### User enter the email
> POST https://homeserver.org/_matrix/client/r0/account/3pid/email/requestToken
```json
{
"email": "alice@email-provider.org",
"client_secret": "TixzvOnw7nLEUdiQEmkHzkXKrY4HhiGh",
"send_attempt": 1
}
```
#### The email is already added to an account
400
```json
{
"errcode": "M_THREEPID_IN_USE",
"error": "Email is already in use"
}
```
#### The email is free
Wording: "We've sent you an email to verify your address. Please follow the instructions there and then click the button below."
200
```json
{
"sid": "bxyDHuJKsdkjMlTJ"
}
```
## User receive an e-mail
> [homeserver.org] Validate your email
>
> A request to add an email address to your Matrix account has been received. If this was you, please click the link below to confirm adding this email:
https://homeserver.org/_matrix/client/unstable/add_threepid/email/submit_token?token=WUnEhQAmJrXupdEbXgdWvnVIKaGYZFsU&client_secret=TixzvOnw7nLEUdiQEmkHzkXKrY4HhiGh&sid=bxyDHuJKsdkjMlTJ
>
> If this was not you, you can safely ignore this email. Thank you.
### User clicks on the link
The browser displays the following message:
> Your email has now been validated, please return to your client. You may now close this window.
### User returns on Element
User clicks on CONTINUE
> POST https://homeserver.org/_matrix/client/r0/account/3pid/add
```json
{
"sid": "bxyDHuJKsdkjMlTJ",
"client_secret": "TixzvOnw7nLEUdiQEmkHzkXKrY4HhiGh"
}
```
401 User Interactive Authentication
```json
{
"session": "ppvvnozXCQZFaggUBlHJYPjA",
"flows": [
{
"stages": [
"m.login.password"
]
}
],
"params": {
}
}
```
### User enters his password
POST https://homeserver.org/_matrix/client/r0/account/3pid/add
```json
{
"sid": "bxyDHuJKsdkjMlTJ",
"client_secret": "TixzvOnw7nLEUdiQEmkHzkXKrY4HhiGh",
"auth": {
"session": "ppvvnozXCQZFaggUBlHJYPjA",
"type": "m.login.password",
"user": "@benoitx:matrix.org",
"password": "weak_password"
}
}
```
#### The link has not been clicked
400
```json
{
"errcode": "M_THREEPID_AUTH_FAILED",
"error": "No validated 3pid session found"
}
```
#### Wrong password
401
```json
{
"session": "fXHOvoQsPMhEebVqTnIrzZJN",
"flows": [
{
"stages": [
"m.login.password"
]
}
],
"params": {
},
"completed":[
],
"error": "Invalid password",
"errcode": "M_FORBIDDEN"
}
```
#### The link has been clicked and the account password is correct
200
```json
{}
```
## Remove email
### User want to remove an email from his account
> POST https://homeserver.org/_matrix/client/r0/account/3pid/delete
```json
{
"medium": "email",
"address": "alice@email-provider.org"
}
```
#### Email was not bound to an identity server
200
```json
{
"id_server_unbind_result": "no-support"
}
```
#### Email was bound to an identity server
200
```json
{
"id_server_unbind_result": "success"
}
```
## Add phone number
> POST https://homeserver.org/_matrix/client/r0/account/3pid/msisdn/requestToken
```json
{
"country": "FR",
"phone_number": "611223344",
"client_secret": "f1K29wFZBEr4RZYatu7xj8nEbXiVpr7J",
"send_attempt": 1
}
```
Note that the phone number is sent without `+` and without the country code
#### The phone number is already added to an account
400
```json
{
"errcode": "M_THREEPID_IN_USE",
"error": "MSISDN is already in use"
}
```
#### The phone number is free
Wording: "A text message has been sent to +33611223344. Please enter the verification code it contains."
200
```json
{
"msisdn": "33651547677",
"intl_fmt": "+33 6 51 54 76 77",
"success": true,
"sid": "253299954",
"submit_url": "https://homeserver.org/_matrix/client/unstable/add_threepid/msisdn/submit_token"
}
```
## User receive a text message
> Riot
> Your Riot validation code is 892541, please enter this into the app
### User enter the code to the app
#### Wrong code
> POST https://homeserver.org/_matrix/client/unstable/add_threepid/msisdn/submit_token
```json
{
"sid": "253299954",
"client_secret": "f1K29wFZBEr4RZYatu7xj8nEbXiVpr7J",
"token": "111111"
}
```
400
```json
{
"errcode": "M_UNKNOWN",
"error": "Error contacting the identity server"
}
```
This is not an ideal, but the client will display a hint to check the entered code to the user.
#### Correct code
> POST https://homeserver.org/_matrix/client/unstable/add_threepid/msisdn/submit_token
```json
{
"sid": "253299954",
"client_secret": "f1K29wFZBEr4RZYatu7xj8nEbXiVpr7J",
"token": "892541"
}
```
200
```json
{
"success": true
}
```
Then the app call `https://homeserver.org/_matrix/client/r0/account/3pid/add` as per adding an email and follow the same UIS flow
## Remove phone number
### User wants to remove a phone number from his account
This is the same request and response than to remove email, but with this body:
```json
{
"medium": "msisdn",
"address": "33611223344"
}
```
Note that the phone number is provided without `+`, but with the country code.

92
docs/identity_server.md Normal file
View File

@@ -0,0 +1,92 @@
# Identity server
Issue: #607
PR: #1354
## Introduction
Identity Servers support contact discovery on Matrix by letting people look up Third Party Identifiers to see if the owner has publicly linked them with their Matrix ID.
## Implementation
The current implementation was Inspired by the code from Riot-Android.
Difference though (list not exhaustive):
- Only API v2 is supported (see https://matrix.org/docs/spec/identity_service/latest)
- Homeserver has to be up to date to support binding (Versions.isLoginAndRegistrationSupportedBySdk() has to return true)
- The SDK managed the session and client secret when binding ThreePid. Those data are not exposed to the client.
- The SDK supports incremental sendAttempt (this is not used by Element)
- The "Continue" button is now under the information, and not as the same place that the checkbox
- The app can cancel a binding. Current data are erased from DB.
- The API (IdentityService) is improved.
- A new DB to store data related to the identity server management.
Missing features (list not exhaustive):
- Invite by 3Pid (will be in a dedicated PR)
- Add email or phone to account (not P1, can be done on Element-Web)
- List email and phone of the account (could be done in a dedicated PR)
- Search contact (not P1)
- Logout from identity server when user sign out or deactivate his account.
## Related MSCs
The list can be found here: https://matrix.org/blog/2019/09/27/privacy-improvements-in-synapse-1-4-and-riot-1-4
## Steps and requirements
- Only one identity server by account can be set. The user's choice is stored in account data with key `m.identity_server`. But every clients will managed its own token to log in to the identity server
```json
{
"type": "m.identity_server",
"content": {
"base_url": "https://matrix.org"
}
}
```
- The accepted terms are stored in the account data:
```json
{
"type": "m.accepted_terms",
"content": {
"accepted": [
"https://vector.im/identity-server-privacy-notice-1"
]
}
}
```
- Default identity server URL, from Wellknown data is proposed to the user.
- Identity server can be set
- Identity server can be changed on another user's device, so when the change is detected (thanks to account data sync) Element should properly disconnect from a previous identity server (I think it was not the case in Riot-Android, where we keep the token forever)
- Registration to the identity server is managed with an openId token
- Terms of service can be accepted when configuring the identity server.
- Terms of service can be accepted after, if they change.
- Identity server can be modified
- Identity server can be disconnected with a warning dialog, with special content if there are current bound 3pid on this identity server.
- Email can be bound
- Email can be unbound
- Phone can be bound
- Phone can be unbound
- Look up can be performed, to get matrixIds from local contact book (phone and email): Android permission correctly handled (not done yet)
- Look up pepper can be updated if it is rotated on the identity server
- Invitation using 3PID can be done (See #548) (not done yet)
- Homeserver access-token will never be sent to an identity server
- When user sign-out: logout from the identity server if any.
- When user deactivate account: logout from the identity server if any.
## Screens
### Settings
Identity server settings can be accessed from the internal setting of the application, both from "Discovery" section and from identity detail section.
### Discovery screen
This screen displays the identity server configuration and the binding of the user's ThreePid (email and msisdn). This is the main screen of the feature.
### Set identity server screen
This screen is a form to set a new identity server URL
## Ref:
- https://matrix.org/blog/2019/09/27/privacy-improvements-in-synapse-1-4-and-riot-1-4 is a good summary of the role of an Identity server and the proper way to configure and use it in respect to the privacy and the consent of the user.
- API documentation: https://matrix.org/docs/spec/identity_service/latest
- vector.im TOS: https://vector.im/identity-server-privacy-notice

103
docs/integration_tests.md Normal file
View File

@@ -0,0 +1,103 @@
# Integration tests
Integration tests are useful to ensure that the code works well for any use cases.
They can also be used as sample on how to use the Matrix SDK.
In a ideal world, every API of the SDK should be covered by integration tests. For the moment, we have test mainly for the Crypto part, which is the tricky part. But it covers quite a lot of features: accounts creation, login to existing account, send encrypted messages, keys backup, verification, etc.
The Matrix SDK is able to open multiple sessions, for the same user, of for different users. This way we can test communication between several sessions on a single device.
## Pre requirements
Integration tests need a homeserver running on localhost.
The documentation describes what we do to have one, using [Synapse](https://github.com/matrix-org/synapse/), which is the Matrix reference homeserver.
## Install and run Synapse
Steps:
- Install virtualenv
```bash
python3 -m pip install virtualenv
```
- Clone Synapse repository
```bash
git clone -b develop https://github.com/matrix-org/synapse.git
```
or
```bash
git clone -b develop git@github.com:matrix-org/synapse.git
```
You should have the develop branch cloned by default.
- Run synapse, from the Synapse folder you just cloned
```bash
virtualenv -p python3 env
source env/bin/activate
pip install -e .
demo/start.sh --no-rate-limit
```
Alternatively, to install the latest Synapse release package (and not a cloned branch) you can run the following instead of `pip install -e .`:
```bash
pip install matrix-synapse
```
You should now have 3 running federated Synapse instances 🎉, at http://127.0.0.1:8080/, http://127.0.0.1:8081/ and http://127.0.0.1:8082/, which should display a "It Works! Synapse is running" message.
## Run the test
It's recommended to run tests using an Android Emulator and not a real device. First reason for that is that the tests will use http://10.0.2.2:8080 to connect to Synapse, which run locally on your machine.
You can run all the tests in the `androidTest` folders.
It can be done using this command:
```bash
./gradlew vector:connectedAndroidTest matrix-sdk-android:connectedAndroidTest
```
## Stop Synapse
To stop Synapse, you can run the following commands:
```bash
./demo/stop.sh
```
And you can deactivate the virtualenv:
```bash
deactivate
```
## Troubleshoot
You'll need python3 to be able to run synapse
### Android Emulator does cannot reach the homeserver
Try on the Emulator browser to open "http://10.0.2.2:8080". You should see the "Synapse is running" message.
### virtualenv command fails
You can try using
```bash
python3 -m venv env
```
or
```bash
python3 -m virtualenv env
```
instead of
```bash
virtualenv -p python3 env
```

82
docs/jitsi.md Normal file
View File

@@ -0,0 +1,82 @@
# Jitsi in Element Android
Native Jitsi support has been added to Element Android by the PR [#1914](https://github.com/vector-im/element-android/pull/1914). The description of the PR contains some documentation about the behaviour in each possible room configuration.
Also, ensure to have a look on [the documentation from Element Web](https://github.com/vector-im/element-web/blob/develop/docs/jitsi.md)
The official documentation about how to integrate the Jitsi SDK in an Android app is available here: https://jitsi.github.io/handbook/docs/dev-guide/dev-guide-android-sdk.
# Native Jitsi SDK
The Jitsi SDK is built by ourselves with the flag LIBRE_BUILD, to be able to be integrated on the F-Droid version of Element Android.
The generated maven repository is then host in the project https://github.com/vector-im/jitsi_libre_maven
## How to build the Jitsi Meet SDK
### Jitsi version
Update the script `./tools/jitsi/build_jisti_libs.sh` with the tag of the project `https://github.com/jitsi/jitsi-meet`.
Currently we are building the version with the tag `android-sdk-2.9.3`.
### Run the build script
At the root of the Element Android, run the following script:
```shell script
./tools/jitsi/build_jisti_libs.sh
```
It will build the Jitsi Meet Android library and put every generated files in the folder `/tmp/jitsi`
### Link with the new generated library
- Update the file `./build.gradle` to use the previously created local Maven repository. Currently we have this line:
```groovy
url "https://github.com/vector-im/jitsi_libre_maven/raw/master/android-sdk-2.9.3"
```
You can uncomment and update the line starting with `// url "file://...` and comment the line starting with `url`, to test the library using the locally generated Maven repository.
- Update the dependency of the WebRTC library in the file `./matrix-sdk-android/build.gradle`. Currently we have this line:
```groovy
implementation('com.facebook.react:react-native-webrtc:1.84.0-jitsi-5112273@aar')
```
- Update the dependency of the Jitsi Meet library in the file `./vector/build.gradle`. Currently we have this line:
```groovy
implementation('org.jitsi.react:jitsi-meet-sdk:2.9.3') { transitive = true }
```
- Perform a gradle sync and build the project
- Perform test
### Sanity tests
In order to validate that the upgrade of the Jitsi and WebRTC dependency does not break anything, the following sanity tests have to be performed, using two devices:
- Make 1-1 audio call (so using WebRTC)
- Make 1-1 video call (so using WebRTC)
- Create and join a conference call with audio only (so using Jitsi library). Leave the conference. Join it again.
- Create and join a conference call with audio and video (so using Jitsi library) Leave the conference. Join it again.
### Export the build library
If all the tests are passed, you can export the generated Jitsi library to our Maven repository.
- Clone the project https://github.com/vector-im/jitsi_libre_maven.
- Create a new folder with the version name.
- Copy every generated files form `/tmp/jitsi` to the folder you have just created.
- Commit and push the change on https://github.com/vector-im/jitsi_libre_maven.
- Update the file `./build.gradle` to use the previously created Maven repository. Currently we have this line:
```groovy
url "https://github.com/vector-im/jitsi_libre_maven/raw/master/android-sdk-2.9.3"
```
- Build the project and perform the sanity tests again.
- Update the file `/CANGES.md` to notify about the library upgrade, and create a regular PR for project Element Android.

View File

@@ -1,4 +1,4 @@
This document aims to describe how RiotX android displays notifications to the end user. It also clarifies notifications and background settings in the app.
This document aims to describe how Element android displays notifications to the end user. It also clarifies notifications and background settings in the app.
# Table of Contents
1. [Prerequisites Knowledge](#prerequisites-knowledge)
@@ -9,7 +9,7 @@ This document aims to describe how RiotX android displays notifications to the e
* [How does the Home Server knows when to notify a client?](#how-does-the-home-server-knows-when-to-notify-a-client)
* [Push vs privacy, and mitigation](#push-vs-privacy-and-mitigation)
* [Background processing limitations](#background-processing-limitations)
2. [RiotX Notification implementations](#riotx-notification-implementations)
2. [Element Notification implementations](#element-notification-implementations)
* [Requirements](#requirements)
* [Foreground sync mode (Gplay & F-Droid)](#foreground-sync-mode-gplay-f-droid)
* [Push (FCM) received in background](#push-fcm-received-in-background)
@@ -38,10 +38,10 @@ When the client receives the new information, it immediately sends another reque
This effectively emulates a server push feature.
The HTTP long Polling can be fine tuned in the **SDK** using two parameters:
* timout (Sync request timeout)
* timeout (Sync request timeout)
* delay (Delay between each sync)
**timeout** is a server paramter, defined by:
**timeout** is a server parameter, defined by:
```
The maximum time to wait, in milliseconds, before returning this request.`
If no events (or other data) become available before this time elapses, the server will return a response with empty fields.
@@ -50,7 +50,7 @@ By default, this is 0, so the server will return immediately even if the respons
**delay** is a client preference. When the server responds to a sync request, the client waits for `delay`before calling a new sync.
When the RiotX Android app is open (i.e in foreground state), the default timeout is 30 seconds, and delay is 0.
When the Element Android app is open (i.e in foreground state), the default timeout is 30 seconds, and delay is 0.
## How does a mobile app receives push notification
@@ -86,7 +86,7 @@ This need some disambiguation, because it is the source of common confusion:
In order to send a push to a mobile, App developers need to have a server that will use the FCM APIs, and these APIs requires authentication!
This server is called a **Push Gateway** in the matrix world
That means that RiotX Android, a matrix client created by New Vector, is using a **Push Gateway** with the needed credentials (FCM API secret Key) in order to send push to the New Vector client.
That means that Element Android, a matrix client created by New Vector, is using a **Push Gateway** with the needed credentials (FCM API secret Key) in order to send push to the New Vector client.
If you create your own matrix client, you will also need to deploy an instance of a **Push Gateway** with the credentials needed to use FCM for your app.
@@ -132,7 +132,7 @@ A Home Server can be configured with default rules (for Direct messages, group m
There are different kind of push rules, it can be per room (each new message on this room should be notified), it can also define a pattern that a message should match (when you are mentioned, or key word based).
Notifications have 2 'levels' (`highlighted = true/false sound = default/custom`). In RiotX these notifications level are reflected as Noisy/Silent.
Notifications have 2 'levels' (`highlighted = true/false sound = default/custom`). In Element these notifications level are reflected as Noisy/Silent.
**What about encrypted messages?**
@@ -158,7 +158,7 @@ In a nutshell, apps can't do much in background now.
If the devices is not plugged and stays IDLE for a certain amount of time, radio (mobile connectivity) and CPU can/will be turned off.
For an application like RiotX, where users can receive important information at anytime, the best option is to rely on a push system (Google's Firebase Message a.k.a FCM). FCM high priority push can wake up the device and whitelist an application to perform background task (for a limited but unspecified amount of time).
For an application like Element, where users can receive important information at anytime, the best option is to rely on a push system (Google's Firebase Message a.k.a FCM). FCM high priority push can wake up the device and whitelist an application to perform background task (for a limited but unspecified amount of time).
Notice that this is still evolving, and in future versions application that has been 'background restricted' by users won't be able to wake up even when a high priority push is received. Also high priority notifications could be rate limited (not defined anywhere)
@@ -167,41 +167,41 @@ The documentation on this subject is vague, and as per our experiments not alway
It is getting more and more complex to have reliable notifications when FCM is not used.
# RiotX Notification implementations
# Element Notification implementations
## Requirements
RiotX Android must work with and without FCM.
* The RiotX android app published on F-Droid do not rely on FCM (all related dependencies are not present)
* The RiotX android app published on google play rely on FCM, with a fallback mode when FCM registration has failed (e.g outdated or missing Google Play Services)
Element Android must work with and without FCM.
* The Element android app published on F-Droid do not rely on FCM (all related dependencies are not present)
* The Element android app published on google play rely on FCM, with a fallback mode when FCM registration has failed (e.g outdated or missing Google Play Services)
## Foreground sync mode (Gplay & F-Droid)
When in foreground, RiotX performs sync continuously with a timeout value set to 10 seconds (see HttpPooling).
When in foreground, Element performs sync continuously with a timeout value set to 10 seconds (see HttpPooling).
As this mode does not need to live beyond the scope of the application, and as per Google recommendation, RiotX uses the internal app resources (Thread and Timers) to perform the syncs.
As this mode does not need to live beyond the scope of the application, and as per Google recommendation, Element uses the internal app resources (Thread and Timers) to perform the syncs.
This mode is turned on when the app enters foreground, and off when enters background.
In background, and depending on wether push is available or not, RiotX will use different methods to perform the syncs (Workers / Alarms / Service)
In background, and depending on wether push is available or not, Element will use different methods to perform the syncs (Workers / Alarms / Service)
## Push (FCM) received in background
In order to enable Push, RiotX must first get a push token from the firebase SDK, then register a pusher with this token on the HomeServer.
In order to enable Push, Element must first get a push token from the firebase SDK, then register a pusher with this token on the HomeServer.
When a message should be notified to a user, the user's homeserver notifies the registered `push gateway` for RiotX, that is [sygnal](https://github.com/matrix-org/sygnal) _- The reference implementation for push gateways -_ hosted by matrix.org.
When a message should be notified to a user, the user's homeserver notifies the registered `push gateway` for Element, that is [sygnal](https://github.com/matrix-org/sygnal) _- The reference implementation for push gateways -_ hosted by matrix.org.
This sygnal instance is configured with the required FCM API authentication token, and will then use the FCM API in order to notify the user's device running riotX.
This sygnal instance is configured with the required FCM API authentication token, and will then use the FCM API in order to notify the user's device running Element.
```
Homeserver ----> Sygnal (configured for RiotX) ----> FCM ----> RiotX
Homeserver ----> Sygnal (configured for Element) ----> FCM ----> Element
```
The push gateway is configured to only send `(eventId,roomId)` in the push payload (for better [privacy](#push-vs-privacy-and-mitigation)).
RiotX needs then to synchronise with the user's HomeServer, in order to resolve the event and create a notification.
Element needs then to synchronise with the user's HomeServer, in order to resolve the event and create a notification.
As per [Google recommendation](https://android-developers.googleblog.com/2018/09/notifying-your-users-with-fcm.html), RiotX will then use the WorkManager API in order to trigger a background sync.
As per [Google recommendation](https://android-developers.googleblog.com/2018/09/notifying-your-users-with-fcm.html), Element will then use the WorkManager API in order to trigger a background sync.
**Google recommendations:**
> We recommend using FCM messages in combination with the WorkManager 1 or JobScheduler API
@@ -209,7 +209,7 @@ As per [Google recommendation](https://android-developers.googleblog.com/2018/09
> Avoid background services. One common pitfall is using a background service to fetch data in the FCM message handler, since background service will be stopped by the system per recent changes to Google Play Policy
```
Homeserver ----> Sygnal ----> FCM ----> RiotX
Homeserver ----> Sygnal ----> FCM ----> Element
(Sync) ----> Homeserver
<----
Display notification
@@ -217,24 +217,24 @@ Homeserver ----> Sygnal ----> FCM ----> RiotX
**Possible outcomes**
Upon reception of the FCM push, RiotX will perform a sync call to the Home Server, during this process it is possible that:
Upon reception of the FCM push, Element will perform a sync call to the Home Server, during this process it is possible that:
* Happy path, the sync is performed, the message resolved and displayed in the notification drawer
* The notified message is not in the sync. Can happen if a lot of things did happen since the push (`gappy sync`)
* The sync generates additional notifications (e.g an encrypted message where the user is mentioned detected locally)
* The sync takes too long and the process is killed before completion, or network is not reliable and the sync fails.
RiotX implements several strategies in these cases (TODO document)
Element implements several strategies in these cases (TODO document)
## FCM Fallback mode
It is possible that RiotX is not able to get a FCM push token.
It is possible that Element is not able to get a FCM push token.
Common errors (amoung several others) that can cause that:
* Google Play Services is outdated
* Google Play Service fails in someways with FCM servers (infamous `SERVICE_NOT_AVAILABLE`)
If RiotX is able to detect one of this cases, it will notifies it to the users and when possible help him fix it via a dedicated troubleshoot screen.
If Element is able to detect one of this cases, it will notifies it to the users and when possible help him fix it via a dedicated troubleshoot screen.
Meanwhile, in order to offer a minimal service, and as per Google's recommendation for background activities, RiotX will launch periodic background sync in order to stays in sync with servers.
Meanwhile, in order to offer a minimal service, and as per Google's recommendation for background activities, Element will launch periodic background sync in order to stays in sync with servers.
The fallback mode is impacted by all the battery life saving mechanism implemented by android. Meaning that if the app is not used for a certain amount of time (`App-Standby`), or the device stays still and unplugged (`Light Doze`) , the sync will become less frequent.
@@ -248,7 +248,7 @@ The fallback mode is supposed to be a temporary state waiting for the user to fi
## F-Droid background Mode
The F-Droid RiotX flavor has no dependencies to FCM, therefore cannot relies on Push.
The F-Droid Element flavor has no dependencies to FCM, therefore cannot relies on Push.
Also Google's recommended background processing method cannot be applied. This is because all of these methods are affected by IDLE modes, and will result on the user not being notified at all when the app is in a Doze mode (only in maintenance windows that could happens only after hours).
@@ -262,7 +262,7 @@ F-Droid version will schedule alarms that will then trigger a Broadcast Receiver
Depending on the system status (or device make), it is still possible that the app is not given enough time to launch the service, or that the radio is still turned off thus preventing the sync to success (that's why Alarms are not recommended for network related tasks).
That is why on RiotX F-Droid, the broadcast receiver will acquire a temporary WAKE_LOCK for several seconds (thus securing cpu/network), and launch the service in foreground. The service performs the sync.
That is why on Element F-Droid, the broadcast receiver will acquire a temporary WAKE_LOCK for several seconds (thus securing cpu/network), and launch the service in foreground. The service performs the sync.
Note that foreground services require to put a notification informing the user that the app is doing something even if not launched).

View File

@@ -2,13 +2,15 @@
This document describes the flow of signin to a homeserver, and also the flow when user want to reset his password. Examples come from the `matrix.org` homeserver.
## Sign up flows
## Sign in flows
### Get the flow
Client request the sign-in flows, once the homeserver is chosen by the user and its url is known (in the example it's `https://matrix.org`)
> curl -X GET 'https://matrix.org/_matrix/client/r0/login'
```shell script
curl -X GET 'https://matrix.org/_matrix/client/r0/login'
```
200
@@ -26,7 +28,9 @@ Client request the sign-in flows, once the homeserver is chosen by the user and
The user is able to connect using `m.login.password`
> curl -X POST --data $'{"identifier":{"type":"m.id.user","user":"alice"},"password":"weak_password","type":"m.login.password","initial_device_display_name":"Portable"}' 'https://matrix.org/_matrix/client/r0/login'
```shell script
curl -X POST --data $'{"identifier":{"type":"m.id.user","user":"alice"},"password":"weak_password","type":"m.login.password","initial_device_display_name":"Portable"}' 'https://matrix.org/_matrix/client/r0/login'
```
```json
{
@@ -57,8 +61,8 @@ We get credential (200)
```json
{
"user_id": "@benoit0816:matrix.org",
"access_token": "MDAxOGxvY2F0aW9uIG1hdHREDACTEDb2l0MDgxNjptYXRyaXgub3JnCjAwMTZjaWQgdHlwZSA9IGFjY2VzcwowMDIxY2lkIG5vbmNlID0gfnYrSypfdTtkNXIuNWx1KgowMDJmc2lnbmF0dXJlIOsh1XqeAkXexh4qcofl_aR4kHJoSOWYGOhE7-ubX-DZCg",
"user_id": "@alice:matrix.org",
"access_token": "MDAxOGxvY2F0aW9uIG1hdHREDACTEDb2l0MDgxNjptYXRyaXgub3JnCjAwMTZjaWQgdHlwZSA9IGFjY2VzcwowMDIxY2lr",
"home_server": "matrix.org",
"device_id": "GTVREDALBF",
"well_known": {
@@ -73,14 +77,16 @@ We get credential (200)
If the user has associated an email with its account, he can signin using the email.
> curl -X POST --data $'{"identifier":{"type":"m.id.thirdparty","medium":"email","address":"alice@yopmail.com"},"password":"weak_password","type":"m.login.password","initial_device_display_name":"Portable"}' 'https://matrix.org/_matrix/client/r0/login'
```shell script
curl -X POST --data $'{"identifier":{"type":"m.id.thirdparty","medium":"email","address":"alice@email-provider.org"},"password":"weak_password","type":"m.login.password","initial_device_display_name":"Portable"}' 'https://matrix.org/_matrix/client/r0/login'
```
```json
{
"identifier": {
"type": "m.id.thirdparty",
"medium": "email",
"address": "alice@yopmail.com"
"address": "alice@email-provider.org"
},
"password": "weak_password",
"type": "m.login.password",
@@ -117,7 +123,7 @@ We get the credentials (200)
```json
{
"user_id": "@alice:matrix.org",
"access_token": "MDAxOGxvY2F0aW9uIG1hdHJpeC5vcmREDACTEDZXJfaWQgPSBAYmVub2l0MDgxNjptYXRyaXgub3JnCjAwMTZjaWQgdHlwZSA9IGFjY2VzcwowMDIxY2lkIG5vbmNlID0gNjtDY0MwRlNPSFFoOC5wOgowMDJmc2lnbmF0dXJlIGiTRm1mYLLxQywxOh3qzQVT8HoEorSokEP2u-bAwtnYCg",
"access_token": "MDAxOGxvY2F0aW9uIG1hdHJpeC5vcmREDACTEDZXJfaWQgPSBAYmVub2l0MDgxNjptYXRyaXgub3Jnfrfdegfszsefddvf",
"home_server": "matrix.org",
"device_id": "WBSREDASND",
"well_known": {
@@ -128,13 +134,17 @@ We get the credentials (200)
}
```
It's worth noting that the response from the homeserver contains the userId of Alice.
### Login with Msisdn
Not supported yet in RiotX
Not supported yet in Element
### Login with SSO
> curl -X GET 'https://homeserver.with.sso/_matrix/client/r0/login'
```shell script
curl -X GET 'https://homeserver.with.sso/_matrix/client/r0/login'
```
200
@@ -143,12 +153,61 @@ Not supported yet in RiotX
"flows": [
{
"type": "m.login.sso"
},
{
"type": "m.login.token"
}
]
}
```
In this case, the user can click on "Sign in with SSO" and the web screen will be displayed on the page `https://homeserver.with.sso/_matrix/static/client/login/` and the credentials will be passed back to the native code through the JS bridge
In this case, the user can click on "Sign in with SSO" and the native web browser, or a ChromeCustomTab if the device supports it, will be launched on the page
> https://homeserver.with.sso/_matrix/client/r0/login/sso/redirect?redirectUrl=element%3A%2F%element
The parameter `redirectUrl` is set to `element://element`.
ChromeCustomTabs are an intermediate way to display a WebPage, between a WebView and using the external browser. More info can be found [here](https://developer.chrome.com/multidevice/android/customtabs)
The browser will then take care of the SSO login, which may include creating a third party account, entering an email, settings a display name, or any other possibilities.
During the process, user may be asked to validate an email by clicking on a link it contains. The link has to be opened in the browser which initiates the authentication. This is why we cannot use WebView anymore.
Once the process is finished, the web page will call the `redirectUrl` with an extra parameter `loginToken`
> element://element?loginToken=MDAxOWxvY2F0aW9uIG1vemlsbGEub3JnCjAwMTNpZGVudGlmaWVy
This navigation is intercepted by Element by the `LoginActivity`, which will then ask the homeserver to convert this `loginToken` to an access token
```shell script
curl -X POST --data $'{"type":"m.login.token","token":"MDAxOWxvY2F0aW9uIG1vemlsbGEub3JnCjAwMTNpZGVudGlmaWVy"}' 'https://homeserver.with.sso/_matrix/client/r0/login'
```
```json
{
"type": "m.login.token",
"token": "MDAxOWxvY2F0aW9uIG1vemlsbGEub3JnCjAwMTNpZGVudGlmaWVy"
}
```
We get the credentials (200)
```json
{
"user_id": "@alice:homeserver.with.sso",
"access_token": "MDAxOWxvY2F0aW9uIG1vemlsbGEub3JnCjAwMTNpZGVudGlmaWVyIGtleQowMDEwY2lkIGdlbiA9IDEKMDAyY2NpZCB1c2",
"home_server": "homeserver.with.sso",
"device_id": "DETBTVAHCH",
"well_known": {
"m.homeserver": {
"base_url": "https:\/\/homeserver.with.sso\/"
},
"m.identity_server": {
"base_url": "https:\/\/vector.im"
}
}
}
```
## Reset password
@@ -165,7 +224,9 @@ We display a warning regarding e2e.
At the first step, we do not send the password, only the email and a client secret, generated by the application
> curl -X POST --data $'{"client_secret":"6c57f284-85e2-421b-8270-fb1795a120a7","send_attempt":0,"email":"user@domain.com"}' 'https://matrix.org/_matrix/client/r0/account/password/email/requestToken'
```shell script
curl -X POST --data $'{"client_secret":"6c57f284-85e2-421b-8270-fb1795a120a7","send_attempt":0,"email":"user@domain.com"}' 'https://matrix.org/_matrix/client/r0/account/password/email/requestToken'
```
```json
{
@@ -202,7 +263,9 @@ During this step, the new password is sent to the homeserver.
If the user confirms before the link is clicked, we get an error:
> curl -X POST --data $'{"auth":{"type":"m.login.email.identity","threepid_creds":{"client_secret":"6c57f284-85e2-421b-8270-fb1795a120a7","sid":"tQNbrREDACTEDldA"}},"new_password":"weak_password"}' 'https://matrix.org/_matrix/client/r0/account/password'
```shell script
curl -X POST --data $'{"auth":{"type":"m.login.email.identity","threepid_creds":{"client_secret":"6c57f284-85e2-421b-8270-fb1795a120a7","sid":"tQNbrREDACTEDldA"}},"new_password":"weak_password"}' 'https://matrix.org/_matrix/client/r0/account/password'
```
```json
{
@@ -236,7 +299,9 @@ It contains the client secret, a token and the sid
When the user click the link, if validate his ownership and the new password can now be ent by the application (on user demand):
> curl -X POST --data $'{"auth":{"type":"m.login.email.identity","threepid_creds":{"client_secret":"6c57f284-85e2-421b-8270-fb1795a120a7","sid":"tQNbrREDACTEDldA"}},"new_password":"weak_password"}' 'https://matrix.org/_matrix/client/r0/account/password'
```shell script
curl -X POST --data $'{"auth":{"type":"m.login.email.identity","threepid_creds":{"client_secret":"6c57f284-85e2-421b-8270-fb1795a120a7","sid":"tQNbrREDACTEDldA"}},"new_password":"weak_password"}' 'https://matrix.org/_matrix/client/r0/account/password'
```
```json
{

View File

@@ -10,7 +10,9 @@ This document describes the flow of registration to a homeserver. Examples come
Client request the sign-up flows, once the homeserver is chosen by the user and its url is known (in the example it's `https://matrix.org`)
> curl -X POST --data $'{}' 'https://matrix.org/_matrix/client/r0/register'
```shell script
curl -X POST --data $'{}' 'https://matrix.org/_matrix/client/r0/register'
```
```json
{
@@ -70,7 +72,9 @@ If the registration is not possible, we get a 403
The app is displaying a form to enter username and password.
> curl -X POST --data $'{"initial_device_display_name":"Mobile device","username":"alice","password": "weak_password"}' 'https://matrix.org/_matrix/client/r0/register'
```shell script
curl -X POST --data $'{"initial_device_display_name":"Mobile device","username":"alice","password": "weak_password"}' 'https://matrix.org/_matrix/client/r0/register'
```
```json
{
@@ -133,9 +137,11 @@ We get a 400:
### Step 2: entering email
User is proposed to enter an email. We skip this step.
User is proposed to enter an email. User skips this step.
> curl -X POST --data $'{"auth":{"session":"xptUYoREDACTEDogOWAGVnbJQ","type":"m.login.dummy"}}' 'https://matrix.org/_matrix/client/r0/register'
```shell script
curl -X POST --data $'{"auth":{"session":"xptUYoREDACTEDogOWAGVnbJQ","type":"m.login.dummy"}}' 'https://matrix.org/_matrix/client/r0/register'
```
```json
{
@@ -189,16 +195,18 @@ User is proposed to enter an email. We skip this step.
}
```
### Step 2 bis: we enter an email
### Step 2 bis: user enters an email
We request a token to the homeserver. The `client_secret` is generated by the application
> curl -X POST --data $'{"client_secret":"53e679ea-oRED-ACTED-92b8-3012c49c6cfa","email":"alice@yopmail.com","send_attempt":0}' 'https://matrix.org/_matrix/client/r0/register/email/requestToken'
```shell script
curl -X POST --data $'{"client_secret":"53e679ea-oRED-ACTED-92b8-3012c49c6cfa","email":"alice@email-provider.org","send_attempt":0}' 'https://matrix.org/_matrix/client/r0/register/email/requestToken'
```
```json
{
"client_secret": "53e679ea-oRED-ACTED-92b8-3012c49c6cfa",
"email": "alice@yopmail.com",
"email": "alice@email-provider.org",
"send_attempt": 0
}
```
@@ -213,7 +221,9 @@ We request a token to the homeserver. The `client_secret` is generated by the ap
And
> curl -X POST --data $'{"auth":{"threepid_creds":{"client_secret":"53e679ea-oRED-ACTED-92b8-3012c49c6cfa","sid":"qlBCREDACTEDEtgxD"},"session":"xptUYoREDACTEDogOWAGVnbJQ","type":"m.login.email.identity"}}' 'https://matrix.org/_matrix/client/r0/register'
```shell script
curl -X POST --data $'{"auth":{"threepid_creds":{"client_secret":"53e679ea-oRED-ACTED-92b8-3012c49c6cfa","sid":"qlBCREDACTEDEtgxD"},"session":"xptUYoREDACTEDogOWAGVnbJQ","type":"m.login.email.identity"}}' 'https://matrix.org/_matrix/client/r0/register'
```
```json
{
@@ -239,7 +249,9 @@ We get 401 since the email is not validated yet:
The app is now polling on
> curl -X POST --data $'{"auth":{"threepid_creds":{"client_secret":"53e679ea-oRED-ACTED-92b8-3012c49c6cfa","sid":"qlBCREDACTEDEtgxD"},"session":"xptUYoREDACTEDogOWAGVnbJQ","type":"m.login.email.identity"}}' 'https://matrix.org/_matrix/client/r0/register'
```shell script
curl -X POST --data $'{"auth":{"threepid_creds":{"client_secret":"53e679ea-oRED-ACTED-92b8-3012c49c6cfa","sid":"qlBCREDACTEDEtgxD"},"session":"xptUYoREDACTEDogOWAGVnbJQ","type":"m.login.email.identity"}}' 'https://matrix.org/_matrix/client/r0/register'
```
```json
{
@@ -254,7 +266,7 @@ The app is now polling on
}
```
We click on the link received by email `https://matrix.org/_matrix/client/unstable/registration/email/submit_token?token=vtQjQIZfwdoREDACTEDozrmKYSWlCXsJ&client_secret=53e679ea-oRED-ACTED-92b8-3012c49c6cfa&sid=qlBCREDACTEDEtgxD` which contains:
User clicks on the link received by email `https://matrix.org/_matrix/client/unstable/registration/email/submit_token?token=vtQjQIZfwdoREDACTEDozrmKYSWlCXsJ&client_secret=53e679ea-oRED-ACTED-92b8-3012c49c6cfa&sid=qlBCREDACTEDEtgxD` which contains:
- A `token` vtQjQIZfwdoREDACTEDozrmKYSWlCXsJ
- The `client_secret`: 53e679ea-oRED-ACTED-92b8-3012c49c6cfa
- A `sid`: qlBCREDACTEDEtgxD
@@ -306,7 +318,9 @@ Once the link is clicked, the registration request (polling) returns a 401 with
User is proposed to accept T&C and he accepts them
> curl -X POST --data $'{"auth":{"session":"xptUYoREDACTEDogOWAGVnbJQ","type":"m.login.terms"}}' 'https://matrix.org/_matrix/client/r0/register'
```shell script
curl -X POST --data $'{"auth":{"session":"xptUYoREDACTEDogOWAGVnbJQ","type":"m.login.terms"}}' 'https://matrix.org/_matrix/client/r0/register'
```
```json
{
@@ -365,7 +379,9 @@ User is proposed to accept T&C and he accepts them
User is proposed to prove he is not a robot and he does it:
> curl -X POST --data $'{"auth":{"response":"03AOLTBLSiGS9GhFDpAMblJ2nlXOmHXqAYJ5OvHCPUjiVLBef3k9snOYI_BDC32-t4D2jv-tpvkaiEI_uloobFd9RUTPpJ7con2hMddbKjSCYqXqcUQFhzhbcX6kw8uBnh2sbwBe80_ihrHGXEoACXQkL0ki1Q0uEtOeW20YBRjbNABsZPpLNZhGIWC0QVXnQ4FouAtZrl3gOAiyM-oG3cgP6M9pcANIAC_7T2P2amAHbtsTlSR9CsazNyS-rtDR9b5MywdtnWN9Aw8fTJb8cXQk_j7nvugMxzofPjSOrPKcr8h5OqPlpUCyxxnFtag6cuaPSUwh43D2L0E-ZX7djzaY2Yh_U2n6HegFNPOQ22CJmfrKwDlodmAfMPvAXyq77n3HpoREDACTEDo3830RHF4BfkGXUaZjctgg-A1mvC17hmQmQpkG7IhDqyw0onU-0vF_-ehCjq_CcQEDpS_O3uiHJaG5xGf-0rhLm57v_wA3deugbsZuO4uTuxZZycN_mKxZ97jlDVBetl9hc_5REPbhcT1w3uzTCSx7Q","session":"xptUYoREDACTEDogOWAGVnbJQ","type":"m.login.recaptcha"}}' 'https://matrix.org/_matrix/client/r0/register'
```shell script
curl -X POST --data $'{"auth":{"response":"03AOLTBLSiGS9GhFDpAMblJ2nlXOmHXqAYJ5OvHCPUjiVLBef3k9snOYI_BDC32-t4D2jv-tpvkaiEI_uloobFd9RUTPpJ7con2hMddbKjSCYqXqcUQFhzhbcX6kw8uBnh2sbwBe80_ihrHGXEoACXQkL0ki1Q0uEtOeW20YBRjbNABsZPpLNZhGIWC0QVXnQ4FouAtZrl3gOAiyM-oG3cgP6M9pcANIAC_7T2P2amAHbtsTlSR9CsazNyS-rtDR9b5MywdtnWN9Aw8fTJb8cXQk_j7nvugMxzofPjSOrPKcr8h5OqPlpUCyxxnFtag6cuaPSUwh43D2L0E-ZX7djzaY2Yh_U2n6HegFNPOQ22CJmfrKwDlodmAfMPvAXyq77n3HpoREDACTEDo3830RHF4BfkGXUaZjctgg-A1mvC17hmQmQpkG7IhDqyw0onU-0vF_-ehCjq_CcQEDpS_O3uiHJaG5xGf-0rhLm57v_wA3deugbsZuO4uTuxZZycN_mKxZ97jlDVBetl9hc_5REPbhcT1w3uzTCSx7Q","session":"xptUYoREDACTEDogOWAGVnbJQ","type":"m.login.recaptcha"}}' 'https://matrix.org/_matrix/client/r0/register'
```
```json
{
@@ -396,9 +412,11 @@ Some homeservers may require the user to enter MSISDN.
On matrix.org, it's not required, and not even optional, but it's still possible for the app to add a MSISDN during the registration.
The user enter a phone number and select a country, the `client_secret` is generated by the application
The user enters a phone number and selects a country, the `client_secret` is generated by the application
> curl -X POST --data $'{"client_secret":"d3e285f6-972a-496c-9a22-7915a2db57c7","send_attempt":1,"country":"FR","phone_number":"+33611223344"}' 'https://matrix.org/_matrix/client/r0/register/msisdn/requestToken'
```shell script
curl -X POST --data $'{"client_secret":"d3e285f6-972a-496c-9a22-7915a2db57c7","send_attempt":1,"country":"FR","phone_number":"+33611223344"}' 'https://matrix.org/_matrix/client/r0/register/msisdn/requestToken'
```
```json
{
@@ -430,10 +448,11 @@ If it is not the case, the homeserver send the SMS and returns some data, especi
}
```
When you execute the register request, with the received `sid`, you get an error since the MSISDN is not validated yet:
> curl -X POST --data $'{"auth":{"type":"m.login.msisdn","session":"xptUYoREDACTEDogOWAGVnbJQ","threepid_creds":{"client_secret":"d3e285f6-972a-496c-9a22-7915a2db57c7","sid":"1678881798"}}}' 'https://matrix.org/_matrix/client/r0/register'
When we execute the register request, with the received `sid`, we get an error since the MSISDN is not validated yet:
```shell script
curl -X POST --data $'{"auth":{"type":"m.login.msisdn","session":"xptUYoREDACTEDogOWAGVnbJQ","threepid_creds":{"client_secret":"d3e285f6-972a-496c-9a22-7915a2db57c7","sid":"1678881798"}}}' 'https://matrix.org/_matrix/client/r0/register'
```
```json
"auth": {
@@ -492,7 +511,9 @@ There is an issue on Synapse, which return a 401, it sends too much data along w
The user receive the SMS, he can enter the SMS code in the app, which is sent using the "submit_url" received ie the response of the `requestToken` request:
> curl -X POST --data $'{"client_secret":"d3e285f6-972a-496c-9a22-7915a2db57c7","sid":"1678881798","token":"123456"}' 'https://matrix.org/_matrix/client/unstable/add_threepid/msisdn/submit_token'
```shell script
curl -X POST --data $'{"client_secret":"d3e285f6-972a-496c-9a22-7915a2db57c7","sid":"1678881798","token":"123456"}' 'https://matrix.org/_matrix/client/unstable/add_threepid/msisdn/submit_token'
```
```json
{
@@ -520,7 +541,9 @@ And if the code is correct we get a 200 with:
We can now execute the registration request, to the homeserver
> curl -X POST --data $'{"auth":{"type":"m.login.msisdn","session":"xptUYoREDACTEDogOWAGVnbJQ","threepid_creds":{"client_secret":"d3e285f6-972a-496c-9a22-7915a2db57c7","sid":"1678881798"}}}' 'https://matrix.org/_matrix/client/r0/register'
```shell script
curl -X POST --data $'{"auth":{"type":"m.login.msisdn","session":"xptUYoREDACTEDogOWAGVnbJQ","threepid_creds":{"client_secret":"d3e285f6-972a-496c-9a22-7915a2db57c7","sid":"1678881798"}}}' 'https://matrix.org/_matrix/client/r0/register'
```
```json
{
@@ -535,7 +558,7 @@ We can now execute the registration request, to the homeserver
}
```
Now the homeserver consider that the `m.login.msisdn` step is completed (401):
Now the homeserver considers that the `m.login.msisdn` step is completed (401):
```json
{

107
docs/ui-tests.md Normal file
View File

@@ -0,0 +1,107 @@
# Automate user interface tests
Element Android ensures that some fundamental flows are properly working by running automated user interface tests.
Ui tests are using the android [Espresso](https://developer.android.com/training/testing/espresso) library.
Tests can be run on a real device, or on a virtual device (such as the emulator in Android Studio).
Currently the test are covering a small set of application flows:
- Registration
- Self verification via emoji
- Self verification via passphrase
## Prerequisites:
Out of the box, the tests use one of the homeservers (located at http://localhost:8080) of the "Demo Federation of Homeservers" (https://github.com/matrix-org/synapse#running-a-demo-federation-of-synapses).
You first need to follow instructions to set up Synapse in development mode at https://github.com/matrix-org/synapse#synapse-development. If you have already installed all dependencies, the steps are:
```shell script
$ git clone https://github.com/matrix-org/synapse.git
$ cd synapse
$ virtualenv -p python3 env
$ source env/bin/activate
(env) $ python -m pip install --no-use-pep517 -e .
```
Every time you want to launch these test homeservers, type:
```shell script
$ virtualenv -p python3 env
$ source env/bin/activate
(env) $ demo/start.sh --no-rate-limit
```
**Emulator/Device set up**
When running the test via android studio on a device, you have to disable system animations in order for the test to work properly.
First, ensure developer mode is enabled:
- To enable developer options, tap the **Build Number** option 7 times. You can find this option in one of the following locations, depending on your Android version:
- Android 9 (API level 28) and higher: **Settings > About Phone > Build Number**
- Android 8.0.0 (API level 26) and Android 8.1.0 (API level 26): **Settings > System > About Phone > Build Number**
- Android 7.1 (API level 25) and lower: **Settings > About Phone > Build Number**
On your device, under **Settings > Developer options**, disable the following 3 settings:
- Window animation scale
- Transition animation scale
- Animator duration scale
## Run the tests
Once Synapse is running, and an emulator is running, you can run the UI tests.
### From the source code
Click on the green arrow in front of each test. Clicking on the arrow in front of the test class, or from the package directory does not always work (Tests not found issue).
### From command line
````shell script
./gradlew vector:connectedGplayDebugAndroidTest
````
To run all the tests from the `vector` module.
In case of trouble, you can try to uninstall the previous installed test APK first with this command:
```shell script
adb uninstall im.vector.app.debug.test
```
## Recipes
We added some specific Espresso IdlingResources, and other utilities for matrix related tests
### Wait for initial sync
```kotlin
// Wait for initial sync and check room list is there
withIdlingResource(initialSyncIdlingResource(uiSession)) {
onView(withId(R.id.roomListContainer))
.check(matches(isDisplayed()))
}
```
### Accessing current activity
```kotlin
val activity = EspressoHelper.getCurrentActivity()!!
val uiSession = (activity as HomeActivity).activeSessionHolder.getActiveSession()
```
### Interact with other session
It's possible to create a session via the SDK, and then use this session to interact with the one that the emulator is using (to check verifications for example)
```kotlin
@Before
fun initAccount() {
val context = InstrumentationRegistry.getInstrumentation().targetContext
val matrix = Matrix.getInstance(context)
val userName = "foobar_${System.currentTimeMillis()}"
existingSession = createAccountAndSync(matrix, userName, password, true)
}
```

425
docs/voip_signaling.md Normal file
View File

@@ -0,0 +1,425 @@
Useful links:
- https://codelabs.developers.google.com/codelabs/webrtc-web/#0
- http://webrtc.github.io/webrtc-org/native-code/android/
╔════════════════════════════════════════════════╗
║ ║
║A] Placing a call offer ║
║ ║
╚════════════════════════════════════════════════╝
┌───────────────┐
│ Matrix │
├───────────────┴ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
┌─────────────────┐ │ ┌───────────────────────────┐ ┌─────────────────┐
│ Caller │ │ Signaling Room │ │ │ Callee │
└─────────────────┘ │ ├───────────────────────────┤ └─────────────────┘
┌────┐ │ │ │
│ 3 │ │ │ ┌────────────────────┐ │
┌─────────────────┐──────┴────┴──────────────────────────┼─▶│ m.call.invite │ │ │ ┌─────────────────┐
│ │ │ │ │ mx event │ │ │ │
│ │ │ └────────────────────┘ │ │ │ │
│ │ │ │ │ │ │
│ Element │ │ │ │ │ Element │
┌──│ App │ │ │ │ │ App │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ └─────────────────┘ │ │ │ └─────────────────┘
┌────┤ ▲ │ │ │
│ 1 │ ├────┐ │ └───────────────────────────┘
└────┤ │ 2 │ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘
│ ┌──┴────┴─────────┐ ┌─────────────────┐
│ │ │ │ │
│ │ │ │ │
│ │ WebRtc │ │ WebRtc │
└─▶│ │ │ │
│ │ │ │
│ │ │ │
└─────────────────┘ └─────────────────┘
┌────┐
│ 1 │ The Caller app get access to system resources (camera, mic), eventually stun/turn servers, define some
└────┘ constrains (video quality, format) and pass it to WebRtc in order to create a Peer Call offer
┌────┐
│ 2 │ The WebRtc layer creates a call Offer (sdp) that needs to be sent to callee
└────┘
┌────┐ The app layer, takes the webrtc offer, encapsulate it in a matrix event adds a callId and send it to the other
│ 3 │ user via the room
└────┘
┌──────────────┐
│ mx event │
├──────────────┴────────┐
│ type: m.call.invite │
│ + callId │
│ │
│ ┌──────────────────┐ │
│ │ webrtc sdp │ │
│ └──────────────────┘ │
└───────────────────────┘
╔════════════════════════════════════════════════╗
║ ║
║B] Sending connection establishment info ║
║ ║
╚════════════════════════════════════════════════╝
┌───────────────┐
│ Matrix │
├───────────────┴ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
┌─────────────────┐ │ ┌───────────────────────────┐ ┌─────────────────┐
│ Caller │ │ Signaling Room │ │ │ Callee │
└─────────────────┘ │ ├───────────────────────────┤ └─────────────────┘
│ ┌────────────────────┐ │ │
│ │ │ m.call.invite │ │
┌─────────────────┐ │ │ mx event │ │ │ ┌─────────────────┐
│ │ ┌────┐ │ │ └────────────────────┘ │ │ │
│ │ │ 3 │ │ ┌────────────────────┐ │ │ │ │
│ │──────┴────┴───────┼──────────────────┼─▶│ m.call.candidates │ │ │ │
│ Element │ │ │ mx event │ │ │ │ Element │
│ App │ │ │ └────────────────────┘ │ │ App │
│ │ │ │ │ │ │
│ │ │ │ │ │ │
│ │ │ │ │ │ │
└─────────────────┘ │ │ │ └─────────────────┘
▲ │ │ │
├────┐ │ └───────────────────────────┘
│ 2 │ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘
┌───────┴────┴────┐ ┌─────────────────┐
│ │ │ │
│ │ │ │
│ WebRtc │ ┌───────────────┐ │ WebRtc │
│ │ │ Stun / Turn │ │ │
│ │ ├───────────────┴ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ │ │
│ │ │ │ │
└─────────────────┘ │ └─────────────────┘
▲ │
│ │
└──────────┬────┬───────────▶ │
┌───────────────┐ │ 1 │ │
│ │ └────┘ │
│ Network Stack │ │
│ │ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘
│ │
└───────────────┘
┌────┐
│ 1 │ The WebRtc layer gathers information on how it can be reach by the other peer directly (Ice candidates)
└────┘
┌──────────────────────────────────────────────────────────────────┐
│candidate:1 1 tcp 1518149375 127.0.0.1 35990 typ host │
└──────────────────────────────────────────────────────────────────┘
┌──────────────────────────────────────────────────────────────────┐
│candidate:2 1 UDP 2130706431 192.168.1.102 1816 typ host │
└──────────────────────────────────────────────────────────────────┘
┌────┐
│ 2 │ The WebRTC layer notifies the App layer when it finds new Ice Candidates
└────┘
┌────┐ The app layer, takes the ice candidates, encapsulate them in one or several matrix event adds the callId and
│ 3 │ send it to the other user via the room
└────┘
┌──────────────┐
│ mx event │
├──────────────┴────────────────────────┐
│ type: m.call.candidates │
│ │
│ +CallId │
│ │
│ ┌──────────────────┐ │
│ │ice candidate sdp │ │
│ └──────────────────┘ │
│ ┌──────────────────┐ │
│ │ice candidate sdp │ │
│ └──────────────────┘ │
│ ┌──────────────────┐ │
│ │ice candidate sdp │ │
│ └──────────────────┘ │
└───────────────────────────────────────┘
╔════════════════════════════════════════════════╗
║ ║
║C] Receiving a call offer ║
║ ║
╚════════════════════════════════════════════════╝
┌───────────────┐
│ Matrix │
├───────────────┴ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
│ ┌─────────────────┐
│ │ Callee │
┌─────────────────┐ │ ┌───────────────────────────┐ └─────────────────┘
│ Caller │ │ Signaling Room │ │
└─────────────────┘ │ ├───────────────────────────┤
│ ┌────────────────────┐ │ │ ┌─────────────────┐
│ │ │ m.call.invite │───┼────────────────────────────┬────┬───▶│ │
┌─────────────────┐ │ │ mx event │ │ │ │ 1 │ │ │
│ │ │ │ └────────────────────┘ │ └────┘ │ │
│ │ │ ┌────────────────────┐ │ │ │ Element │
│ │ │ │ │ m.call.candidates │ │ │ App │
│ Element │ │ │ mx event │ │ │ │ │
│ App │ │ │ └────────────────────┘ │ │ │
│ │ │ ┌────────────────────┐◀──┼─────────────────┼───┬────┬───────────┤ │
│ │◀──────────────────┼──────────────────┼──│ m.call.answer │ │ │ 4 │ └──┬──────────────┘
│ │ │ │ mx event │ │ │ └────┘ ├────┐ ▲
└────┬────────────┘ │ │ └────────────────────┘ │ │ 2 │ ├────┐
│ │ │ │ ├────┘ │ 3 │
│ │ └───────────────────────────┘ ┌──▼─────────┴────┤
┌────▼────────────┐ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ │ │
│ │ │ │
│ │ │ WebRtc │
│ WebRtc │ │ ┌──┴─────────────────┐
│ │ │ │ caller offer │
┌──────────┴─────────┐ │ │ └──┬─────────────────┘
│ callee answer │ │ └─────────────────┘
└────────────────────┴───────┘
┌────┐
│ 1 │ Bob receives a call.invite event in a room, then creates a WebRTC peer connection object
└────┘
┌────┐
│ 2 │ The encapsulated call offer sdp from the mx event is transmitted to WebRTC
└────┘
┌────┐
│ 3 │ WebRTC then creates a call answer for the offer and send it back to app layer
└────┘
┌────┐ The app layer, takes the webrtc answer, encapsulate it in a matrix event adds a callId and send it to the
│ 3 │ other user via the room
└────┘
┌──────────────┐
│ mx event │
├──────────────┴────────┐
│ type: m.call.answer │
│ + callId │
│ │
│ ┌──────────────────┐ │
│ │ webrtc sdp │ │
│ └──────────────────┘ │
└───────────────────────┘
╔════════════════════════════════════════════════╗
║ ║
║D] Callee sends connection establishment info ║
║ ║
╚════════════════════════════════════════════════╝
┌───────────────┐
│ Matrix │
├───────────────┴ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
┌─────────────────┐ │ ┌───────────────────────────┐ ┌─────────────────┐
│ Caller │ │ Signaling Room │ │ │ Callee │
└─────────────────┘ │ ├───────────────────────────┤ └─────────────────┘
│ ┌────────────────────┐ │ │
│ │ │ m.call.invite │ │
┌─────────────────┐ │ │ mx event │ │ │ ┌─────────────────┐
│ │ │ │ └────────────────────┘ │ │ │
│ │ │ ┌────────────────────┐ │ │ │ │
│ │ │ │ │ m.call.candidates │ │ │ │
│ Element │ │ │ mx event │ │ │ │ Element │
│ App │ │ │ └────────────────────┘ │ ┌────┐ │ App │
│ │ │ ┌────────────────────┐ │ │ │ 3 │ │ │
│ │◀──────────────────┼┐ │ │ m.call.answer │ │ ┌───────┴────┴────────│ │
│ │ │ │ │ mx event │ │ ││ │ │
└─────────────────┘ ││ │ └────────────────────┘ │ │ └─────────────────┘
│ │ │ ┌────────────────────┐ │ ││ ▲
│ │└─────────────────┼──│ m.call.candidates │ │ │ ├────┐
▼ │ │ mx event │◀──┼────────────────┘│ │ 2 │
┌─────────────────┐ │ │ └────────────────────┘ │ ┌────┴────┴───────┐
│ │ └───────────────────────────┘ │ │ │
│ │ │ │ │
│ WebRtc │ │ │ WebRtc │
│ │ └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ │ ┌───┴────────────────┐
│ │ │ │ caller offer │
┌────────┴───────────┐ │ │ └───┬────────────────┘
│ callee answer ├─────┘ ┌───────────────┐ └─────────────────┘
├────────────────────┤ │ Stun / Turn │ ▲
│ callee ice │ ├───────────────┴ ─ ─ ─ ─ ─ ─ ─ ─ ┌────┐ │
│ candidates │ │ │ 1 │ │
└────────────────────┘ │ ├────┴──┴───────┐
│ │ │
│ │ Network Stack │
│◀─────────────────────┤ │
│ │ │
│ └───────────────┘
─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘
┌────┐
│ 1 │ The WebRtc layer gathers information on how it can be reach by the other peer directly (Ice candidates)
└────┘
┌──────────────────────────────────────────────────────────────────┐
│candidate:1 1 tcp 1518149375 127.0.0.1 35990 typ host │
└──────────────────────────────────────────────────────────────────┘
┌──────────────────────────────────────────────────────────────────┐
│candidate:2 1 UDP 2130706431 192.168.1.102 1816 typ host │
└──────────────────────────────────────────────────────────────────┘
┌────┐
│ 2 │ The WebRTC layer notifies the App layer when it finds new Ice Candidates
└────┘
┌────┐ The app layer, takes the ice candidates, encapsulate them in one or several matrix event adds the callId and
│ 3 │ send it to the other user via the room
└────┘
┌──────────────┐
│ mx event │
├──────────────┴────────────────────────┐
│ type: m.call.candidates │
│ │
│ +CallId │
│ │
│ ┌──────────────────┐ │
│ │ice candidate sdp │ │
│ └──────────────────┘ │
│ ┌──────────────────┐ │
│ │ice candidate sdp │ │
│ └──────────────────┘ │
│ ┌──────────────────┐ │
│ │ice candidate sdp │ │
│ └──────────────────┘ │
└───────────────────────────────────────┘
╔════════════════════════════════════════════════╗
║ ║
║D] Caller Callee connection ║
║ ║
╚════════════════════════════════════════════════╝
┌───────────────┐
┌─────────────────┐ │ Matrix │ ┌─────────────────┐
│ Caller │ ├───────────────┴ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ │ Callee │
└─────────────────┘ │ └─────────────────┘
┌─────────────────┐ │ ┌─────────────────┐
│ │ │ │ │
│ │ │ │ │
│ │ │ │ │
│ Element │ └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ │ Element │
│ App │ │ App │
│ │ │ │
│ │ │ │
│ │ │ │
└─────────────────┘ └─────────────────┘
┌───────────────┐
│ Internet │
├───────────────┴ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
┌─────────────────┐ │ ┌─────────────────┐
│ │ │ │ │
│ ├───────────────────────────────────────────────────────────────────────────────────┴─────────────────────┤ │
│ WebRtc │█████████████████████████████████████████████████████████████████████████████████████████████████████████│ WebRtc │
┌─────────────┴──────┐ ├────────────────────────────────────────┬──────────────────────────┬───────────────┬─────────────────────┤ ┌─────┴──────────────┐
│ callee answer │ │ │ │ Video / Audio Stream │ │ │ caller offer │
├────────────────────┤ │ └──────────────────────────┘ │ │ ├────────────────────┤
│ callee ice ├──────────┘ └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ └───────────┤ caller ice │
│ candidates │ │ candidates │
└────────────────────┘ └────────────────────┘
┌─────────────────────────────────────────────────────┐
│ │░
│ If connection is impossible (firewall), and a turn │░
│server is available, connection could happen through │░
│ a relay │░
│ │░
└─────────────────────────────────────────────────────┘░
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
┌───────────────┐
│ Internet │
└─┬─────────────┴ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
┌─────────────────┐ │ ┌─────────────────┐
│ │ │ ┌─────────────────────────┐ │ │
│ ├───────────────────────────────────────┐│ │ │ │ │
│ WebRtc │███████████████████████████████████████││ │ │ WebRtc │
│ ├───────────────────────────────────────┘│ │ │ │ │
│ │ ┌────────┴─────────────────┐ │ Relay │┌─────────────────────────────────────┤ │
┌───────────────┴────┐ │ │ Video / Audio Stream │ │ ││█████████████████████████████████████│ ┌───────┴────────────┐
│ callee answer ├────────────┘ └────────┬─────────────────┘ │ │└─────────────────────────────────────┴─────────┤ caller offer │
├────────────────────┤ │ │ │ ├────────────────────┤
│ callee ice │ │ │ │ │ caller ice │
│ candidates │ └─────────────────────────┘ │ │ candidates │
└────────────────────┘ │ └────────────────────┘
└ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─

View File

@@ -8,7 +8,7 @@
# The setting is particularly useful for tweaking memory settings.
android.enableJetifier=true
android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536m
org.gradle.jvmargs=-Xmx2048m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects

Binary file not shown.

View File

@@ -1,6 +1,6 @@
#Fri Sep 27 10:10:35 CEST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=11657af6356b7587bfb37287b5992e94a9686d5c8a0a1b60b87b9928a2decde5
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip

53
gradlew vendored
View File

@@ -1,5 +1,21 @@
#!/usr/bin/env sh
#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
##
## Gradle start up script for UN*X
@@ -28,7 +44,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m"'
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
@@ -66,6 +82,7 @@ esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
@@ -109,10 +126,11 @@ if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
@@ -138,19 +156,19 @@ if $cygwin ; then
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
i=`expr $i + 1`
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
@@ -159,14 +177,9 @@ save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
APP_ARGS=`save "$@"`
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"

43
gradlew.bat vendored
View File

@@ -1,3 +1,19 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@@ -13,15 +29,18 @@ if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m"
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
if "%ERRORLEVEL%" == "0" goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -35,7 +54,7 @@ goto fail
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
@@ -45,28 +64,14 @@ echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell

View File

@@ -3,11 +3,11 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
android {
compileSdkVersion 28
compileSdkVersion 29
defaultConfig {
minSdkVersion 16
targetSdkVersion 28
minSdkVersion 21
targetSdkVersion 29
versionCode 1
versionName "1.0"
@@ -39,7 +39,7 @@ dependencies {
implementation 'io.reactivex.rxjava2:rxkotlin:2.3.0'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
// Paging
implementation "androidx.paging:paging-runtime-ktx:2.1.0"
implementation "androidx.paging:paging-runtime-ktx:2.1.2"
// Logging
implementation 'com.jakewharton.timber:timber:4.7.1'

View File

@@ -1,2 +1,2 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="im.vector.matrix.rx" />
package="org.matrix.android.sdk.rx" />

View File

@@ -1,102 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package im.vector.matrix.rx
import im.vector.matrix.android.api.session.events.model.Event
import im.vector.matrix.android.api.session.room.Room
import im.vector.matrix.android.api.session.room.members.RoomMemberQueryParams
import im.vector.matrix.android.api.session.room.model.EventAnnotationsSummary
import im.vector.matrix.android.api.session.room.model.ReadReceipt
import im.vector.matrix.android.api.session.room.model.RoomMemberSummary
import im.vector.matrix.android.api.session.room.model.RoomSummary
import im.vector.matrix.android.api.session.room.notification.RoomNotificationState
import im.vector.matrix.android.api.session.room.send.UserDraft
import im.vector.matrix.android.api.session.room.timeline.TimelineEvent
import im.vector.matrix.android.api.util.Optional
import im.vector.matrix.android.api.util.toOptional
import io.reactivex.Observable
import io.reactivex.Single
class RxRoom(private val room: Room) {
fun liveRoomSummary(): Observable<Optional<RoomSummary>> {
return room.getRoomSummaryLive()
.asObservable()
.startWithCallable { room.roomSummary().toOptional() }
}
fun liveRoomMembers(queryParams: RoomMemberQueryParams): Observable<List<RoomMemberSummary>> {
return room.getRoomMembersLive(queryParams).asObservable()
.startWithCallable {
room.getRoomMembers(queryParams)
}
}
fun liveAnnotationSummary(eventId: String): Observable<Optional<EventAnnotationsSummary>> {
return room.getEventAnnotationsSummaryLive(eventId).asObservable()
.startWithCallable {
room.getEventAnnotationsSummary(eventId).toOptional()
}
}
fun liveTimelineEvent(eventId: String): Observable<Optional<TimelineEvent>> {
return room.getTimeLineEventLive(eventId).asObservable()
.startWithCallable {
room.getTimeLineEvent(eventId).toOptional()
}
}
fun liveStateEvent(eventType: String, stateKey: String): Observable<Optional<Event>> {
return room.getStateEventLive(eventType, stateKey).asObservable()
.startWithCallable {
room.getStateEvent(eventType, stateKey).toOptional()
}
}
fun liveReadMarker(): Observable<Optional<String>> {
return room.getReadMarkerLive().asObservable()
}
fun liveReadReceipt(): Observable<Optional<String>> {
return room.getMyReadReceiptLive().asObservable()
}
fun loadRoomMembersIfNeeded(): Single<Unit> = singleBuilder {
room.loadRoomMembersIfNeeded(it)
}
fun joinRoom(reason: String? = null,
viaServers: List<String> = emptyList()): Single<Unit> = singleBuilder {
room.join(reason, viaServers, it)
}
fun liveEventReadReceipts(eventId: String): Observable<List<ReadReceipt>> {
return room.getEventReadReceiptsLive(eventId).asObservable()
}
fun liveDrafts(): Observable<List<UserDraft>> {
return room.getDraftsLive().asObservable()
}
fun liveNotificationState(): Observable<RoomNotificationState> {
return room.getLiveRoomNotificationState().asObservable()
}
}
fun Room.rx(): RxRoom {
return RxRoom(this)
}

View File

@@ -1,128 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package im.vector.matrix.rx
import androidx.paging.PagedList
import im.vector.matrix.android.api.session.Session
import im.vector.matrix.android.api.session.crypto.crosssigning.MXCrossSigningInfo
import im.vector.matrix.android.api.session.group.GroupSummaryQueryParams
import im.vector.matrix.android.api.session.group.model.GroupSummary
import im.vector.matrix.android.api.session.pushers.Pusher
import im.vector.matrix.android.api.session.room.RoomSummaryQueryParams
import im.vector.matrix.android.api.session.room.model.RoomSummary
import im.vector.matrix.android.api.session.room.model.create.CreateRoomParams
import im.vector.matrix.android.api.session.sync.SyncState
import im.vector.matrix.android.api.session.user.model.User
import im.vector.matrix.android.api.util.JsonDict
import im.vector.matrix.android.api.util.Optional
import im.vector.matrix.android.api.util.toOptional
import im.vector.matrix.android.internal.crypto.model.CryptoDeviceInfo
import io.reactivex.Observable
import io.reactivex.Single
class RxSession(private val session: Session) {
fun liveRoomSummaries(queryParams: RoomSummaryQueryParams): Observable<List<RoomSummary>> {
return session.getRoomSummariesLive(queryParams).asObservable()
.startWithCallable {
session.getRoomSummaries(queryParams)
}
}
fun liveGroupSummaries(queryParams: GroupSummaryQueryParams): Observable<List<GroupSummary>> {
return session.getGroupSummariesLive(queryParams).asObservable()
.startWithCallable {
session.getGroupSummaries(queryParams)
}
}
fun liveBreadcrumbs(): Observable<List<RoomSummary>> {
return session.getBreadcrumbsLive().asObservable()
.startWithCallable {
session.getBreadcrumbs()
}
}
fun liveSyncState(): Observable<SyncState> {
return session.getSyncStateLive().asObservable()
}
fun livePushers(): Observable<List<Pusher>> {
return session.getPushersLive().asObservable()
}
fun liveUser(userId: String): Observable<Optional<User>> {
return session.getUserLive(userId).asObservable()
.startWithCallable {
session.getUser(userId).toOptional()
}
}
fun liveUsers(): Observable<List<User>> {
return session.getUsersLive().asObservable()
}
fun liveIgnoredUsers(): Observable<List<User>> {
return session.getIgnoredUsersLive().asObservable()
}
fun livePagedUsers(filter: String? = null): Observable<PagedList<User>> {
return session.getPagedUsersLive(filter).asObservable()
}
fun createRoom(roomParams: CreateRoomParams): Single<String> = singleBuilder {
session.createRoom(roomParams, it)
}
fun searchUsersDirectory(search: String,
limit: Int,
excludedUserIds: Set<String>): Single<List<User>> = singleBuilder {
session.searchUsersDirectory(search, limit, excludedUserIds, it)
}
fun joinRoom(roomId: String,
reason: String? = null,
viaServers: List<String> = emptyList()): Single<Unit> = singleBuilder {
session.joinRoom(roomId, reason, viaServers, it)
}
fun getRoomIdByAlias(roomAlias: String,
searchOnServer: Boolean): Single<Optional<String>> = singleBuilder {
session.getRoomIdByAlias(roomAlias, searchOnServer, it)
}
fun getProfileInfo(userId: String): Single<JsonDict> = singleBuilder {
session.getProfile(userId, it)
}
fun liveUserCryptoDevices(userId: String): Observable<List<CryptoDeviceInfo>> {
return session.getLiveCryptoDeviceInfo(userId).asObservable().startWithCallable {
session.getCryptoDeviceInfo(userId)
}
}
fun liveCrossSigningInfo(userId: String): Observable<Optional<MXCrossSigningInfo>> {
return session.getCrossSigningService().getLiveCrossSigningKeys(userId).asObservable()
.startWithCallable {
session.getCrossSigningService().getUserCrossSigningKeys(userId).toOptional()
}
}
}
fun Session.rx(): RxSession {
return RxSession(this)
}

View File

@@ -1,11 +1,12 @@
/*
* Copyright 2019 New Vector Ltd
* Copyright 2020 The Matrix.org Foundation C.I.C.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -14,7 +15,7 @@
* limitations under the License.
*/
package im.vector.matrix.rx
package org.matrix.android.sdk.rx
import androidx.lifecycle.LiveData
import androidx.lifecycle.Observer

View File

@@ -1,11 +1,12 @@
/*
* Copyright 2019 New Vector Ltd
* Copyright 2020 The Matrix.org Foundation C.I.C.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -14,9 +15,9 @@
* limitations under the License.
*/
package im.vector.matrix.rx
package org.matrix.android.sdk.rx
import im.vector.matrix.android.api.util.Optional
import org.matrix.android.sdk.api.util.Optional
import io.reactivex.Observable
fun <T : Any> Observable<Optional<T>>.unwrap(): Observable<T> {

View File

@@ -1,11 +1,12 @@
/*
* Copyright 2019 New Vector Ltd
* Copyright 2020 The Matrix.org Foundation C.I.C.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -14,10 +15,10 @@
* limitations under the License.
*/
package im.vector.matrix.rx
package org.matrix.android.sdk.rx
import im.vector.matrix.android.api.MatrixCallback
import im.vector.matrix.android.api.util.Cancelable
import org.matrix.android.sdk.api.MatrixCallback
import org.matrix.android.sdk.api.util.Cancelable
import io.reactivex.Completable
import io.reactivex.Single

View File

@@ -0,0 +1,147 @@
/*
* Copyright (c) 2020 New Vector Ltd
* Copyright 2020 The Matrix.org Foundation C.I.C.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.matrix.android.sdk.rx
import android.net.Uri
import org.matrix.android.sdk.api.query.QueryStringValue
import org.matrix.android.sdk.api.session.events.model.Event
import org.matrix.android.sdk.api.session.identity.ThreePid
import org.matrix.android.sdk.api.session.room.Room
import org.matrix.android.sdk.api.session.room.members.RoomMemberQueryParams
import org.matrix.android.sdk.api.session.room.model.EventAnnotationsSummary
import org.matrix.android.sdk.api.session.room.model.ReadReceipt
import org.matrix.android.sdk.api.session.room.model.RoomHistoryVisibility
import org.matrix.android.sdk.api.session.room.model.RoomMemberSummary
import org.matrix.android.sdk.api.session.room.model.RoomSummary
import org.matrix.android.sdk.api.session.room.notification.RoomNotificationState
import org.matrix.android.sdk.api.session.room.send.UserDraft
import org.matrix.android.sdk.api.session.room.timeline.TimelineEvent
import org.matrix.android.sdk.api.util.Optional
import org.matrix.android.sdk.api.util.toOptional
import io.reactivex.Completable
import io.reactivex.Observable
import io.reactivex.Single
class RxRoom(private val room: Room) {
fun liveRoomSummary(): Observable<Optional<RoomSummary>> {
return room.getRoomSummaryLive()
.asObservable()
.startWithCallable { room.roomSummary().toOptional() }
}
fun liveRoomMembers(queryParams: RoomMemberQueryParams): Observable<List<RoomMemberSummary>> {
return room.getRoomMembersLive(queryParams).asObservable()
.startWithCallable {
room.getRoomMembers(queryParams)
}
}
fun liveAnnotationSummary(eventId: String): Observable<Optional<EventAnnotationsSummary>> {
return room.getEventAnnotationsSummaryLive(eventId).asObservable()
.startWithCallable {
room.getEventAnnotationsSummary(eventId).toOptional()
}
}
fun liveTimelineEvent(eventId: String): Observable<Optional<TimelineEvent>> {
return room.getTimeLineEventLive(eventId).asObservable()
.startWithCallable {
room.getTimeLineEvent(eventId).toOptional()
}
}
fun liveStateEvent(eventType: String, stateKey: QueryStringValue): Observable<Optional<Event>> {
return room.getStateEventLive(eventType, stateKey).asObservable()
.startWithCallable {
room.getStateEvent(eventType, stateKey).toOptional()
}
}
fun liveStateEvents(eventTypes: Set<String>): Observable<List<Event>> {
return room.getStateEventsLive(eventTypes).asObservable()
.startWithCallable {
room.getStateEvents(eventTypes)
}
}
fun liveReadMarker(): Observable<Optional<String>> {
return room.getReadMarkerLive().asObservable()
}
fun liveReadReceipt(): Observable<Optional<String>> {
return room.getMyReadReceiptLive().asObservable()
}
fun loadRoomMembersIfNeeded(): Single<Unit> = singleBuilder {
room.loadRoomMembersIfNeeded(it)
}
fun joinRoom(reason: String? = null,
viaServers: List<String> = emptyList()): Single<Unit> = singleBuilder {
room.join(reason, viaServers, it)
}
fun liveEventReadReceipts(eventId: String): Observable<List<ReadReceipt>> {
return room.getEventReadReceiptsLive(eventId).asObservable()
}
fun liveDrafts(): Observable<List<UserDraft>> {
return room.getDraftsLive().asObservable()
}
fun liveNotificationState(): Observable<RoomNotificationState> {
return room.getLiveRoomNotificationState().asObservable()
}
fun invite(userId: String, reason: String? = null): Completable = completableBuilder<Unit> {
room.invite(userId, reason, it)
}
fun invite3pid(threePid: ThreePid): Completable = completableBuilder<Unit> {
room.invite3pid(threePid, it)
}
fun updateTopic(topic: String): Completable = completableBuilder<Unit> {
room.updateTopic(topic, it)
}
fun updateName(name: String): Completable = completableBuilder<Unit> {
room.updateName(name, it)
}
fun addRoomAlias(alias: String): Completable = completableBuilder<Unit> {
room.addRoomAlias(alias, it)
}
fun updateCanonicalAlias(alias: String): Completable = completableBuilder<Unit> {
room.updateCanonicalAlias(alias, it)
}
fun updateHistoryReadability(readability: RoomHistoryVisibility): Completable = completableBuilder<Unit> {
room.updateHistoryReadability(readability, it)
}
fun updateAvatar(avatarUri: Uri, fileName: String): Completable = completableBuilder<Unit> {
room.updateAvatar(avatarUri, fileName, it)
}
}
fun Room.rx(): RxRoom {
return RxRoom(this)
}

View File

@@ -0,0 +1,221 @@
/*
* Copyright (c) 2020 New Vector Ltd
* Copyright 2020 The Matrix.org Foundation C.I.C.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.matrix.android.sdk.rx
import androidx.paging.PagedList
import io.reactivex.Observable
import io.reactivex.Single
import io.reactivex.functions.Function3
import org.matrix.android.sdk.api.extensions.orFalse
import org.matrix.android.sdk.api.query.QueryStringValue
import org.matrix.android.sdk.api.session.Session
import org.matrix.android.sdk.api.session.accountdata.UserAccountDataEvent
import org.matrix.android.sdk.api.session.crypto.crosssigning.KEYBACKUP_SECRET_SSSS_NAME
import org.matrix.android.sdk.api.session.crypto.crosssigning.MASTER_KEY_SSSS_NAME
import org.matrix.android.sdk.api.session.crypto.crosssigning.MXCrossSigningInfo
import org.matrix.android.sdk.api.session.crypto.crosssigning.SELF_SIGNING_KEY_SSSS_NAME
import org.matrix.android.sdk.api.session.crypto.crosssigning.USER_SIGNING_KEY_SSSS_NAME
import org.matrix.android.sdk.api.session.group.GroupSummaryQueryParams
import org.matrix.android.sdk.api.session.group.model.GroupSummary
import org.matrix.android.sdk.api.session.identity.ThreePid
import org.matrix.android.sdk.api.session.pushers.Pusher
import org.matrix.android.sdk.api.session.room.RoomSummaryQueryParams
import org.matrix.android.sdk.api.session.room.members.ChangeMembershipState
import org.matrix.android.sdk.api.session.room.model.RoomSummary
import org.matrix.android.sdk.api.session.room.model.create.CreateRoomParams
import org.matrix.android.sdk.api.session.sync.SyncState
import org.matrix.android.sdk.api.session.user.model.User
import org.matrix.android.sdk.api.session.widgets.model.Widget
import org.matrix.android.sdk.api.util.JsonDict
import org.matrix.android.sdk.api.util.Optional
import org.matrix.android.sdk.api.util.toOptional
import org.matrix.android.sdk.internal.crypto.model.CryptoDeviceInfo
import org.matrix.android.sdk.internal.crypto.model.rest.DeviceInfo
import org.matrix.android.sdk.internal.crypto.store.PrivateKeysInfo
class RxSession(private val session: Session) {
fun liveRoomSummaries(queryParams: RoomSummaryQueryParams): Observable<List<RoomSummary>> {
return session.getRoomSummariesLive(queryParams).asObservable()
.startWithCallable {
session.getRoomSummaries(queryParams)
}
}
fun liveGroupSummaries(queryParams: GroupSummaryQueryParams): Observable<List<GroupSummary>> {
return session.getGroupSummariesLive(queryParams).asObservable()
.startWithCallable {
session.getGroupSummaries(queryParams)
}
}
fun liveBreadcrumbs(queryParams: RoomSummaryQueryParams): Observable<List<RoomSummary>> {
return session.getBreadcrumbsLive(queryParams).asObservable()
.startWithCallable {
session.getBreadcrumbs(queryParams)
}
}
fun liveMyDevicesInfo(): Observable<List<DeviceInfo>> {
return session.cryptoService().getLiveMyDevicesInfo().asObservable()
.startWithCallable {
session.cryptoService().getMyDevicesInfo()
}
}
fun liveSyncState(): Observable<SyncState> {
return session.getSyncStateLive().asObservable()
}
fun livePushers(): Observable<List<Pusher>> {
return session.getPushersLive().asObservable()
}
fun liveUser(userId: String): Observable<Optional<User>> {
return session.getUserLive(userId).asObservable()
.startWithCallable {
session.getUser(userId).toOptional()
}
}
fun liveUsers(): Observable<List<User>> {
return session.getUsersLive().asObservable()
}
fun liveIgnoredUsers(): Observable<List<User>> {
return session.getIgnoredUsersLive().asObservable()
}
fun livePagedUsers(filter: String? = null, excludedUserIds: Set<String>? = null): Observable<PagedList<User>> {
return session.getPagedUsersLive(filter, excludedUserIds).asObservable()
}
fun liveThreePIds(refreshData: Boolean): Observable<List<ThreePid>> {
return session.getThreePidsLive(refreshData).asObservable()
.startWithCallable { session.getThreePids() }
}
fun livePendingThreePIds(): Observable<List<ThreePid>> {
return session.getPendingThreePidsLive().asObservable()
.startWithCallable { session.getPendingThreePids() }
}
fun createRoom(roomParams: CreateRoomParams): Single<String> = singleBuilder {
session.createRoom(roomParams, it)
}
fun searchUsersDirectory(search: String,
limit: Int,
excludedUserIds: Set<String>): Single<List<User>> = singleBuilder {
session.searchUsersDirectory(search, limit, excludedUserIds, it)
}
fun joinRoom(roomIdOrAlias: String,
reason: String? = null,
viaServers: List<String> = emptyList()): Single<Unit> = singleBuilder {
session.joinRoom(roomIdOrAlias, reason, viaServers, it)
}
fun getRoomIdByAlias(roomAlias: String,
searchOnServer: Boolean): Single<Optional<String>> = singleBuilder {
session.getRoomIdByAlias(roomAlias, searchOnServer, it)
}
fun getProfileInfo(userId: String): Single<JsonDict> = singleBuilder {
session.getProfile(userId, it)
}
fun liveUserCryptoDevices(userId: String): Observable<List<CryptoDeviceInfo>> {
return session.cryptoService().getLiveCryptoDeviceInfo(userId).asObservable().startWithCallable {
session.cryptoService().getCryptoDeviceInfo(userId)
}
}
fun liveCrossSigningInfo(userId: String): Observable<Optional<MXCrossSigningInfo>> {
return session.cryptoService().crossSigningService().getLiveCrossSigningKeys(userId).asObservable()
.startWithCallable {
session.cryptoService().crossSigningService().getUserCrossSigningKeys(userId).toOptional()
}
}
fun liveCrossSigningPrivateKeys(): Observable<Optional<PrivateKeysInfo>> {
return session.cryptoService().crossSigningService().getLiveCrossSigningPrivateKeys().asObservable()
.startWithCallable {
session.cryptoService().crossSigningService().getCrossSigningPrivateKeys().toOptional()
}
}
fun liveAccountData(types: Set<String>): Observable<List<UserAccountDataEvent>> {
return session.getLiveAccountDataEvents(types).asObservable()
.startWithCallable {
session.getAccountDataEvents(types)
}
}
fun liveRoomWidgets(
roomId: String,
widgetId: QueryStringValue,
widgetTypes: Set<String>? = null,
excludedTypes: Set<String>? = null
): Observable<List<Widget>> {
return session.widgetService().getRoomWidgetsLive(roomId, widgetId, widgetTypes, excludedTypes).asObservable()
.startWithCallable {
session.widgetService().getRoomWidgets(roomId, widgetId, widgetTypes, excludedTypes)
}
}
fun liveRoomChangeMembershipState(): Observable<Map<String, ChangeMembershipState>> {
return session.getChangeMembershipsLive().asObservable()
}
fun liveSecretSynchronisationInfo(): Observable<SecretsSynchronisationInfo> {
return Observable.combineLatest<List<UserAccountDataEvent>, Optional<MXCrossSigningInfo>, Optional<PrivateKeysInfo>, SecretsSynchronisationInfo>(
liveAccountData(setOf(MASTER_KEY_SSSS_NAME, USER_SIGNING_KEY_SSSS_NAME, SELF_SIGNING_KEY_SSSS_NAME, KEYBACKUP_SECRET_SSSS_NAME)),
liveCrossSigningInfo(session.myUserId),
liveCrossSigningPrivateKeys(),
Function3 { _, crossSigningInfo, pInfo ->
// first check if 4S is already setup
val is4SSetup = session.sharedSecretStorageService.isRecoverySetup()
val isCrossSigningEnabled = crossSigningInfo.getOrNull() != null
val isCrossSigningTrusted = crossSigningInfo.getOrNull()?.isTrusted() == true
val allPrivateKeysKnown = pInfo.getOrNull()?.allKnown().orFalse()
val keysBackupService = session.cryptoService().keysBackupService()
val currentBackupVersion = keysBackupService.currentBackupVersion
val megolmBackupAvailable = currentBackupVersion != null
val savedBackupKey = keysBackupService.getKeyBackupRecoveryKeyInfo()
val megolmKeyKnown = savedBackupKey?.version == currentBackupVersion
SecretsSynchronisationInfo(
isBackupSetup = is4SSetup,
isCrossSigningEnabled = isCrossSigningEnabled,
isCrossSigningTrusted = isCrossSigningTrusted,
allPrivateKeysKnown = allPrivateKeysKnown,
megolmBackupAvailable = megolmBackupAvailable,
megolmSecretKnown = megolmKeyKnown,
isMegolmKeyIn4S = session.sharedSecretStorageService.isMegolmKeyInBackup()
)
}
)
.distinctUntilChanged()
}
}
fun Session.rx(): RxSession {
return RxSession(this)
}

View File

@@ -0,0 +1,28 @@
/*
* Copyright (c) 2020 New Vector Ltd
* Copyright 2020 The Matrix.org Foundation C.I.C.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.matrix.android.sdk.rx
data class SecretsSynchronisationInfo(
val isBackupSetup: Boolean,
val isCrossSigningEnabled: Boolean,
val isCrossSigningTrusted: Boolean,
val allPrivateKeysKnown: Boolean,
val megolmBackupAvailable: Boolean,
val megolmSecretKnown: Boolean,
val isMegolmKeyIn4S: Boolean
)

View File

@@ -19,39 +19,56 @@ androidExtensions {
}
android {
compileSdkVersion 28
compileSdkVersion 29
testOptions.unitTests.includeAndroidResources = true
defaultConfig {
minSdkVersion 16
targetSdkVersion 28
minSdkVersion 21
targetSdkVersion 29
versionCode 1
versionName "0.0.1"
// Multidex is useful for tests
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
// The following argument makes the Android Test Orchestrator run its
// "pm clear" command after each test invocation. This command ensures
// that the app's state is completely cleared between tests.
testInstrumentationRunnerArguments clearPackageData: 'true'
buildConfigField "String", "GIT_SDK_REVISION", "\"${gitRevision()}\""
resValue "string", "git_sdk_revision", "\"${gitRevision()}\""
resValue "string", "git_sdk_revision_unix_date", "\"${gitRevisionUnixDate()}\""
resValue "string", "git_sdk_revision_date", "\"${gitRevisionDate()}\""
defaultConfig {
consumerProguardFiles 'proguard-rules.pro'
}
}
testOptions {
execution 'ANDROIDX_TEST_ORCHESTRATOR'
}
buildTypes {
debug {
// Set to true to log privacy or sensible data, such as token
buildConfigField "boolean", "LOG_PRIVATE_DATA", project.property("vector.debugPrivateData")
// Set to BODY instead of NONE to enable logging
buildConfigField "okhttp3.logging.HttpLoggingInterceptor.Level", "OKHTTP_LOGGING_LEVEL", "okhttp3.logging.HttpLoggingInterceptor.Level." + project.property("vector.httpLogLevel")
buildConfigField "String", "PERF_TRACING_SERVER", project.property("vector.perfTracingServer")
buildConfigField "String", "PERF_TRACING_SERVER_TOKEN", project.property("vector.perfTracingServerToken")
buildConfigField "String", "PERF_TRACING_SERVER_USER", project.property("vector.perfTracingServerUser")
}
release {
buildConfigField "boolean", "LOG_PRIVATE_DATA", "false"
buildConfigField "okhttp3.logging.HttpLoggingInterceptor.Level", "OKHTTP_LOGGING_LEVEL", "okhttp3.logging.HttpLoggingInterceptor.Level.NONE"
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
buildConfigField "String", "PERF_TRACING_SERVER", ""
buildConfigField "String", "PERF_TRACING_SERVER_TOKEN", ""
buildConfigField "String", "PERF_TRACING_SERVER_USER", ""
}
}
@@ -71,6 +88,15 @@ android {
kotlinOptions {
jvmTarget = "1.8"
}
sourceSets {
androidTest {
java.srcDirs += "src/sharedTest/java"
}
test {
java.srcDirs += "src/sharedTest/java"
}
}
}
static def gitRevision() {
@@ -94,38 +120,45 @@ dependencies {
def moshi_version = '1.8.0'
def lifecycle_version = '2.2.0'
def arch_version = '2.1.0'
def coroutines_version = "1.3.2"
def coroutines_version = "1.3.8"
def markwon_version = '3.1.0'
def daggerVersion = '2.25.4'
def work_version = '2.4.0'
def retrofit_version = '2.6.2'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version"
implementation "androidx.appcompat:appcompat:1.1.0"
implementation "androidx.appcompat:appcompat:1.2.0"
implementation "androidx.core:core-ktx:1.3.1"
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"
// Network
implementation 'com.squareup.retrofit2:retrofit:2.6.2'
implementation 'com.squareup.retrofit2:converter-moshi:2.6.2'
implementation 'com.squareup.okhttp3:okhttp:4.2.2'
implementation 'com.squareup.okhttp3:logging-interceptor:4.2.2'
implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
implementation "com.squareup.retrofit2:converter-moshi:$retrofit_version"
implementation(platform("com.squareup.okhttp3:okhttp-bom:4.8.1"))
implementation 'com.squareup.okhttp3:okhttp'
implementation 'com.squareup.okhttp3:logging-interceptor'
implementation 'com.squareup.okhttp3:okhttp-urlconnection'
implementation "com.squareup.moshi:moshi-adapters:$moshi_version"
kapt "com.squareup.moshi:moshi-kotlin-codegen:$moshi_version"
implementation "ru.noties.markwon:core:$markwon_version"
// Image
implementation 'androidx.exifinterface:exifinterface:1.1.0'
implementation 'androidx.exifinterface:exifinterface:1.3.0-alpha01'
// Database
implementation 'com.github.Zhuinden:realm-monarchy:0.5.1'
kapt 'dk.ilios:realmfieldnameshelper:1.1.1'
// Work
implementation "androidx.work:work-runtime-ktx:2.3.0"
implementation "androidx.work:work-runtime-ktx:$work_version"
// FP
implementation "io.arrow-kt:arrow-core:$arrow_version"
@@ -144,9 +177,21 @@ dependencies {
implementation 'com.jakewharton.timber:timber:4.7.1'
implementation 'com.facebook.stetho:stetho-okhttp3:1.5.1'
debugImplementation 'com.nikitakozlov.pury:pury:1.1.0'
releaseImplementation 'com.nikitakozlov.pury:pury-no-op:1.1.0'
// Bus
implementation 'org.greenrobot:eventbus:3.1.1'
// Phone number https://github.com/google/libphonenumber
implementation 'com.googlecode.libphonenumber:libphonenumber:8.10.23'
// Web RTC
// org.webrtc:google-webrtc is for development purposes only. See http://webrtc.github.io/webrtc-org/native-code/android/
// implementation 'org.webrtc:google-webrtc:1.0.+'
// Use the same WebRTC library than the one used by Jitsi library
implementation('com.facebook.react:react-native-webrtc:1.84.0-jitsi-5112273@aar')
debugImplementation 'com.airbnb.okreplay:okreplay:1.5.0'
releaseImplementation 'com.airbnb.okreplay:noop:1.5.0'
androidTestImplementation 'com.airbnb.okreplay:espresso:1.5.0'
@@ -158,7 +203,10 @@ dependencies {
testImplementation 'io.mockk:mockk:1.9.2.kotlin12'
testImplementation 'org.amshove.kluent:kluent-android:1.44'
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version"
// Plant Timber tree for test
testImplementation 'net.lachlanmckee:timber-junit-rule:1.0.1'
kaptAndroidTest "com.google.dagger:dagger-compiler:$daggerVersion"
androidTestImplementation 'androidx.test:core:1.2.0'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test:rules:1.2.0'
@@ -169,5 +217,8 @@ dependencies {
androidTestImplementation 'io.mockk:mockk-android:1.9.2.kotlin12'
androidTestImplementation "androidx.arch.core:core-testing:$arch_version"
androidTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version"
// Plant Timber tree for test
androidTestImplementation 'net.lachlanmckee:timber-junit-rule:1.0.1'
androidTestUtil 'androidx.test:orchestrator:1.2.0'
}

View File

@@ -29,5 +29,6 @@
<issue id="SetTextI18n" severity="error" />
<issue id="ViewConstructor" severity="error" />
<issue id="UseValueOf" severity="error" />
<issue id="ObsoleteSdkInt" severity="error" />
</lint>

View File

@@ -19,3 +19,64 @@
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
### EVENT BUS ###
-keepattributes *Annotation*
-keepclassmembers class * {
@org.greenrobot.eventbus.Subscribe <methods>;
}
-keep enum org.greenrobot.eventbus.ThreadMode { *; }
### MOSHI ###
# JSR 305 annotations are for embedding nullability information.
-dontwarn javax.annotation.**
-keepclasseswithmembers class * {
@com.squareup.moshi.* <methods>;
}
-keep @com.squareup.moshi.JsonQualifier interface *
# Enum field names are used by the integrated EnumJsonAdapter.
# values() is synthesized by the Kotlin compiler and is used by EnumJsonAdapter indirectly
# Annotate enums with @JsonClass(generateAdapter = false) to use them with Moshi.
-keepclassmembers @com.squareup.moshi.JsonClass class * extends java.lang.Enum {
<fields>;
**[] values();
}
-keep class kotlin.reflect.jvm.internal.impl.builtins.BuiltInsLoaderImpl
-keepclassmembers class kotlin.Metadata {
public <methods>;
}
### OKHTTP for Android Studio ###
-keep class okhttp3.Headers { *; }
-keep interface okhttp3.Interceptor.* { *; }
### OLM JNI ###
-keep class org.matrix.olm.** { *; }
### Webrtc
-keep class org.webrtc.** { *; }
### Serializable persisted classes
# https://www.guardsquare.com/en/products/proguard/manual/examples#serializable
-keepnames class * implements java.io.Serializable
-keepclassmembers class * implements java.io.Serializable {
static final long serialVersionUID;
private static final java.io.ObjectStreamField[] serialPersistentFields;
!static !transient <fields>;
!private <fields>;
!private <methods>;
private void writeObject(java.io.ObjectOutputStream);
private void readObject(java.io.ObjectInputStream);
java.lang.Object writeReplace();
java.lang.Object readResolve();
}

View File

@@ -1,32 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package im.vector.matrix.android
import android.content.Context
import androidx.test.core.app.ApplicationProvider
import java.io.File
interface InstrumentedTest {
fun context(): Context {
return ApplicationProvider.getApplicationContext()
}
fun cacheDir(): File {
return context().cacheDir
}
}

View File

@@ -1,293 +0,0 @@
/*
* Copyright 2016 OpenMarket Ltd
* Copyright 2018 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package im.vector.matrix.android.common
import android.content.Context
import android.net.Uri
import androidx.lifecycle.Observer
import im.vector.matrix.android.api.Matrix
import im.vector.matrix.android.api.MatrixCallback
import im.vector.matrix.android.api.MatrixConfiguration
import im.vector.matrix.android.api.auth.data.HomeServerConnectionConfig
import im.vector.matrix.android.api.auth.data.LoginFlowResult
import im.vector.matrix.android.api.auth.registration.RegistrationResult
import im.vector.matrix.android.api.session.Session
import im.vector.matrix.android.api.session.events.model.EventType
import im.vector.matrix.android.api.session.room.Room
import im.vector.matrix.android.api.session.room.timeline.Timeline
import im.vector.matrix.android.api.session.room.timeline.TimelineEvent
import im.vector.matrix.android.api.session.room.timeline.TimelineSettings
import im.vector.matrix.android.api.session.sync.SyncState
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertTrue
import java.util.ArrayList
import java.util.UUID
import java.util.concurrent.CountDownLatch
import java.util.concurrent.TimeUnit
/**
* This class exposes methods to be used in common cases
* Registration, login, Sync, Sending messages...
*/
class CommonTestHelper(context: Context) {
val matrix: Matrix
init {
Matrix.initialize(context, MatrixConfiguration("TestFlavor"))
matrix = Matrix.getInstance(context)
}
fun createAccount(userNamePrefix: String, testParams: SessionTestParams): Session {
return createAccount(userNamePrefix, TestConstants.PASSWORD, testParams)
}
fun logIntoAccount(userId: String, testParams: SessionTestParams): Session {
return logIntoAccount(userId, TestConstants.PASSWORD, testParams)
}
/**
* Create a Home server configuration, with Http connection allowed for test
*/
fun createHomeServerConfig(): HomeServerConnectionConfig {
return HomeServerConnectionConfig.Builder()
.withHomeServerUri(Uri.parse(TestConstants.TESTS_HOME_SERVER_URL))
.build()
}
/**
* This methods init the event stream and check for initial sync
*
* @param session the session to sync
*/
fun syncSession(session: Session) {
val lock = CountDownLatch(1)
session.open()
session.startSync(true)
val syncLiveData = runBlocking(Dispatchers.Main) {
session.getSyncStateLive()
}
val syncObserver = object : Observer<SyncState> {
override fun onChanged(t: SyncState?) {
if (session.hasAlreadySynced()) {
lock.countDown()
syncLiveData.removeObserver(this)
}
}
}
GlobalScope.launch(Dispatchers.Main) { syncLiveData.observeForever(syncObserver) }
await(lock)
}
/**
* Sends text messages in a room
*
* @param room the room where to send the messages
* @param message the message to send
* @param nbOfMessages the number of time the message will be sent
*/
fun sendTextMessage(room: Room, message: String, nbOfMessages: Int): List<TimelineEvent> {
val sentEvents = ArrayList<TimelineEvent>(nbOfMessages)
val latch = CountDownLatch(nbOfMessages)
val onEventSentListener = object : Timeline.Listener {
override fun onTimelineFailure(throwable: Throwable) {
}
override fun onNewTimelineEvents(eventIds: List<String>) {
// noop
}
override fun onTimelineUpdated(snapshot: List<TimelineEvent>) {
// TODO Count only new messages?
if (snapshot.count { it.root.type == EventType.MESSAGE } == nbOfMessages) {
sentEvents.addAll(snapshot.filter { it.root.type == EventType.MESSAGE })
latch.countDown()
}
}
}
val timeline = room.createTimeline(null, TimelineSettings(10))
timeline.addListener(onEventSentListener)
for (i in 0 until nbOfMessages) {
room.sendTextMessage(message + " #" + (i + 1))
}
await(latch)
timeline.removeListener(onEventSentListener)
// Check that all events has been created
assertEquals(nbOfMessages.toLong(), sentEvents.size.toLong())
return sentEvents
}
// PRIVATE METHODS *****************************************************************************
/**
* Creates a unique account
*
* @param userNamePrefix the user name prefix
* @param password the password
* @param testParams test params about the session
* @return the session associated with the newly created account
*/
private fun createAccount(userNamePrefix: String,
password: String,
testParams: SessionTestParams): Session {
val session = createAccountAndSync(
userNamePrefix + "_" + System.currentTimeMillis() + UUID.randomUUID(),
password,
testParams
)
assertNotNull(session)
return session
}
/**
* Logs into an existing account
*
* @param userId the userId to log in
* @param password the password to log in
* @param testParams test params about the session
* @return the session associated with the existing account
*/
private fun logIntoAccount(userId: String,
password: String,
testParams: SessionTestParams): Session {
val session = logAccountAndSync(userId, password, testParams)
assertNotNull(session)
return session
}
/**
* Create an account and a dedicated session
*
* @param userName the account username
* @param password the password
* @param sessionTestParams parameters for the test
*/
private fun createAccountAndSync(userName: String,
password: String,
sessionTestParams: SessionTestParams): Session {
val hs = createHomeServerConfig()
doSync<LoginFlowResult> {
matrix.authenticationService
.getLoginFlow(hs, it)
}
doSync<RegistrationResult> {
matrix.authenticationService
.getRegistrationWizard()
.createAccount(userName, password, null, it)
}
// Preform dummy step
val registrationResult = doSync<RegistrationResult> {
matrix.authenticationService
.getRegistrationWizard()
.dummy(it)
}
assertTrue(registrationResult is RegistrationResult.Success)
val session = (registrationResult as RegistrationResult.Success).session
if (sessionTestParams.withInitialSync) {
syncSession(session)
}
return session
}
/**
* Start an account login
*
* @param userName the account username
* @param password the password
* @param sessionTestParams session test params
*/
private fun logAccountAndSync(userName: String,
password: String,
sessionTestParams: SessionTestParams): Session {
val hs = createHomeServerConfig()
doSync<LoginFlowResult> {
matrix.authenticationService
.getLoginFlow(hs, it)
}
val session = doSync<Session> {
matrix.authenticationService
.getLoginWizard()
.login(userName, password, "myDevice", it)
}
if (sessionTestParams.withInitialSync) {
syncSession(session)
}
return session
}
/**
* Await for a latch and ensure the result is true
*
* @param latch
* @throws InterruptedException
*/
fun await(latch: CountDownLatch) {
assertTrue(latch.await(TestConstants.timeOutMillis, TimeUnit.MILLISECONDS))
}
// Transform a method with a MatrixCallback to a synchronous method
inline fun <reified T> doSync(block: (MatrixCallback<T>) -> Unit): T {
val lock = CountDownLatch(1)
var result: T? = null
val callback = object : TestMatrixCallback<T>(lock) {
override fun onSuccess(data: T) {
result = data
super.onSuccess(data)
}
}
block.invoke(callback)
await(lock)
assertNotNull(result)
return result!!
}
/**
* Clear all provided sessions
*/
fun Iterable<Session>.close() = forEach { it.close() }
fun signout(session: Session) {
val lock = CountDownLatch(1)
session.signOut(true, TestMatrixCallback(lock))
await(lock)
}
}

View File

@@ -1,31 +0,0 @@
/*
* Copyright 2018 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package im.vector.matrix.android.common
import im.vector.matrix.android.api.session.Session
data class CryptoTestData(val firstSession: Session,
val roomId: String,
val secondSession: Session? = null,
val thirdSession: Session? = null) {
fun close() {
firstSession.close()
secondSession?.close()
secondSession?.close()
}
}

View File

@@ -1,357 +0,0 @@
/*
* Copyright 2018 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package im.vector.matrix.android.common
import android.os.SystemClock
import androidx.lifecycle.Observer
import im.vector.matrix.android.api.session.Session
import im.vector.matrix.android.api.session.events.model.Event
import im.vector.matrix.android.api.session.events.model.EventType
import im.vector.matrix.android.api.session.events.model.toContent
import im.vector.matrix.android.api.session.room.model.Membership
import im.vector.matrix.android.api.session.room.model.RoomSummary
import im.vector.matrix.android.api.session.room.model.create.CreateRoomParams
import im.vector.matrix.android.api.session.room.roomSummaryQueryParams
import im.vector.matrix.android.api.session.room.timeline.Timeline
import im.vector.matrix.android.api.session.room.timeline.TimelineEvent
import im.vector.matrix.android.api.session.room.timeline.TimelineSettings
import im.vector.matrix.android.internal.crypto.MXCRYPTO_ALGORITHM_MEGOLM
import im.vector.matrix.android.internal.crypto.MXCRYPTO_ALGORITHM_MEGOLM_BACKUP
import im.vector.matrix.android.internal.crypto.keysbackup.model.MegolmBackupAuthData
import im.vector.matrix.android.internal.crypto.keysbackup.model.MegolmBackupCreationInfo
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertNull
import org.junit.Assert.assertTrue
import java.util.Arrays
import java.util.HashMap
import java.util.concurrent.CountDownLatch
class CryptoTestHelper(val mTestHelper: CommonTestHelper) {
val messagesFromAlice: List<String> = Arrays.asList("0 - Hello I'm Alice!", "4 - Go!")
val messagesFromBob: List<String> = Arrays.asList("1 - Hello I'm Bob!", "2 - Isn't life grand?", "3 - Let's go to the opera.")
val defaultSessionParams = SessionTestParams(true)
/**
* @return alice session
*/
fun doE2ETestWithAliceInARoom(): CryptoTestData {
val aliceSession = mTestHelper.createAccount(TestConstants.USER_ALICE, defaultSessionParams)
var roomId: String? = null
val lock1 = CountDownLatch(1)
aliceSession.createRoom(CreateRoomParams(name = "MyRoom"), object : TestMatrixCallback<String>(lock1) {
override fun onSuccess(data: String) {
roomId = data
super.onSuccess(data)
}
})
mTestHelper.await(lock1)
assertNotNull(roomId)
val room = aliceSession.getRoom(roomId!!)!!
val lock2 = CountDownLatch(1)
room.enableEncryption(callback = TestMatrixCallback(lock2))
mTestHelper.await(lock2)
return CryptoTestData(aliceSession, roomId!!)
}
/**
* @return alice and bob sessions
*/
fun doE2ETestWithAliceAndBobInARoom(): CryptoTestData {
val statuses = HashMap<String, String>()
val cryptoTestData = doE2ETestWithAliceInARoom()
val aliceSession = cryptoTestData.firstSession
val aliceRoomId = cryptoTestData.roomId
val aliceRoom = aliceSession.getRoom(aliceRoomId)!!
val bobSession = mTestHelper.createAccount(TestConstants.USER_BOB, defaultSessionParams)
val lock1 = CountDownLatch(2)
val bobRoomSummariesLive = runBlocking(Dispatchers.Main) {
bobSession.getRoomSummariesLive(roomSummaryQueryParams { })
}
val newRoomObserver = object : Observer<List<RoomSummary>> {
override fun onChanged(t: List<RoomSummary>?) {
if (t?.isNotEmpty() == true) {
statuses["onNewRoom"] = "onNewRoom"
lock1.countDown()
bobRoomSummariesLive.removeObserver(this)
}
}
}
GlobalScope.launch(Dispatchers.Main) {
bobRoomSummariesLive.observeForever(newRoomObserver)
}
aliceRoom.invite(bobSession.myUserId, callback = object : TestMatrixCallback<Unit>(lock1) {
override fun onSuccess(data: Unit) {
statuses["invite"] = "invite"
super.onSuccess(data)
}
})
mTestHelper.await(lock1)
assertTrue(statuses.containsKey("invite") && statuses.containsKey("onNewRoom"))
val lock2 = CountDownLatch(2)
val roomJoinedObserver = object : Observer<List<RoomSummary>> {
override fun onChanged(t: List<RoomSummary>?) {
if (bobSession.getRoom(aliceRoomId)
?.getRoomMember(aliceSession.myUserId)
?.membership == Membership.JOIN) {
statuses["AliceJoin"] = "AliceJoin"
lock2.countDown()
bobRoomSummariesLive.removeObserver(this)
}
}
}
GlobalScope.launch(Dispatchers.Main) {
bobRoomSummariesLive.observeForever(roomJoinedObserver)
}
bobSession.joinRoom(aliceRoomId, callback = TestMatrixCallback(lock2))
mTestHelper.await(lock2)
// Ensure bob can send messages to the room
// val roomFromBobPOV = bobSession.getRoom(aliceRoomId)!!
// assertNotNull(roomFromBobPOV.powerLevels)
// assertTrue(roomFromBobPOV.powerLevels.maySendMessage(bobSession.myUserId))
assertTrue(statuses.toString() + "", statuses.containsKey("AliceJoin"))
// bobSession.dataHandler.removeListener(bobEventListener)
return CryptoTestData(aliceSession, aliceRoomId, bobSession)
}
/**
* @return Alice, Bob and Sam session
*/
fun doE2ETestWithAliceAndBobAndSamInARoom(): CryptoTestData {
val statuses = HashMap<String, String>()
val cryptoTestData = doE2ETestWithAliceAndBobInARoom()
val aliceSession = cryptoTestData.firstSession
val aliceRoomId = cryptoTestData.roomId
val room = aliceSession.getRoom(aliceRoomId)!!
val samSession = mTestHelper.createAccount(TestConstants.USER_SAM, defaultSessionParams)
val lock1 = CountDownLatch(2)
// val samEventListener = object : MXEventListener() {
// override fun onNewRoom(roomId: String) {
// if (TextUtils.equals(roomId, aliceRoomId)) {
// if (!statuses.containsKey("onNewRoom")) {
// statuses["onNewRoom"] = "onNewRoom"
// lock1.countDown()
// }
// }
// }
// }
//
// samSession.dataHandler.addListener(samEventListener)
room.invite(samSession.myUserId, null, object : TestMatrixCallback<Unit>(lock1) {
override fun onSuccess(data: Unit) {
statuses["invite"] = "invite"
super.onSuccess(data)
}
})
mTestHelper.await(lock1)
assertTrue(statuses.containsKey("invite") && statuses.containsKey("onNewRoom"))
// samSession.dataHandler.removeListener(samEventListener)
val lock2 = CountDownLatch(1)
samSession.joinRoom(aliceRoomId, null, object : TestMatrixCallback<Unit>(lock2) {
override fun onSuccess(data: Unit) {
statuses["joinRoom"] = "joinRoom"
super.onSuccess(data)
}
})
mTestHelper.await(lock2)
assertTrue(statuses.containsKey("joinRoom"))
// wait the initial sync
SystemClock.sleep(1000)
// samSession.dataHandler.removeListener(samEventListener)
return CryptoTestData(aliceSession, aliceRoomId, cryptoTestData.secondSession, samSession)
}
/**
* @return Alice and Bob sessions
*/
fun doE2ETestWithAliceAndBobInARoomWithEncryptedMessages(): CryptoTestData {
val cryptoTestData = doE2ETestWithAliceAndBobInARoom()
val aliceSession = cryptoTestData.firstSession
val aliceRoomId = cryptoTestData.roomId
val bobSession = cryptoTestData.secondSession!!
bobSession.setWarnOnUnknownDevices(false)
aliceSession.setWarnOnUnknownDevices(false)
val roomFromBobPOV = bobSession.getRoom(aliceRoomId)!!
val roomFromAlicePOV = aliceSession.getRoom(aliceRoomId)!!
var lock = CountDownLatch(1)
val bobEventsListener = object : Timeline.Listener {
override fun onTimelineFailure(throwable: Throwable) {
// noop
}
override fun onNewTimelineEvents(eventIds: List<String>) {
// noop
}
override fun onTimelineUpdated(snapshot: List<TimelineEvent>) {
val size = snapshot.filter { it.root.senderId != bobSession.myUserId && it.root.getClearType() == EventType.MESSAGE }
.size
if (size == 3) {
lock.countDown()
}
}
}
val bobTimeline = roomFromBobPOV.createTimeline(null, TimelineSettings(10))
bobTimeline.addListener(bobEventsListener)
val results = HashMap<String, Any>()
// bobSession.dataHandler.addListener(object : MXEventListener() {
// override fun onToDeviceEvent(event: Event) {
// results["onToDeviceEvent"] = event
// lock.countDown()
// }
// })
// Alice sends a message
roomFromAlicePOV.sendTextMessage(messagesFromAlice[0])
assertTrue(results.containsKey("onToDeviceEvent"))
// assertEquals(1, messagesReceivedByBobCount)
// Bob send a message
lock = CountDownLatch(1)
roomFromBobPOV.sendTextMessage(messagesFromBob[0])
// android does not echo the messages sent from itself
// messagesReceivedByBobCount++
mTestHelper.await(lock)
// assertEquals(2, messagesReceivedByBobCount)
// Bob send a message
lock = CountDownLatch(1)
roomFromBobPOV.sendTextMessage(messagesFromBob[1])
// android does not echo the messages sent from itself
// messagesReceivedByBobCount++
mTestHelper.await(lock)
// assertEquals(3, messagesReceivedByBobCount)
// Bob send a message
lock = CountDownLatch(1)
roomFromBobPOV.sendTextMessage(messagesFromBob[2])
// android does not echo the messages sent from itself
// messagesReceivedByBobCount++
mTestHelper.await(lock)
// assertEquals(4, messagesReceivedByBobCount)
// Alice sends a message
lock = CountDownLatch(2)
roomFromAlicePOV.sendTextMessage(messagesFromAlice[1])
mTestHelper.await(lock)
// assertEquals(5, messagesReceivedByBobCount)
bobTimeline.removeListener(bobEventsListener)
return cryptoTestData
}
fun checkEncryptedEvent(event: Event, roomId: String, clearMessage: String, senderSession: Session) {
assertEquals(EventType.ENCRYPTED, event.type)
assertNotNull(event.content)
val eventWireContent = event.content.toContent()
assertNotNull(eventWireContent)
assertNull(eventWireContent.get("body"))
assertEquals(MXCRYPTO_ALGORITHM_MEGOLM, eventWireContent.get("algorithm"))
assertNotNull(eventWireContent.get("ciphertext"))
assertNotNull(eventWireContent.get("session_id"))
assertNotNull(eventWireContent.get("sender_key"))
assertEquals(senderSession.sessionParams.credentials.deviceId, eventWireContent.get("device_id"))
assertNotNull(event.eventId)
assertEquals(roomId, event.roomId)
assertEquals(EventType.MESSAGE, event.getClearType())
// TODO assertTrue(event.getAge() < 10000)
val eventContent = event.toContent()
assertNotNull(eventContent)
assertEquals(clearMessage, eventContent.get("body"))
assertEquals(senderSession.myUserId, event.senderId)
}
fun createFakeMegolmBackupAuthData(): MegolmBackupAuthData {
return MegolmBackupAuthData(
publicKey = "abcdefg",
signatures = HashMap<String, Map<String, String>>().apply {
this["something"] = HashMap<String, String>().apply {
this["ed25519:something"] = "hijklmnop"
}
}
)
}
fun createFakeMegolmBackupCreationInfo(): MegolmBackupCreationInfo {
return MegolmBackupCreationInfo().apply {
algorithm = MXCRYPTO_ALGORITHM_MEGOLM_BACKUP
authData = createFakeMegolmBackupAuthData()
}
}
}

View File

@@ -1,48 +0,0 @@
/*
* Copyright 2018 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package im.vector.matrix.android.common
import androidx.annotation.CallSuper
import im.vector.matrix.android.api.MatrixCallback
import org.junit.Assert.fail
import timber.log.Timber
import java.util.concurrent.CountDownLatch
/**
* Simple implementation of MatrixCallback, which count down the CountDownLatch on each API callback
* @param onlySuccessful true to fail if an error occurs. This is the default behavior
* @param <T>
*/
open class TestMatrixCallback<T>(private val countDownLatch: CountDownLatch,
private val onlySuccessful: Boolean = true) : MatrixCallback<T> {
@CallSuper
override fun onSuccess(data: T) {
countDownLatch.countDown()
}
@CallSuper
override fun onFailure(failure: Throwable) {
Timber.e(failure, "TestApiCallback")
if (onlySuccessful) {
fail("onFailure " + failure.localizedMessage)
}
countDownLatch.countDown()
}
}

View File

@@ -1,44 +0,0 @@
/*
* Copyright 2018 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package im.vector.matrix.android.internal.crypto
import im.vector.matrix.android.api.auth.data.Credentials
import im.vector.matrix.android.internal.crypto.store.IMXCryptoStore
import im.vector.matrix.android.internal.crypto.store.db.RealmCryptoStore
import im.vector.matrix.android.internal.crypto.store.db.RealmCryptoStoreModule
import io.realm.RealmConfiguration
import kotlin.random.Random
internal class CryptoStoreHelper {
fun createStore(): IMXCryptoStore {
return RealmCryptoStore(
realmConfiguration = RealmConfiguration.Builder()
.name("test.realm")
.modules(RealmCryptoStoreModule())
.build(),
credentials = createCredential())
}
fun createCredential() = Credentials(
userId = "userId_" + Random.nextInt(),
homeServer = "http://matrix.org",
accessToken = "access_token",
refreshToken = null,
deviceId = "deviceId_sample"
)
}

View File

@@ -1,209 +0,0 @@
package im.vector.matrix.android.internal.crypto.crosssigning
import androidx.test.ext.junit.runners.AndroidJUnit4
import im.vector.matrix.android.InstrumentedTest
import im.vector.matrix.android.api.MatrixCallback
import im.vector.matrix.android.common.CommonTestHelper
import im.vector.matrix.android.common.CryptoTestHelper
import im.vector.matrix.android.common.SessionTestParams
import im.vector.matrix.android.common.TestConstants
import im.vector.matrix.android.common.TestMatrixCallback
import im.vector.matrix.android.internal.crypto.model.CryptoDeviceInfo
import im.vector.matrix.android.internal.crypto.model.MXUsersDevicesMap
import im.vector.matrix.android.internal.crypto.model.rest.UserPasswordAuth
import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertNull
import org.junit.Assert.assertTrue
import org.junit.Assert.fail
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
import java.util.concurrent.CountDownLatch
@RunWith(AndroidJUnit4::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
class XSigningTest : InstrumentedTest {
private val mTestHelper = CommonTestHelper(context())
private val mCryptoTestHelper = CryptoTestHelper(mTestHelper)
@Test
fun test_InitializeAndStoreKeys() {
val aliceSession = mTestHelper.createAccount(TestConstants.USER_ALICE, SessionTestParams(true))
val aliceLatch = CountDownLatch(1)
aliceSession.getCrossSigningService()
.initializeCrossSigning(UserPasswordAuth(
user = aliceSession.myUserId,
password = TestConstants.PASSWORD
), TestMatrixCallback(aliceLatch))
mTestHelper.await(aliceLatch)
val myCrossSigningKeys = aliceSession.getCrossSigningService().getMyCrossSigningKeys()
val masterPubKey = myCrossSigningKeys?.masterKey()
assertNotNull("Master key should be stored", masterPubKey?.unpaddedBase64PublicKey)
val selfSigningKey = myCrossSigningKeys?.selfSigningKey()
assertNotNull("SelfSigned key should be stored", selfSigningKey?.unpaddedBase64PublicKey)
val userKey = myCrossSigningKeys?.userKey()
assertNotNull("User key should be stored", userKey?.unpaddedBase64PublicKey)
assertTrue("Signing Keys should be trusted", myCrossSigningKeys?.isTrusted() == true)
assertTrue("Signing Keys should be trusted", aliceSession.getCrossSigningService().checkUserTrust(aliceSession.myUserId).isVerified())
mTestHelper.signout(aliceSession)
}
@Test
fun test_CrossSigningCheckBobSeesTheKeys() {
val cryptoTestData = mCryptoTestHelper.doE2ETestWithAliceAndBobInARoom()
val aliceSession = cryptoTestData.firstSession
val bobSession = cryptoTestData.secondSession
val aliceAuthParams = UserPasswordAuth(
user = aliceSession.myUserId,
password = TestConstants.PASSWORD
)
val bobAuthParams = UserPasswordAuth(
user = bobSession!!.myUserId,
password = TestConstants.PASSWORD
)
val latch = CountDownLatch(2)
aliceSession.getCrossSigningService().initializeCrossSigning(aliceAuthParams, TestMatrixCallback(latch))
bobSession.getCrossSigningService().initializeCrossSigning(bobAuthParams, TestMatrixCallback(latch))
mTestHelper.await(latch)
// Check that alice can see bob keys
val downloadLatch = CountDownLatch(1)
aliceSession.downloadKeys(listOf(bobSession.myUserId), true, TestMatrixCallback(downloadLatch))
mTestHelper.await(downloadLatch)
val bobKeysFromAlicePOV = aliceSession.getCrossSigningService().getUserCrossSigningKeys(bobSession.myUserId)
assertNotNull("Alice can see bob Master key", bobKeysFromAlicePOV!!.masterKey())
assertNull("Alice should not see bob User key", bobKeysFromAlicePOV.userKey())
assertNotNull("Alice can see bob SelfSigned key", bobKeysFromAlicePOV.selfSigningKey())
assertEquals("Bob keys from alice pov should match", bobKeysFromAlicePOV.masterKey()?.unpaddedBase64PublicKey, bobSession.getCrossSigningService().getMyCrossSigningKeys()?.masterKey()?.unpaddedBase64PublicKey)
assertEquals("Bob keys from alice pov should match", bobKeysFromAlicePOV.selfSigningKey()?.unpaddedBase64PublicKey, bobSession.getCrossSigningService().getMyCrossSigningKeys()?.selfSigningKey()?.unpaddedBase64PublicKey)
assertFalse("Bob keys from alice pov should not be trusted", bobKeysFromAlicePOV.isTrusted())
mTestHelper.signout(aliceSession)
mTestHelper.signout(bobSession)
}
@Test
fun test_CrossSigningTestAliceTrustBobNewDevice() {
val cryptoTestData = mCryptoTestHelper.doE2ETestWithAliceAndBobInARoom()
val aliceSession = cryptoTestData.firstSession
val bobSession = cryptoTestData.secondSession
val aliceAuthParams = UserPasswordAuth(
user = aliceSession.myUserId,
password = TestConstants.PASSWORD
)
val bobAuthParams = UserPasswordAuth(
user = bobSession!!.myUserId,
password = TestConstants.PASSWORD
)
val latch = CountDownLatch(2)
aliceSession.getCrossSigningService().initializeCrossSigning(aliceAuthParams, TestMatrixCallback(latch))
bobSession.getCrossSigningService().initializeCrossSigning(bobAuthParams, TestMatrixCallback(latch))
mTestHelper.await(latch)
// Check that alice can see bob keys
val downloadLatch = CountDownLatch(1)
val bobUserId = bobSession.myUserId
aliceSession.downloadKeys(listOf(bobUserId), true, TestMatrixCallback(downloadLatch))
mTestHelper.await(downloadLatch)
val bobKeysFromAlicePOV = aliceSession.getCrossSigningService().getUserCrossSigningKeys(bobUserId)
assertTrue("Bob keys from alice pov should not be trusted", bobKeysFromAlicePOV?.isTrusted() == false)
val trustLatch = CountDownLatch(1)
aliceSession.getCrossSigningService().trustUser(bobUserId, object : MatrixCallback<Unit> {
override fun onSuccess(data: Unit) {
trustLatch.countDown()
}
override fun onFailure(failure: Throwable) {
fail("Failed to trust bob")
}
})
mTestHelper.await(trustLatch)
// Now bobs logs in on a new device and verifies it
// We will want to test that in alice POV, this new device would be trusted by cross signing
val bobSession2 = mTestHelper.logIntoAccount(bobUserId, SessionTestParams(true))
val bobSecondDeviceId = bobSession2.sessionParams.credentials.deviceId
// Check that bob first session sees the new login
val bobKeysLatch = CountDownLatch(1)
bobSession.downloadKeys(listOf(bobUserId), true, object : MatrixCallback<MXUsersDevicesMap<CryptoDeviceInfo>> {
override fun onFailure(failure: Throwable) {
fail("Failed to get device")
}
override fun onSuccess(data: MXUsersDevicesMap<CryptoDeviceInfo>) {
if (data.getUserDeviceIds(bobUserId)?.contains(bobSecondDeviceId!!) == false) {
fail("Bob should see the new device")
}
bobKeysLatch.countDown()
}
})
mTestHelper.await(bobKeysLatch)
val bobSecondDevicePOVFirstDevice = bobSession.getDeviceInfo(bobUserId, bobSecondDeviceId)
assertNotNull("Bob Second device should be known and persisted from first", bobSecondDevicePOVFirstDevice)
// Manually mark it as trusted from first session
val bobSignLatch = CountDownLatch(1)
bobSession.getCrossSigningService().signDevice(bobSecondDeviceId!!, object : MatrixCallback<Unit> {
override fun onSuccess(data: Unit) {
bobSignLatch.countDown()
}
override fun onFailure(failure: Throwable) {
fail("Failed to trust bob ${failure.localizedMessage}")
}
})
mTestHelper.await(bobSignLatch)
// Now alice should cross trust bob's second device
val aliceKeysLatch = CountDownLatch(1)
aliceSession.downloadKeys(listOf(bobUserId), true, object : MatrixCallback<MXUsersDevicesMap<CryptoDeviceInfo>> {
override fun onFailure(failure: Throwable) {
fail("Failed to get device")
}
override fun onSuccess(data: MXUsersDevicesMap<CryptoDeviceInfo>) {
// check that the device is seen
if (data.getUserDeviceIds(bobUserId)?.contains(bobSecondDeviceId) == false) {
fail("Alice should see the new device")
}
aliceKeysLatch.countDown()
}
})
mTestHelper.await(aliceKeysLatch)
val result = aliceSession.getCrossSigningService().checkDeviceTrust(bobUserId, bobSecondDeviceId, null)
assertTrue("Bob second device should be trusted from alice POV", result.isCrossSignedVerified())
mTestHelper.signout(aliceSession)
mTestHelper.signout(bobSession)
mTestHelper.signout(bobSession2)
}
}

View File

@@ -1,519 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package im.vector.matrix.android.internal.crypto.verification
import androidx.test.ext.junit.runners.AndroidJUnit4
import im.vector.matrix.android.InstrumentedTest
import im.vector.matrix.android.api.session.Session
import im.vector.matrix.android.api.session.crypto.sas.CancelCode
import im.vector.matrix.android.api.session.crypto.sas.IncomingSasVerificationTransaction
import im.vector.matrix.android.api.session.crypto.sas.OutgoingSasVerificationTransaction
import im.vector.matrix.android.api.session.crypto.sas.SasMode
import im.vector.matrix.android.api.session.crypto.sas.VerificationMethod
import im.vector.matrix.android.api.session.crypto.sas.VerificationService
import im.vector.matrix.android.api.session.crypto.sas.VerificationTransaction
import im.vector.matrix.android.api.session.crypto.sas.VerificationTxState
import im.vector.matrix.android.api.session.events.model.Event
import im.vector.matrix.android.api.session.events.model.toModel
import im.vector.matrix.android.common.CommonTestHelper
import im.vector.matrix.android.common.CryptoTestHelper
import im.vector.matrix.android.internal.crypto.model.CryptoDeviceInfo
import im.vector.matrix.android.internal.crypto.model.MXUsersDevicesMap
import im.vector.matrix.android.internal.crypto.model.rest.KeyVerificationAccept
import im.vector.matrix.android.internal.crypto.model.rest.KeyVerificationCancel
import im.vector.matrix.android.internal.crypto.model.rest.KeyVerificationStart
import im.vector.matrix.android.internal.crypto.model.rest.toValue
import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertNull
import org.junit.Assert.assertTrue
import org.junit.Assert.fail
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
import java.util.concurrent.CountDownLatch
@RunWith(AndroidJUnit4::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
class SASTest : InstrumentedTest {
private val mTestHelper = CommonTestHelper(context())
private val mCryptoTestHelper = CryptoTestHelper(mTestHelper)
@Test
fun test_aliceStartThenAliceCancel() {
val cryptoTestData = mCryptoTestHelper.doE2ETestWithAliceAndBobInARoom()
val aliceSession = cryptoTestData.firstSession
val bobSession = cryptoTestData.secondSession
val aliceVerificationService = aliceSession.getVerificationService()
val bobVerificationService = bobSession!!.getVerificationService()
val bobTxCreatedLatch = CountDownLatch(1)
val bobListener = object : VerificationService.Listener {
override fun transactionUpdated(tx: VerificationTransaction) {
bobTxCreatedLatch.countDown()
}
}
bobVerificationService.addListener(bobListener)
val txID = aliceVerificationService.beginKeyVerification(VerificationMethod.SAS,
bobSession.myUserId,
bobSession.getMyDevice().deviceId,
null)
assertNotNull("Alice should have a started transaction", txID)
val aliceKeyTx = aliceVerificationService.getExistingTransaction(bobSession.myUserId, txID!!)
assertNotNull("Alice should have a started transaction", aliceKeyTx)
mTestHelper.await(bobTxCreatedLatch)
bobVerificationService.removeListener(bobListener)
val bobKeyTx = bobVerificationService.getExistingTransaction(aliceSession.myUserId, txID)
assertNotNull("Bob should have started verif transaction", bobKeyTx)
assertTrue(bobKeyTx is SASDefaultVerificationTransaction)
assertNotNull("Bob should have starting a SAS transaction", bobKeyTx)
assertTrue(aliceKeyTx is SASDefaultVerificationTransaction)
assertEquals("Alice and Bob have same transaction id", aliceKeyTx!!.transactionId, bobKeyTx!!.transactionId)
val aliceSasTx = aliceKeyTx as SASDefaultVerificationTransaction?
val bobSasTx = bobKeyTx as SASDefaultVerificationTransaction?
assertEquals("Alice state should be started", VerificationTxState.Started, aliceSasTx!!.state)
assertEquals("Bob state should be started by alice", VerificationTxState.OnStarted, bobSasTx!!.state)
// Let's cancel from alice side
val cancelLatch = CountDownLatch(1)
val bobListener2 = object : VerificationService.Listener {
override fun transactionUpdated(tx: VerificationTransaction) {
if (tx.transactionId == txID) {
val immutableState = (tx as SASDefaultVerificationTransaction).state
if (immutableState is VerificationTxState.Cancelled && !immutableState.byMe) {
cancelLatch.countDown()
}
}
}
}
bobVerificationService.addListener(bobListener2)
aliceSasTx.cancel(CancelCode.User)
mTestHelper.await(cancelLatch)
assertTrue("Should be cancelled on alice side", aliceSasTx.state is VerificationTxState.Cancelled)
assertTrue("Should be cancelled on bob side", bobSasTx.state is VerificationTxState.Cancelled)
val aliceCancelState = aliceSasTx.state as VerificationTxState.Cancelled
val bobCancelState = bobSasTx.state as VerificationTxState.Cancelled
assertTrue("Should be cancelled by me on alice side", aliceCancelState.byMe)
assertFalse("Should be cancelled by other on bob side", bobCancelState.byMe)
assertEquals("Should be User cancelled on alice side", CancelCode.User, aliceCancelState.cancelCode)
assertEquals("Should be User cancelled on bob side", CancelCode.User, bobCancelState.cancelCode)
assertNull(bobVerificationService.getExistingTransaction(aliceSession.myUserId, txID))
assertNull(aliceVerificationService.getExistingTransaction(bobSession.myUserId, txID))
cryptoTestData.close()
}
@Test
fun test_key_agreement_protocols_must_include_curve25519() {
fail("Not passing for the moment")
val cryptoTestData = mCryptoTestHelper.doE2ETestWithAliceAndBobInARoom()
val bobSession = cryptoTestData.secondSession!!
val protocols = listOf("meh_dont_know")
val tid = "00000000"
// Bob should receive a cancel
var cancelReason: CancelCode? = null
val cancelLatch = CountDownLatch(1)
val bobListener = object : VerificationService.Listener {
override fun transactionUpdated(tx: VerificationTransaction) {
if (tx.transactionId == tid && tx.state is VerificationTxState.Cancelled) {
cancelReason = (tx.state as VerificationTxState.Cancelled).cancelCode
cancelLatch.countDown()
}
}
}
bobSession.getVerificationService().addListener(bobListener)
// TODO bobSession!!.dataHandler.addListener(object : MXEventListener() {
// TODO override fun onToDeviceEvent(event: Event?) {
// TODO if (event!!.getType() == CryptoEvent.EVENT_TYPE_KEY_VERIFICATION_CANCEL) {
// TODO if (event.contentAsJsonObject?.get("transaction_id")?.asString == tid) {
// TODO canceledToDeviceEvent = event
// TODO cancelLatch.countDown()
// TODO }
// TODO }
// TODO }
// TODO })
val aliceSession = cryptoTestData.firstSession
val aliceUserID = aliceSession.myUserId
val aliceDevice = aliceSession.getMyDevice().deviceId
val aliceListener = object : VerificationService.Listener {
override fun transactionUpdated(tx: VerificationTransaction) {
if ((tx as IncomingSasVerificationTransaction).uxState === IncomingSasVerificationTransaction.UxState.SHOW_ACCEPT) {
(tx as IncomingSasVerificationTransaction).performAccept()
}
}
}
aliceSession.getVerificationService().addListener(aliceListener)
fakeBobStart(bobSession, aliceUserID, aliceDevice, tid, protocols = protocols)
mTestHelper.await(cancelLatch)
assertEquals("Request should be cancelled with m.unknown_method", CancelCode.UnknownMethod, cancelReason)
cryptoTestData.close()
}
@Test
fun test_key_agreement_macs_Must_include_hmac_sha256() {
fail("Not passing for the moment")
val cryptoTestData = mCryptoTestHelper.doE2ETestWithAliceAndBobInARoom()
val bobSession = cryptoTestData.secondSession!!
val mac = listOf("shaBit")
val tid = "00000000"
// Bob should receive a cancel
var canceledToDeviceEvent: Event? = null
val cancelLatch = CountDownLatch(1)
// TODO bobSession!!.dataHandler.addListener(object : MXEventListener() {
// TODO override fun onToDeviceEvent(event: Event?) {
// TODO if (event!!.getType() == CryptoEvent.EVENT_TYPE_KEY_VERIFICATION_CANCEL) {
// TODO if (event.contentAsJsonObject?.get("transaction_id")?.asString == tid) {
// TODO canceledToDeviceEvent = event
// TODO cancelLatch.countDown()
// TODO }
// TODO }
// TODO }
// TODO })
val aliceSession = cryptoTestData.firstSession
val aliceUserID = aliceSession.myUserId
val aliceDevice = aliceSession.getMyDevice().deviceId
fakeBobStart(bobSession, aliceUserID, aliceDevice, tid, mac = mac)
mTestHelper.await(cancelLatch)
val cancelReq = canceledToDeviceEvent!!.content.toModel<KeyVerificationCancel>()!!
assertEquals("Request should be cancelled with m.unknown_method", CancelCode.UnknownMethod.value, cancelReq.code)
cryptoTestData.close()
}
@Test
fun test_key_agreement_short_code_include_decimal() {
fail("Not passing for the moment")
val cryptoTestData = mCryptoTestHelper.doE2ETestWithAliceAndBobInARoom()
val bobSession = cryptoTestData.secondSession!!
val codes = listOf("bin", "foo", "bar")
val tid = "00000000"
// Bob should receive a cancel
var canceledToDeviceEvent: Event? = null
val cancelLatch = CountDownLatch(1)
// TODO bobSession!!.dataHandler.addListener(object : MXEventListener() {
// TODO override fun onToDeviceEvent(event: Event?) {
// TODO if (event!!.getType() == CryptoEvent.EVENT_TYPE_KEY_VERIFICATION_CANCEL) {
// TODO if (event.contentAsJsonObject?.get("transaction_id")?.asString == tid) {
// TODO canceledToDeviceEvent = event
// TODO cancelLatch.countDown()
// TODO }
// TODO }
// TODO }
// TODO })
val aliceSession = cryptoTestData.firstSession
val aliceUserID = aliceSession.myUserId
val aliceDevice = aliceSession.getMyDevice().deviceId
fakeBobStart(bobSession, aliceUserID, aliceDevice, tid, codes = codes)
mTestHelper.await(cancelLatch)
val cancelReq = canceledToDeviceEvent!!.content.toModel<KeyVerificationCancel>()!!
assertEquals("Request should be cancelled with m.unknown_method", CancelCode.UnknownMethod.value, cancelReq.code)
cryptoTestData.close()
}
private fun fakeBobStart(bobSession: Session,
aliceUserID: String?,
aliceDevice: String?,
tid: String,
protocols: List<String> = SASDefaultVerificationTransaction.KNOWN_AGREEMENT_PROTOCOLS,
hashes: List<String> = SASDefaultVerificationTransaction.KNOWN_HASHES,
mac: List<String> = SASDefaultVerificationTransaction.KNOWN_MACS,
codes: List<String> = SASDefaultVerificationTransaction.KNOWN_SHORT_CODES) {
val startMessage = KeyVerificationStart(
fromDevice = bobSession.getMyDevice().deviceId,
method = VerificationMethod.SAS.toValue(),
transactionID = tid,
keyAgreementProtocols = protocols,
hashes = hashes,
messageAuthenticationCodes = mac,
shortAuthenticationStrings = codes
)
val contentMap = MXUsersDevicesMap<Any>()
contentMap.setObject(aliceUserID, aliceDevice, startMessage)
// TODO val sendLatch = CountDownLatch(1)
// TODO bobSession.cryptoRestClient.sendToDevice(
// TODO EventType.KEY_VERIFICATION_START,
// TODO contentMap,
// TODO tid,
// TODO TestMatrixCallback<Void>(sendLatch)
// TODO )
}
// any two devices may only have at most one key verification in flight at a time.
// If a device has two verifications in progress with the same device, then it should cancel both verifications.
@Test
fun test_aliceStartTwoRequests() {
val cryptoTestData = mCryptoTestHelper.doE2ETestWithAliceAndBobInARoom()
val aliceSession = cryptoTestData.firstSession
val bobSession = cryptoTestData.secondSession
val aliceVerificationService = aliceSession.getVerificationService()
val aliceCreatedLatch = CountDownLatch(2)
val aliceCancelledLatch = CountDownLatch(2)
val createdTx = mutableListOf<SASDefaultVerificationTransaction>()
val aliceListener = object : VerificationService.Listener {
override fun transactionCreated(tx: VerificationTransaction) {
createdTx.add(tx as SASDefaultVerificationTransaction)
aliceCreatedLatch.countDown()
}
override fun transactionUpdated(tx: VerificationTransaction) {
if ((tx as SASDefaultVerificationTransaction).state is VerificationTxState.Cancelled && !(tx.state as VerificationTxState.Cancelled).byMe) {
aliceCancelledLatch.countDown()
}
}
}
aliceVerificationService.addListener(aliceListener)
val bobUserId = bobSession!!.myUserId
val bobDeviceId = bobSession.getMyDevice().deviceId
aliceVerificationService.beginKeyVerification(VerificationMethod.SAS, bobUserId, bobDeviceId, null)
aliceVerificationService.beginKeyVerification(VerificationMethod.SAS, bobUserId, bobDeviceId, null)
mTestHelper.await(aliceCreatedLatch)
mTestHelper.await(aliceCancelledLatch)
cryptoTestData.close()
}
/**
* Test that when alice starts a 'correct' request, bob agrees.
*/
@Test
fun test_aliceAndBobAgreement() {
val cryptoTestData = mCryptoTestHelper.doE2ETestWithAliceAndBobInARoom()
val aliceSession = cryptoTestData.firstSession
val bobSession = cryptoTestData.secondSession
val aliceVerificationService = aliceSession.getVerificationService()
val bobVerificationService = bobSession!!.getVerificationService()
var accepted: KeyVerificationAccept? = null
var startReq: KeyVerificationStart? = null
val aliceAcceptedLatch = CountDownLatch(1)
val aliceListener = object : VerificationService.Listener {
override fun transactionUpdated(tx: VerificationTransaction) {
if ((tx as SASDefaultVerificationTransaction).state === VerificationTxState.OnAccepted) {
val at = tx as SASDefaultVerificationTransaction
accepted = at.accepted as? KeyVerificationAccept
startReq = at.startReq as? KeyVerificationStart
aliceAcceptedLatch.countDown()
}
}
}
aliceVerificationService.addListener(aliceListener)
val bobListener = object : VerificationService.Listener {
override fun transactionUpdated(tx: VerificationTransaction) {
if ((tx as IncomingSasVerificationTransaction).uxState === IncomingSasVerificationTransaction.UxState.SHOW_ACCEPT) {
val at = tx as IncomingSasVerificationTransaction
at.performAccept()
}
}
}
bobVerificationService.addListener(bobListener)
val bobUserId = bobSession.myUserId
val bobDeviceId = bobSession.getMyDevice().deviceId
aliceVerificationService.beginKeyVerification(VerificationMethod.SAS, bobUserId, bobDeviceId, null)
mTestHelper.await(aliceAcceptedLatch)
assertTrue("Should have receive a commitment", accepted!!.commitment?.trim()?.isEmpty() == false)
// check that agreement is valid
assertTrue("Agreed Protocol should be Valid", accepted!!.isValid())
assertTrue("Agreed Protocol should be known by alice", startReq!!.keyAgreementProtocols!!.contains(accepted!!.keyAgreementProtocol))
assertTrue("Hash should be known by alice", startReq!!.hashes!!.contains(accepted!!.hash))
assertTrue("Hash should be known by alice", startReq!!.messageAuthenticationCodes!!.contains(accepted!!.messageAuthenticationCode))
accepted!!.shortAuthenticationStrings?.forEach {
assertTrue("all agreed Short Code should be known by alice", startReq!!.shortAuthenticationStrings!!.contains(it))
}
cryptoTestData.close()
}
@Test
fun test_aliceAndBobSASCode() {
val cryptoTestData = mCryptoTestHelper.doE2ETestWithAliceAndBobInARoom()
val aliceSession = cryptoTestData.firstSession
val bobSession = cryptoTestData.secondSession
val aliceVerificationService = aliceSession.getVerificationService()
val bobVerificationService = bobSession!!.getVerificationService()
val aliceSASLatch = CountDownLatch(1)
val aliceListener = object : VerificationService.Listener {
override fun transactionUpdated(tx: VerificationTransaction) {
val uxState = (tx as OutgoingSasVerificationTransaction).uxState
when (uxState) {
OutgoingSasVerificationTransaction.UxState.SHOW_SAS -> {
aliceSASLatch.countDown()
}
else -> Unit
}
}
}
aliceVerificationService.addListener(aliceListener)
val bobSASLatch = CountDownLatch(1)
val bobListener = object : VerificationService.Listener {
override fun transactionUpdated(tx: VerificationTransaction) {
val uxState = (tx as IncomingSasVerificationTransaction).uxState
when (uxState) {
IncomingSasVerificationTransaction.UxState.SHOW_ACCEPT -> {
tx.performAccept()
}
else -> Unit
}
if (uxState === IncomingSasVerificationTransaction.UxState.SHOW_SAS) {
bobSASLatch.countDown()
}
}
}
bobVerificationService.addListener(bobListener)
val bobUserId = bobSession.myUserId
val bobDeviceId = bobSession.getMyDevice().deviceId
val verificationSAS = aliceVerificationService.beginKeyVerification(VerificationMethod.SAS, bobUserId, bobDeviceId, null)
mTestHelper.await(aliceSASLatch)
mTestHelper.await(bobSASLatch)
val aliceTx = aliceVerificationService.getExistingTransaction(bobUserId, verificationSAS!!) as SASDefaultVerificationTransaction
val bobTx = bobVerificationService.getExistingTransaction(aliceSession.myUserId, verificationSAS) as SASDefaultVerificationTransaction
assertEquals("Should have same SAS", aliceTx.getShortCodeRepresentation(SasMode.DECIMAL),
bobTx.getShortCodeRepresentation(SasMode.DECIMAL))
cryptoTestData.close()
}
@Test
fun test_happyPath() {
val cryptoTestData = mCryptoTestHelper.doE2ETestWithAliceAndBobInARoom()
val aliceSession = cryptoTestData.firstSession
val bobSession = cryptoTestData.secondSession
val aliceVerificationService = aliceSession.getVerificationService()
val bobVerificationService = bobSession!!.getVerificationService()
val aliceSASLatch = CountDownLatch(1)
val aliceListener = object : VerificationService.Listener {
override fun transactionUpdated(tx: VerificationTransaction) {
val uxState = (tx as OutgoingSasVerificationTransaction).uxState
when (uxState) {
OutgoingSasVerificationTransaction.UxState.SHOW_SAS -> {
tx.userHasVerifiedShortCode()
}
OutgoingSasVerificationTransaction.UxState.VERIFIED -> {
aliceSASLatch.countDown()
}
else -> Unit
}
}
}
aliceVerificationService.addListener(aliceListener)
val bobSASLatch = CountDownLatch(1)
val bobListener = object : VerificationService.Listener {
override fun transactionUpdated(tx: VerificationTransaction) {
val uxState = (tx as IncomingSasVerificationTransaction).uxState
when (uxState) {
IncomingSasVerificationTransaction.UxState.SHOW_ACCEPT -> {
tx.performAccept()
}
IncomingSasVerificationTransaction.UxState.SHOW_SAS -> {
tx.userHasVerifiedShortCode()
}
IncomingSasVerificationTransaction.UxState.VERIFIED -> {
bobSASLatch.countDown()
}
else -> Unit
}
}
}
bobVerificationService.addListener(bobListener)
val bobUserId = bobSession.myUserId
val bobDeviceId = bobSession.getMyDevice().deviceId
aliceVerificationService.beginKeyVerification(VerificationMethod.SAS, bobUserId, bobDeviceId, null)
mTestHelper.await(aliceSASLatch)
mTestHelper.await(bobSASLatch)
// Assert that devices are verified
val bobDeviceInfoFromAlicePOV: CryptoDeviceInfo? = aliceSession.getDeviceInfo(bobUserId, bobDeviceId)
val aliceDeviceInfoFromBobPOV: CryptoDeviceInfo? = bobSession.getDeviceInfo(aliceSession.myUserId, aliceSession.getMyDevice().deviceId)
// latch wait a bit again
Thread.sleep(1000)
assertTrue("alice device should be verified from bob point of view", aliceDeviceInfoFromBobPOV!!.isVerified)
assertTrue("bob device should be verified from alice point of view", bobDeviceInfoFromAlicePOV!!.isVerified)
cryptoTestData.close()
}
}

View File

@@ -1,69 +0,0 @@
/*
* Copyright 2019 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package im.vector.matrix.android.session.room.timeline
import im.vector.matrix.android.api.session.events.model.Content
import im.vector.matrix.android.api.session.events.model.Event
import im.vector.matrix.android.api.session.events.model.EventType
import im.vector.matrix.android.api.session.events.model.toContent
import im.vector.matrix.android.api.session.room.model.Membership
import im.vector.matrix.android.api.session.room.model.RoomMemberSummary
import im.vector.matrix.android.api.session.room.model.message.MessageTextContent
import im.vector.matrix.android.api.session.room.model.message.MessageType
import kotlin.random.Random
object RoomDataHelper {
private const val FAKE_TEST_SENDER = "@sender:test.org"
private val EVENT_FACTORIES = hashMapOf(
0 to { createFakeMessageEvent() },
1 to { createFakeRoomMemberEvent() }
)
fun createFakeListOfEvents(size: Int = 10): List<Event> {
return (0 until size).mapNotNull {
val nextInt = Random.nextInt(EVENT_FACTORIES.size)
EVENT_FACTORIES[nextInt]?.invoke()
}
}
fun createFakeEvent(type: String,
content: Content? = null,
prevContent: Content? = null,
sender: String = FAKE_TEST_SENDER,
stateKey: String = FAKE_TEST_SENDER
): Event {
return Event(
type = type,
eventId = Random.nextLong().toString(),
content = content,
prevContent = prevContent,
senderId = sender,
stateKey = stateKey
)
}
fun createFakeMessageEvent(): Event {
val message = MessageTextContent(MessageType.MSGTYPE_TEXT, "Fake message #${Random.nextLong()}").toContent()
return createFakeEvent(EventType.MESSAGE, message)
}
fun createFakeRoomMemberEvent(): Event {
val roomMember = RoomMemberSummary(Membership.JOIN, "Fake name #${Random.nextLong()}").toContent()
return createFakeEvent(EventType.STATE_ROOM_MEMBER, roomMember)
}
}

View File

@@ -0,0 +1,37 @@
/*
* Copyright (c) 2020 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.matrix.android.sdk
import android.content.Context
import androidx.test.core.app.ApplicationProvider
import org.matrix.android.sdk.test.shared.createTimberTestRule
import org.junit.Rule
import java.io.File
interface InstrumentedTest {
@Rule
fun timberTestRule() = createTimberTestRule()
fun context(): Context {
return ApplicationProvider.getApplicationContext()
}
fun cacheDir(): File {
return context().cacheDir
}
}

View File

@@ -1,11 +1,11 @@
/*
* Copyright 2019 New Vector Ltd
* Copyright (c) 2020 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package im.vector.matrix.android;
package org.matrix.android.sdk;
import androidx.annotation.Nullable;
import androidx.lifecycle.LiveData;

View File

@@ -1,11 +1,11 @@
/*
* Copyright 2019 New Vector Ltd
* Copyright (c) 2020 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package im.vector.matrix.android;
package org.matrix.android.sdk;
import android.os.Handler;
import android.os.Looper;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package im.vector.matrix.android
package org.matrix.android.sdk
import okreplay.OkReplayConfig
import okreplay.PermissionRule

View File

@@ -14,9 +14,9 @@
* limitations under the License.
*/
package im.vector.matrix.android
package org.matrix.android.sdk
import im.vector.matrix.android.internal.util.MatrixCoroutineDispatchers
import org.matrix.android.sdk.internal.util.MatrixCoroutineDispatchers
import kotlinx.coroutines.Dispatchers.Main
import kotlinx.coroutines.asCoroutineDispatcher
import java.util.concurrent.Executors

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package im.vector.matrix.android.account
package org.matrix.android.sdk.account
import im.vector.matrix.android.InstrumentedTest
import im.vector.matrix.android.common.CommonTestHelper
import im.vector.matrix.android.common.CryptoTestHelper
import im.vector.matrix.android.common.SessionTestParams
import im.vector.matrix.android.common.TestConstants
import org.matrix.android.sdk.InstrumentedTest
import org.matrix.android.sdk.common.CommonTestHelper
import org.matrix.android.sdk.common.CryptoTestHelper
import org.matrix.android.sdk.common.SessionTestParams
import org.matrix.android.sdk.common.TestConstants
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.runner.RunWith
@@ -38,9 +38,7 @@ class AccountCreationTest : InstrumentedTest {
fun createAccountTest() {
val session = commonTestHelper.createAccount(TestConstants.USER_ALICE, SessionTestParams(withInitialSync = true))
commonTestHelper.signout(session)
session.close()
commonTestHelper.signOutAndClose(session)
}
@Test
@@ -50,14 +48,14 @@ class AccountCreationTest : InstrumentedTest {
// Log again to the same account
val session2 = commonTestHelper.logIntoAccount(session.myUserId, SessionTestParams(withInitialSync = true))
session.close()
session2.close()
commonTestHelper.signOutAndClose(session)
commonTestHelper.signOutAndClose(session2)
}
@Test
fun simpleE2eTest() {
val res = cryptoTestHelper.doE2ETestWithAliceInARoom()
res.close()
res.cleanUp(commonTestHelper)
}
}

View File

@@ -0,0 +1,60 @@
/*
* Copyright (c) 2020 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.matrix.android.sdk.account
import org.matrix.android.sdk.InstrumentedTest
import org.matrix.android.sdk.api.failure.isInvalidPassword
import org.matrix.android.sdk.common.CommonTestHelper
import org.matrix.android.sdk.common.SessionTestParams
import org.matrix.android.sdk.common.TestConstants
import org.amshove.kluent.shouldBeTrue
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
import org.junit.runners.MethodSorters
@RunWith(JUnit4::class)
@FixMethodOrder(MethodSorters.JVM)
class ChangePasswordTest : InstrumentedTest {
private val commonTestHelper = CommonTestHelper(context())
companion object {
private const val NEW_PASSWORD = "this is a new password"
}
@Test
fun changePasswordTest() {
val session = commonTestHelper.createAccount(TestConstants.USER_ALICE, SessionTestParams(withInitialSync = false))
// Change password
commonTestHelper.doSync<Unit> {
session.changePassword(TestConstants.PASSWORD, NEW_PASSWORD, it)
}
// Try to login with the previous password, it will fail
val throwable = commonTestHelper.logAccountWithError(session.myUserId, TestConstants.PASSWORD)
throwable.isInvalidPassword().shouldBeTrue()
// Try to login with the new password, should work
val session2 = commonTestHelper.logIntoAccount(session.myUserId, NEW_PASSWORD, SessionTestParams(withInitialSync = false))
commonTestHelper.signOutAndClose(session)
commonTestHelper.signOutAndClose(session2)
}
}

View File

@@ -0,0 +1,88 @@
/*
* Copyright (c) 2020 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.matrix.android.sdk.account
import org.matrix.android.sdk.InstrumentedTest
import org.matrix.android.sdk.api.auth.data.LoginFlowResult
import org.matrix.android.sdk.api.auth.registration.RegistrationResult
import org.matrix.android.sdk.api.failure.Failure
import org.matrix.android.sdk.api.failure.MatrixError
import org.matrix.android.sdk.common.CommonTestHelper
import org.matrix.android.sdk.common.SessionTestParams
import org.matrix.android.sdk.common.TestConstants
import org.matrix.android.sdk.common.TestMatrixCallback
import org.junit.Assert.assertTrue
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
import org.junit.runners.MethodSorters
@RunWith(JUnit4::class)
@FixMethodOrder(MethodSorters.JVM)
class DeactivateAccountTest : InstrumentedTest {
private val commonTestHelper = CommonTestHelper(context())
@Test
fun deactivateAccountTest() {
val session = commonTestHelper.createAccount(TestConstants.USER_ALICE, SessionTestParams(withInitialSync = false))
// Deactivate the account
commonTestHelper.doSync<Unit> {
session.deactivateAccount(TestConstants.PASSWORD, false, it)
}
// Try to login on the previous account, it will fail (M_USER_DEACTIVATED)
val throwable = commonTestHelper.logAccountWithError(session.myUserId, TestConstants.PASSWORD)
// Test the error
assertTrue(throwable is Failure.ServerError
&& throwable.error.code == MatrixError.M_USER_DEACTIVATED
&& throwable.error.message == "This account has been deactivated")
// Try to create an account with the deactivate account user id, it will fail (M_USER_IN_USE)
val hs = commonTestHelper.createHomeServerConfig()
commonTestHelper.doSync<LoginFlowResult> {
commonTestHelper.matrix.authenticationService.getLoginFlow(hs, it)
}
var accountCreationError: Throwable? = null
commonTestHelper.waitWithLatch {
commonTestHelper.matrix.authenticationService
.getRegistrationWizard()
.createAccount(session.myUserId.substringAfter("@").substringBefore(":"),
TestConstants.PASSWORD,
null,
object : TestMatrixCallback<RegistrationResult>(it, false) {
override fun onFailure(failure: Throwable) {
accountCreationError = failure
super.onFailure(failure)
}
})
}
// Test the error
accountCreationError.let {
assertTrue(it is Failure.ServerError
&& it.error.code == MatrixError.M_USER_IN_USE)
}
// No need to close the session, it has been deactivated
}
}

View File

@@ -0,0 +1,101 @@
/*
* Copyright (c) 2020 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.matrix.android.sdk.api
import android.content.Context
import androidx.lifecycle.ProcessLifecycleOwner
import androidx.work.Configuration
import androidx.work.WorkManager
import com.zhuinden.monarchy.Monarchy
import org.matrix.android.sdk.BuildConfig
import org.matrix.android.sdk.api.auth.AuthenticationService
import org.matrix.android.sdk.api.legacy.LegacySessionImporter
import org.matrix.android.sdk.api.raw.RawService
import org.matrix.android.sdk.common.DaggerTestMatrixComponent
import org.matrix.android.sdk.internal.SessionManager
import org.matrix.android.sdk.internal.network.UserAgentHolder
import org.matrix.android.sdk.internal.util.BackgroundDetectionObserver
import org.matrix.olm.OlmManager
import java.util.concurrent.Executors
import java.util.concurrent.atomic.AtomicBoolean
import javax.inject.Inject
/**
* This is the main entry point to the matrix sdk.
* To get the singleton instance, use getInstance static method.
*/
class Matrix private constructor(context: Context, matrixConfiguration: MatrixConfiguration) {
@Inject internal lateinit var legacySessionImporter: LegacySessionImporter
@Inject internal lateinit var authenticationService: AuthenticationService
@Inject internal lateinit var rawService: RawService
@Inject internal lateinit var userAgentHolder: UserAgentHolder
@Inject internal lateinit var backgroundDetectionObserver: BackgroundDetectionObserver
@Inject internal lateinit var olmManager: OlmManager
@Inject internal lateinit var sessionManager: SessionManager
init {
Monarchy.init(context)
DaggerTestMatrixComponent.factory().create(context, matrixConfiguration).inject(this)
if (context.applicationContext !is Configuration.Provider) {
WorkManager.initialize(context, Configuration.Builder().setExecutor(Executors.newCachedThreadPool()).build())
}
ProcessLifecycleOwner.get().lifecycle.addObserver(backgroundDetectionObserver)
}
fun getUserAgent() = userAgentHolder.userAgent
fun authenticationService(): AuthenticationService {
return authenticationService
}
fun rawService() = rawService
fun legacySessionImporter(): LegacySessionImporter {
return legacySessionImporter
}
companion object {
private lateinit var instance: Matrix
private val isInit = AtomicBoolean(false)
fun initialize(context: Context, matrixConfiguration: MatrixConfiguration) {
if (isInit.compareAndSet(false, true)) {
instance = Matrix(context.applicationContext, matrixConfiguration)
}
}
fun getInstance(context: Context): Matrix {
if (isInit.compareAndSet(false, true)) {
val appContext = context.applicationContext
if (appContext is MatrixConfiguration.Provider) {
val matrixConfiguration = (appContext as MatrixConfiguration.Provider).providesMatrixConfiguration()
instance = Matrix(appContext, matrixConfiguration)
} else {
throw IllegalStateException("Matrix is not initialized properly." +
" You should call Matrix.initialize or let your application implements MatrixConfiguration.Provider.")
}
}
return instance
}
fun getSdkVersion(): String {
return BuildConfig.VERSION_NAME + " (" + BuildConfig.GIT_SDK_REVISION + ")"
}
}
}

View File

@@ -0,0 +1,383 @@
/*
* Copyright 2016 OpenMarket Ltd
* Copyright 2018 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.matrix.android.sdk.common
import android.content.Context
import android.net.Uri
import androidx.lifecycle.Observer
import org.matrix.android.sdk.api.Matrix
import org.matrix.android.sdk.api.MatrixCallback
import org.matrix.android.sdk.api.MatrixConfiguration
import org.matrix.android.sdk.api.auth.data.HomeServerConnectionConfig
import org.matrix.android.sdk.api.auth.data.LoginFlowResult
import org.matrix.android.sdk.api.auth.registration.RegistrationResult
import org.matrix.android.sdk.api.session.Session
import org.matrix.android.sdk.api.session.events.model.EventType
import org.matrix.android.sdk.api.session.events.model.toModel
import org.matrix.android.sdk.api.session.room.Room
import org.matrix.android.sdk.api.session.room.model.message.MessageContent
import org.matrix.android.sdk.api.session.room.send.SendState
import org.matrix.android.sdk.api.session.room.timeline.Timeline
import org.matrix.android.sdk.api.session.room.timeline.TimelineEvent
import org.matrix.android.sdk.api.session.room.timeline.TimelineSettings
import org.matrix.android.sdk.api.session.sync.SyncState
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertTrue
import java.util.ArrayList
import java.util.UUID
import java.util.concurrent.CountDownLatch
import java.util.concurrent.TimeUnit
/**
* This class exposes methods to be used in common cases
* Registration, login, Sync, Sending messages...
*/
class CommonTestHelper(context: Context) {
val matrix: Matrix
fun getTestInterceptor(session: Session): MockOkHttpInterceptor? = TestNetworkModule.interceptorForSession(session.sessionId) as? MockOkHttpInterceptor
init {
Matrix.initialize(context, MatrixConfiguration("TestFlavor"))
matrix = Matrix.getInstance(context)
}
fun createAccount(userNamePrefix: String, testParams: SessionTestParams): Session {
return createAccount(userNamePrefix, TestConstants.PASSWORD, testParams)
}
fun logIntoAccount(userId: String, testParams: SessionTestParams): Session {
return logIntoAccount(userId, TestConstants.PASSWORD, testParams)
}
/**
* Create a Home server configuration, with Http connection allowed for test
*/
fun createHomeServerConfig(): HomeServerConnectionConfig {
return HomeServerConnectionConfig.Builder()
.withHomeServerUri(Uri.parse(TestConstants.TESTS_HOME_SERVER_URL))
.build()
}
/**
* This methods init the event stream and check for initial sync
*
* @param session the session to sync
*/
fun syncSession(session: Session) {
val lock = CountDownLatch(1)
GlobalScope.launch(Dispatchers.Main) { session.open() }
session.startSync(true)
val syncLiveData = runBlocking(Dispatchers.Main) {
session.getSyncStateLive()
}
val syncObserver = object : Observer<SyncState> {
override fun onChanged(t: SyncState?) {
if (session.hasAlreadySynced()) {
lock.countDown()
syncLiveData.removeObserver(this)
}
}
}
GlobalScope.launch(Dispatchers.Main) { syncLiveData.observeForever(syncObserver) }
await(lock)
}
/**
* Sends text messages in a room
*
* @param room the room where to send the messages
* @param message the message to send
* @param nbOfMessages the number of time the message will be sent
*/
fun sendTextMessage(room: Room, message: String, nbOfMessages: Int): List<TimelineEvent> {
val timeline = room.createTimeline(null, TimelineSettings(10))
val sentEvents = ArrayList<TimelineEvent>(nbOfMessages)
val latch = CountDownLatch(1)
val timelineListener = object : Timeline.Listener {
override fun onTimelineFailure(throwable: Throwable) {
}
override fun onNewTimelineEvents(eventIds: List<String>) {
// noop
}
override fun onTimelineUpdated(snapshot: List<TimelineEvent>) {
val newMessages = snapshot
.filter { it.root.sendState == SendState.SYNCED }
.filter { it.root.getClearType() == EventType.MESSAGE }
.filter { it.root.getClearContent().toModel<MessageContent>()?.body?.startsWith(message) == true }
if (newMessages.size == nbOfMessages) {
sentEvents.addAll(newMessages)
// Remove listener now, if not at the next update sendEvents could change
timeline.removeListener(this)
latch.countDown()
}
}
}
timeline.start()
timeline.addListener(timelineListener)
for (i in 0 until nbOfMessages) {
room.sendTextMessage(message + " #" + (i + 1))
}
// Wait 3 second more per message
await(latch, timeout = TestConstants.timeOutMillis + 3_000L * nbOfMessages)
timeline.dispose()
// Check that all events has been created
assertEquals("Message number do not match $sentEvents", nbOfMessages.toLong(), sentEvents.size.toLong())
return sentEvents
}
// PRIVATE METHODS *****************************************************************************
/**
* Creates a unique account
*
* @param userNamePrefix the user name prefix
* @param password the password
* @param testParams test params about the session
* @return the session associated with the newly created account
*/
private fun createAccount(userNamePrefix: String,
password: String,
testParams: SessionTestParams): Session {
val session = createAccountAndSync(
userNamePrefix + "_" + System.currentTimeMillis() + UUID.randomUUID(),
password,
testParams
)
assertNotNull(session)
return session
}
/**
* Logs into an existing account
*
* @param userId the userId to log in
* @param password the password to log in
* @param testParams test params about the session
* @return the session associated with the existing account
*/
fun logIntoAccount(userId: String,
password: String,
testParams: SessionTestParams): Session {
val session = logAccountAndSync(userId, password, testParams)
assertNotNull(session)
return session
}
/**
* Create an account and a dedicated session
*
* @param userName the account username
* @param password the password
* @param sessionTestParams parameters for the test
*/
private fun createAccountAndSync(userName: String,
password: String,
sessionTestParams: SessionTestParams): Session {
val hs = createHomeServerConfig()
doSync<LoginFlowResult> {
matrix.authenticationService
.getLoginFlow(hs, it)
}
doSync<RegistrationResult> {
matrix.authenticationService
.getRegistrationWizard()
.createAccount(userName, password, null, it)
}
// Perform dummy step
val registrationResult = doSync<RegistrationResult> {
matrix.authenticationService
.getRegistrationWizard()
.dummy(it)
}
assertTrue(registrationResult is RegistrationResult.Success)
val session = (registrationResult as RegistrationResult.Success).session
if (sessionTestParams.withInitialSync) {
syncSession(session)
}
return session
}
/**
* Start an account login
*
* @param userName the account username
* @param password the password
* @param sessionTestParams session test params
*/
private fun logAccountAndSync(userName: String,
password: String,
sessionTestParams: SessionTestParams): Session {
val hs = createHomeServerConfig()
doSync<LoginFlowResult> {
matrix.authenticationService
.getLoginFlow(hs, it)
}
val session = doSync<Session> {
matrix.authenticationService
.getLoginWizard()
.login(userName, password, "myDevice", it)
}
if (sessionTestParams.withInitialSync) {
syncSession(session)
}
return session
}
/**
* Log into the account and expect an error
*
* @param userName the account username
* @param password the password
*/
fun logAccountWithError(userName: String,
password: String): Throwable {
val hs = createHomeServerConfig()
doSync<LoginFlowResult> {
matrix.authenticationService
.getLoginFlow(hs, it)
}
var requestFailure: Throwable? = null
waitWithLatch { latch ->
matrix.authenticationService
.getLoginWizard()
.login(userName, password, "myDevice", object : TestMatrixCallback<Session>(latch, onlySuccessful = false) {
override fun onFailure(failure: Throwable) {
requestFailure = failure
super.onFailure(failure)
}
})
}
assertNotNull(requestFailure)
return requestFailure!!
}
fun createEventListener(latch: CountDownLatch, predicate: (List<TimelineEvent>) -> Boolean): Timeline.Listener {
return object : Timeline.Listener {
override fun onTimelineFailure(throwable: Throwable) {
// noop
}
override fun onNewTimelineEvents(eventIds: List<String>) {
// noop
}
override fun onTimelineUpdated(snapshot: List<TimelineEvent>) {
if (predicate(snapshot)) {
latch.countDown()
}
}
}
}
/**
* Await for a latch and ensure the result is true
*
* @param latch
* @throws InterruptedException
*/
fun await(latch: CountDownLatch, timeout: Long? = TestConstants.timeOutMillis) {
assertTrue(latch.await(timeout ?: TestConstants.timeOutMillis, TimeUnit.MILLISECONDS))
}
fun retryPeriodicallyWithLatch(latch: CountDownLatch, condition: (() -> Boolean)) {
GlobalScope.launch {
while (true) {
delay(1000)
if (condition()) {
latch.countDown()
return@launch
}
}
}
}
fun waitWithLatch(timeout: Long? = TestConstants.timeOutMillis, block: (CountDownLatch) -> Unit) {
val latch = CountDownLatch(1)
block(latch)
await(latch, timeout)
}
// Transform a method with a MatrixCallback to a synchronous method
inline fun <reified T> doSync(block: (MatrixCallback<T>) -> Unit): T {
val lock = CountDownLatch(1)
var result: T? = null
val callback = object : TestMatrixCallback<T>(lock) {
override fun onSuccess(data: T) {
result = data
super.onSuccess(data)
}
}
block.invoke(callback)
await(lock)
assertNotNull(result)
return result!!
}
/**
* Clear all provided sessions
*/
fun Iterable<Session>.signOutAndClose() = forEach { signOutAndClose(it) }
fun signOutAndClose(session: Session) {
doSync<Unit> { session.signOut(true, it) }
session.close()
}
}
fun List<TimelineEvent>.checkSendOrder(baseTextMessage: String, numberOfMessages: Int, startIndex: Int): Boolean {
return drop(startIndex)
.take(numberOfMessages)
.foldRightIndexed(true) { index, timelineEvent, acc ->
val body = timelineEvent.root.content.toModel<MessageContent>()?.body
val currentMessageSuffix = numberOfMessages - index
acc && (body == null || body.startsWith(baseTextMessage) && body.endsWith("#$currentMessageSuffix"))
}
}

View File

@@ -0,0 +1,31 @@
/*
* Copyright 2018 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.matrix.android.sdk.common
import org.matrix.android.sdk.api.session.Session
data class CryptoTestData(val firstSession: Session,
val roomId: String,
val secondSession: Session? = null,
val thirdSession: Session? = null) {
fun cleanUp(testHelper: CommonTestHelper) {
testHelper.signOutAndClose(firstSession)
secondSession?.let { testHelper.signOutAndClose(it) }
thirdSession?.let { testHelper.signOutAndClose(it) }
}
}

View File

@@ -0,0 +1,424 @@
/*
* Copyright 2018 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.matrix.android.sdk.common
import android.os.SystemClock
import android.util.Log
import androidx.lifecycle.Observer
import org.matrix.android.sdk.api.session.Session
import org.matrix.android.sdk.api.session.crypto.verification.IncomingSasVerificationTransaction
import org.matrix.android.sdk.api.session.crypto.verification.OutgoingSasVerificationTransaction
import org.matrix.android.sdk.api.session.crypto.verification.VerificationMethod
import org.matrix.android.sdk.api.session.crypto.verification.VerificationTxState
import org.matrix.android.sdk.api.session.events.model.Event
import org.matrix.android.sdk.api.session.events.model.EventType
import org.matrix.android.sdk.api.session.events.model.toContent
import org.matrix.android.sdk.api.session.room.Room
import org.matrix.android.sdk.api.session.room.model.Membership
import org.matrix.android.sdk.api.session.room.model.RoomSummary
import org.matrix.android.sdk.api.session.room.model.create.CreateRoomParams
import org.matrix.android.sdk.api.session.room.roomSummaryQueryParams
import org.matrix.android.sdk.api.session.room.timeline.Timeline
import org.matrix.android.sdk.api.session.room.timeline.TimelineEvent
import org.matrix.android.sdk.api.session.room.timeline.TimelineSettings
import org.matrix.android.sdk.internal.crypto.MXCRYPTO_ALGORITHM_MEGOLM
import org.matrix.android.sdk.internal.crypto.MXCRYPTO_ALGORITHM_MEGOLM_BACKUP
import org.matrix.android.sdk.internal.crypto.keysbackup.model.MegolmBackupAuthData
import org.matrix.android.sdk.internal.crypto.keysbackup.model.MegolmBackupCreationInfo
import org.matrix.android.sdk.internal.crypto.model.rest.UserPasswordAuth
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertNull
import org.junit.Assert.assertTrue
import java.util.UUID
import java.util.concurrent.CountDownLatch
class CryptoTestHelper(private val mTestHelper: CommonTestHelper) {
private val messagesFromAlice: List<String> = listOf("0 - Hello I'm Alice!", "4 - Go!")
private val messagesFromBob: List<String> = listOf("1 - Hello I'm Bob!", "2 - Isn't life grand?", "3 - Let's go to the opera.")
private val defaultSessionParams = SessionTestParams(true)
/**
* @return alice session
*/
fun doE2ETestWithAliceInARoom(encryptedRoom: Boolean = true): CryptoTestData {
val aliceSession = mTestHelper.createAccount(TestConstants.USER_ALICE, defaultSessionParams)
val roomId = mTestHelper.doSync<String> {
aliceSession.createRoom(CreateRoomParams().apply { name = "MyRoom" }, it)
}
if (encryptedRoom) {
val room = aliceSession.getRoom(roomId)!!
mTestHelper.doSync<Unit> {
room.enableEncryption(callback = it)
}
}
return CryptoTestData(aliceSession, roomId)
}
/**
* @return alice and bob sessions
*/
fun doE2ETestWithAliceAndBobInARoom(encryptedRoom: Boolean = true): CryptoTestData {
val cryptoTestData = doE2ETestWithAliceInARoom(encryptedRoom)
val aliceSession = cryptoTestData.firstSession
val aliceRoomId = cryptoTestData.roomId
val aliceRoom = aliceSession.getRoom(aliceRoomId)!!
val bobSession = mTestHelper.createAccount(TestConstants.USER_BOB, defaultSessionParams)
val lock1 = CountDownLatch(1)
val bobRoomSummariesLive = runBlocking(Dispatchers.Main) {
bobSession.getRoomSummariesLive(roomSummaryQueryParams { })
}
val newRoomObserver = object : Observer<List<RoomSummary>> {
override fun onChanged(t: List<RoomSummary>?) {
if (t?.isNotEmpty() == true) {
lock1.countDown()
bobRoomSummariesLive.removeObserver(this)
}
}
}
GlobalScope.launch(Dispatchers.Main) {
bobRoomSummariesLive.observeForever(newRoomObserver)
}
mTestHelper.doSync<Unit> {
aliceRoom.invite(bobSession.myUserId, callback = it)
}
mTestHelper.await(lock1)
val lock = CountDownLatch(1)
val roomJoinedObserver = object : Observer<List<RoomSummary>> {
override fun onChanged(t: List<RoomSummary>?) {
if (bobSession.getRoom(aliceRoomId)
?.getRoomMember(aliceSession.myUserId)
?.membership == Membership.JOIN) {
lock.countDown()
bobRoomSummariesLive.removeObserver(this)
}
}
}
GlobalScope.launch(Dispatchers.Main) {
bobRoomSummariesLive.observeForever(roomJoinedObserver)
}
mTestHelper.doSync<Unit> { bobSession.joinRoom(aliceRoomId, callback = it) }
mTestHelper.await(lock)
// Ensure bob can send messages to the room
// val roomFromBobPOV = bobSession.getRoom(aliceRoomId)!!
// assertNotNull(roomFromBobPOV.powerLevels)
// assertTrue(roomFromBobPOV.powerLevels.maySendMessage(bobSession.myUserId))
return CryptoTestData(aliceSession, aliceRoomId, bobSession)
}
/**
* @return Alice, Bob and Sam session
*/
fun doE2ETestWithAliceAndBobAndSamInARoom(): CryptoTestData {
val cryptoTestData = doE2ETestWithAliceAndBobInARoom()
val aliceSession = cryptoTestData.firstSession
val aliceRoomId = cryptoTestData.roomId
val room = aliceSession.getRoom(aliceRoomId)!!
val samSession = createSamAccountAndInviteToTheRoom(room)
// wait the initial sync
SystemClock.sleep(1000)
return CryptoTestData(aliceSession, aliceRoomId, cryptoTestData.secondSession, samSession)
}
/**
* Create Sam account and invite him in the room. He will accept the invitation
* @Return Sam session
*/
fun createSamAccountAndInviteToTheRoom(room: Room): Session {
val samSession = mTestHelper.createAccount(TestConstants.USER_SAM, defaultSessionParams)
mTestHelper.doSync<Unit> {
room.invite(samSession.myUserId, null, it)
}
mTestHelper.doSync<Unit> {
samSession.joinRoom(room.roomId, null, emptyList(), it)
}
return samSession
}
/**
* @return Alice and Bob sessions
*/
fun doE2ETestWithAliceAndBobInARoomWithEncryptedMessages(): CryptoTestData {
val cryptoTestData = doE2ETestWithAliceAndBobInARoom()
val aliceSession = cryptoTestData.firstSession
val aliceRoomId = cryptoTestData.roomId
val bobSession = cryptoTestData.secondSession!!
bobSession.cryptoService().setWarnOnUnknownDevices(false)
aliceSession.cryptoService().setWarnOnUnknownDevices(false)
val roomFromBobPOV = bobSession.getRoom(aliceRoomId)!!
val roomFromAlicePOV = aliceSession.getRoom(aliceRoomId)!!
val lock = CountDownLatch(1)
val bobEventsListener = object : Timeline.Listener {
override fun onTimelineFailure(throwable: Throwable) {
// noop
}
override fun onNewTimelineEvents(eventIds: List<String>) {
// noop
}
override fun onTimelineUpdated(snapshot: List<TimelineEvent>) {
val messages = snapshot.filter { it.root.getClearType() == EventType.MESSAGE }
.groupBy { it.root.senderId!! }
// Alice has sent 2 messages and Bob has sent 3 messages
if (messages[aliceSession.myUserId]?.size == 2 && messages[bobSession.myUserId]?.size == 3) {
lock.countDown()
}
}
}
val bobTimeline = roomFromBobPOV.createTimeline(null, TimelineSettings(20))
bobTimeline.start()
bobTimeline.addListener(bobEventsListener)
// Alice sends a message
roomFromAlicePOV.sendTextMessage(messagesFromAlice[0])
// Bob send 3 messages
roomFromBobPOV.sendTextMessage(messagesFromBob[0])
roomFromBobPOV.sendTextMessage(messagesFromBob[1])
roomFromBobPOV.sendTextMessage(messagesFromBob[2])
// Alice sends a message
roomFromAlicePOV.sendTextMessage(messagesFromAlice[1])
mTestHelper.await(lock)
bobTimeline.removeListener(bobEventsListener)
bobTimeline.dispose()
return cryptoTestData
}
fun checkEncryptedEvent(event: Event, roomId: String, clearMessage: String, senderSession: Session) {
assertEquals(EventType.ENCRYPTED, event.type)
assertNotNull(event.content)
val eventWireContent = event.content.toContent()
assertNotNull(eventWireContent)
assertNull(eventWireContent["body"])
assertEquals(MXCRYPTO_ALGORITHM_MEGOLM, eventWireContent["algorithm"])
assertNotNull(eventWireContent["ciphertext"])
assertNotNull(eventWireContent["session_id"])
assertNotNull(eventWireContent["sender_key"])
assertEquals(senderSession.sessionParams.deviceId, eventWireContent["device_id"])
assertNotNull(event.eventId)
assertEquals(roomId, event.roomId)
assertEquals(EventType.MESSAGE, event.getClearType())
// TODO assertTrue(event.getAge() < 10000)
val eventContent = event.toContent()
assertNotNull(eventContent)
assertEquals(clearMessage, eventContent["body"])
assertEquals(senderSession.myUserId, event.senderId)
}
fun createFakeMegolmBackupAuthData(): MegolmBackupAuthData {
return MegolmBackupAuthData(
publicKey = "abcdefg",
signatures = mapOf("something" to mapOf("ed25519:something" to "hijklmnop"))
)
}
fun createFakeMegolmBackupCreationInfo(): MegolmBackupCreationInfo {
return MegolmBackupCreationInfo(
algorithm = MXCRYPTO_ALGORITHM_MEGOLM_BACKUP,
authData = createFakeMegolmBackupAuthData()
)
}
fun createDM(alice: Session, bob: Session): String {
val roomId = mTestHelper.doSync<String> {
alice.createRoom(
CreateRoomParams().apply {
invitedUserIds.add(bob.myUserId)
setDirectMessage()
enableEncryptionIfInvitedUsersSupportIt = true
},
it
)
}
mTestHelper.waitWithLatch { latch ->
val bobRoomSummariesLive = runBlocking(Dispatchers.Main) {
bob.getRoomSummariesLive(roomSummaryQueryParams { })
}
val newRoomObserver = object : Observer<List<RoomSummary>> {
override fun onChanged(t: List<RoomSummary>?) {
val indexOfFirst = t?.indexOfFirst { it.roomId == roomId } ?: -1
if (indexOfFirst != -1) {
latch.countDown()
bobRoomSummariesLive.removeObserver(this)
}
}
}
GlobalScope.launch(Dispatchers.Main) {
bobRoomSummariesLive.observeForever(newRoomObserver)
}
}
mTestHelper.waitWithLatch { latch ->
val bobRoomSummariesLive = runBlocking(Dispatchers.Main) {
bob.getRoomSummariesLive(roomSummaryQueryParams { })
}
val newRoomObserver = object : Observer<List<RoomSummary>> {
override fun onChanged(t: List<RoomSummary>?) {
if (bob.getRoom(roomId)
?.getRoomMember(bob.myUserId)
?.membership == Membership.JOIN) {
latch.countDown()
bobRoomSummariesLive.removeObserver(this)
}
}
}
GlobalScope.launch(Dispatchers.Main) {
bobRoomSummariesLive.observeForever(newRoomObserver)
}
mTestHelper.doSync<Unit> { bob.joinRoom(roomId, callback = it) }
}
return roomId
}
fun initializeCrossSigning(session: Session) {
mTestHelper.doSync<Unit> {
session.cryptoService().crossSigningService()
.initializeCrossSigning(UserPasswordAuth(
user = session.myUserId,
password = TestConstants.PASSWORD
), it)
}
}
fun verifySASCrossSign(alice: Session, bob: Session, roomId: String) {
assertTrue(alice.cryptoService().crossSigningService().canCrossSign())
assertTrue(bob.cryptoService().crossSigningService().canCrossSign())
val requestID = UUID.randomUUID().toString()
val aliceVerificationService = alice.cryptoService().verificationService()
val bobVerificationService = bob.cryptoService().verificationService()
aliceVerificationService.beginKeyVerificationInDMs(
VerificationMethod.SAS,
requestID,
roomId,
bob.myUserId,
bob.sessionParams.credentials.deviceId!!,
null)
// we should reach SHOW SAS on both
var alicePovTx: OutgoingSasVerificationTransaction? = null
var bobPovTx: IncomingSasVerificationTransaction? = null
// wait for alice to get the ready
mTestHelper.waitWithLatch {
mTestHelper.retryPeriodicallyWithLatch(it) {
bobPovTx = bobVerificationService.getExistingTransaction(alice.myUserId, requestID) as? IncomingSasVerificationTransaction
Log.v("TEST", "== bobPovTx is ${alicePovTx?.uxState}")
if (bobPovTx?.state == VerificationTxState.OnStarted) {
bobPovTx?.performAccept()
true
} else {
false
}
}
}
mTestHelper.waitWithLatch {
mTestHelper.retryPeriodicallyWithLatch(it) {
alicePovTx = aliceVerificationService.getExistingTransaction(bob.myUserId, requestID) as? OutgoingSasVerificationTransaction
Log.v("TEST", "== alicePovTx is ${alicePovTx?.uxState}")
alicePovTx?.state == VerificationTxState.ShortCodeReady
}
}
// wait for alice to get the ready
mTestHelper.waitWithLatch {
mTestHelper.retryPeriodicallyWithLatch(it) {
bobPovTx = bobVerificationService.getExistingTransaction(alice.myUserId, requestID) as? IncomingSasVerificationTransaction
Log.v("TEST", "== bobPovTx is ${alicePovTx?.uxState}")
if (bobPovTx?.state == VerificationTxState.OnStarted) {
bobPovTx?.performAccept()
}
bobPovTx?.state == VerificationTxState.ShortCodeReady
}
}
assertEquals("SAS code do not match", alicePovTx!!.getDecimalCodeRepresentation(), bobPovTx!!.getDecimalCodeRepresentation())
bobPovTx!!.userHasVerifiedShortCode()
alicePovTx!!.userHasVerifiedShortCode()
mTestHelper.waitWithLatch {
mTestHelper.retryPeriodicallyWithLatch(it) {
alice.cryptoService().crossSigningService().isUserTrusted(bob.myUserId)
}
}
mTestHelper.waitWithLatch {
mTestHelper.retryPeriodicallyWithLatch(it) {
alice.cryptoService().crossSigningService().isUserTrusted(bob.myUserId)
}
}
}
}

View File

@@ -13,8 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package im.vector.matrix.android.common
package org.matrix.android.sdk.common
import org.matrix.android.sdk.internal.session.TestInterceptor
import okhttp3.Interceptor
import okhttp3.Protocol
import okhttp3.Request
@@ -37,7 +38,7 @@ import javax.net.ssl.HttpsURLConnection
* AutoDiscovery().findClientConfig("matrix.org", <callback>)
* </code>
*/
class MockOkHttpInterceptor : Interceptor {
class MockOkHttpInterceptor : TestInterceptor {
private var rules: ArrayList<Rule> = ArrayList()
@@ -45,6 +46,12 @@ class MockOkHttpInterceptor : Interceptor {
rules.add(rule)
}
fun clearRules() {
rules.clear()
}
override var sessionId: String? = null
override fun intercept(chain: Interceptor.Chain): Response {
val originalRequest = chain.request()

View File

@@ -14,6 +14,6 @@
* limitations under the License.
*/
package im.vector.matrix.android.common
package org.matrix.android.sdk.common
data class SessionTestParams @JvmOverloads constructor(val withInitialSync: Boolean = false)

View File

@@ -14,9 +14,12 @@
* limitations under the License.
*/
package im.vector.matrix.android.common
package org.matrix.android.sdk.common
import org.junit.Assert.*
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertNull
import org.junit.Assert.fail
/**
* Compare two lists and their content

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package im.vector.matrix.android.common
package org.matrix.android.sdk.common
import android.os.Debug
@@ -22,11 +22,11 @@ object TestConstants {
const val TESTS_HOME_SERVER_URL = "http://10.0.2.2:8080"
// Time out to use when waiting for server response. 60s
private const val AWAIT_TIME_OUT_MILLIS = 60000
// Time out to use when waiting for server response. 20s
private const val AWAIT_TIME_OUT_MILLIS = 20_000
// Time out to use when waiting for server response, when the debugger is connected. 10 minutes
private const val AWAIT_TIME_OUT_WITH_DEBUGGER_MILLIS = 10 * 60000
private const val AWAIT_TIME_OUT_WITH_DEBUGGER_MILLIS = 10 * 60_000
const val USER_ALICE = "Alice"
const val USER_BOB = "Bob"

View File

@@ -0,0 +1,48 @@
/*
* Copyright 2018 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.matrix.android.sdk.common
import androidx.annotation.CallSuper
import org.matrix.android.sdk.api.MatrixCallback
import org.junit.Assert.fail
import timber.log.Timber
import java.util.concurrent.CountDownLatch
/**
* Simple implementation of MatrixCallback, which count down the CountDownLatch on each API callback
* @param onlySuccessful true to fail if an error occurs. This is the default behavior
* @param <T>
*/
open class TestMatrixCallback<T>(private val countDownLatch: CountDownLatch,
private val onlySuccessful: Boolean = true) : MatrixCallback<T> {
@CallSuper
override fun onSuccess(data: T) {
countDownLatch.countDown()
}
@CallSuper
override fun onFailure(failure: Throwable) {
Timber.e(failure, "TestApiCallback")
if (onlySuccessful) {
fail("onFailure " + failure.localizedMessage)
}
countDownLatch.countDown()
}
}

View File

@@ -0,0 +1,46 @@
/*
* Copyright (c) 2020 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.matrix.android.sdk.common
import android.content.Context
import dagger.BindsInstance
import dagger.Component
import org.matrix.android.sdk.api.MatrixConfiguration
import org.matrix.android.sdk.internal.auth.AuthModule
import org.matrix.android.sdk.internal.di.MatrixComponent
import org.matrix.android.sdk.internal.di.MatrixModule
import org.matrix.android.sdk.internal.di.MatrixScope
import org.matrix.android.sdk.internal.di.NetworkModule
import org.matrix.android.sdk.internal.raw.RawModule
@Component(modules = [
TestModule::class,
MatrixModule::class,
NetworkModule::class,
AuthModule::class,
RawModule::class,
TestNetworkModule::class
])
@MatrixScope
internal interface TestMatrixComponent : MatrixComponent {
@Component.Factory
interface Factory {
fun create(@BindsInstance context: Context,
@BindsInstance matrixConfiguration: MatrixConfiguration): TestMatrixComponent
}
}

View File

@@ -0,0 +1,27 @@
/*
* Copyright (c) 2020 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.matrix.android.sdk.common
import dagger.Binds
import dagger.Module
import org.matrix.android.sdk.internal.di.MatrixComponent
@Module
internal abstract class TestModule {
@Binds
abstract fun providesMatrixComponent(testMatrixComponent: TestMatrixComponent): MatrixComponent
}

View File

@@ -0,0 +1,39 @@
/*
* Copyright (c) 2020 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.matrix.android.sdk.common
import dagger.Module
import dagger.Provides
import org.matrix.android.sdk.internal.session.MockHttpInterceptor
import org.matrix.android.sdk.internal.session.TestInterceptor
@Module
internal object TestNetworkModule {
val interceptors = ArrayList<TestInterceptor>()
fun interceptorForSession(sessionId: String): TestInterceptor? = interceptors.firstOrNull { it.sessionId == sessionId }
@Provides
@JvmStatic
@MockHttpInterceptor
fun providesTestInterceptor(): TestInterceptor? {
return MockOkHttpInterceptor().also {
interceptors.add(it)
}
}
}

View File

@@ -14,20 +14,22 @@
* limitations under the License.
*/
package im.vector.matrix.android.internal.crypto
package org.matrix.android.sdk.internal.crypto
import android.os.MemoryFile
import android.util.Base64
import androidx.test.ext.junit.runners.AndroidJUnit4
import im.vector.matrix.android.internal.crypto.attachments.MXEncryptedAttachments
import im.vector.matrix.android.internal.crypto.model.rest.EncryptedFileInfo
import im.vector.matrix.android.internal.crypto.model.rest.EncryptedFileKey
import org.junit.Assert.*
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotEquals
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
import java.io.ByteArrayInputStream
import org.matrix.android.sdk.internal.crypto.attachments.MXEncryptedAttachments
import org.matrix.android.sdk.internal.crypto.model.rest.EncryptedFileInfo
import org.matrix.android.sdk.internal.crypto.model.rest.EncryptedFileKey
import org.matrix.android.sdk.internal.crypto.attachments.toElementToDecrypt
import java.io.ByteArrayOutputStream
import java.io.InputStream
/**
@@ -39,29 +41,26 @@ import java.io.InputStream
class AttachmentEncryptionTest {
private fun checkDecryption(input: String, encryptedFileInfo: EncryptedFileInfo): String {
val `in` = Base64.decode(input, Base64.DEFAULT)
val inputAsByteArray = Base64.decode(input, Base64.DEFAULT)
val inputStream: InputStream
inputStream = if (`in`.isEmpty()) {
ByteArrayInputStream(`in`)
inputStream = if (inputAsByteArray.isEmpty()) {
inputAsByteArray.inputStream()
} else {
val memoryFile = MemoryFile("file" + System.currentTimeMillis(), `in`.size)
memoryFile.outputStream.write(`in`)
val memoryFile = MemoryFile("file" + System.currentTimeMillis(), inputAsByteArray.size)
memoryFile.outputStream.write(inputAsByteArray)
memoryFile.inputStream
}
val decryptedStream = MXEncryptedAttachments.decryptAttachment(inputStream, encryptedFileInfo)
val decryptedStream = ByteArrayOutputStream()
val result = MXEncryptedAttachments.decryptAttachment(inputStream, encryptedFileInfo.toElementToDecrypt()!!, decryptedStream)
assertNotNull(decryptedStream)
assert(result)
val buffer = ByteArray(100)
val toByteArray = decryptedStream.toByteArray()
val len = decryptedStream!!.read(buffer)
decryptedStream.close()
return Base64.encodeToString(buffer, 0, len, Base64.DEFAULT).replace("\n".toRegex(), "").replace("=".toRegex(), "")
return Base64.encodeToString(toByteArray, 0, toByteArray.size, Base64.DEFAULT).replace("\n".toRegex(), "").replace("=".toRegex(), "")
}
@Test
@@ -72,7 +71,7 @@ class AttachmentEncryptionTest {
key = EncryptedFileKey(
alg = "A256CTR",
k = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
key_ops = listOf("encrypt", "decrypt"),
keyOps = listOf("encrypt", "decrypt"),
kty = "oct",
ext = true
),
@@ -91,7 +90,7 @@ class AttachmentEncryptionTest {
key = EncryptedFileKey(
alg = "A256CTR",
k = "__________________________________________8",
key_ops = listOf("encrypt", "decrypt"),
keyOps = listOf("encrypt", "decrypt"),
kty = "oct",
ext = true
),
@@ -110,7 +109,7 @@ class AttachmentEncryptionTest {
key = EncryptedFileKey(
alg = "A256CTR",
k = "__________________________________________8",
key_ops = listOf("encrypt", "decrypt"),
keyOps = listOf("encrypt", "decrypt"),
kty = "oct",
ext = true
),
@@ -131,7 +130,7 @@ class AttachmentEncryptionTest {
key = EncryptedFileKey(
alg = "A256CTR",
k = "__________________________________________8",
key_ops = listOf("encrypt", "decrypt"),
keyOps = listOf("encrypt", "decrypt"),
kty = "oct",
ext = true
),

View File

@@ -0,0 +1,47 @@
/*
* Copyright 2018 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.matrix.android.sdk.internal.crypto
import org.matrix.android.sdk.api.auth.data.Credentials
import org.matrix.android.sdk.internal.crypto.store.IMXCryptoStore
import org.matrix.android.sdk.internal.crypto.store.db.RealmCryptoStore
import org.matrix.android.sdk.internal.crypto.store.db.RealmCryptoStoreModule
import org.matrix.android.sdk.internal.crypto.store.db.mapper.CrossSigningKeysMapper
import org.matrix.android.sdk.internal.di.MoshiProvider
import io.realm.RealmConfiguration
import kotlin.random.Random
internal class CryptoStoreHelper {
fun createStore(): IMXCryptoStore {
return RealmCryptoStore(
realmConfiguration = RealmConfiguration.Builder()
.name("test.realm")
.modules(RealmCryptoStoreModule())
.build(),
crossSigningKeysMapper = CrossSigningKeysMapper(MoshiProvider.providesMoshi()),
credentials = createCredential())
}
fun createCredential() = Credentials(
userId = "userId_" + Random.nextInt(),
homeServer = "http://matrix.org",
accessToken = "access_token",
refreshToken = null,
deviceId = "deviceId_sample"
)
}

View File

@@ -14,14 +14,16 @@
* limitations under the License.
*/
package im.vector.matrix.android.internal.crypto
package org.matrix.android.sdk.internal.crypto
import androidx.test.ext.junit.runners.AndroidJUnit4
import im.vector.matrix.android.InstrumentedTest
import im.vector.matrix.android.internal.crypto.model.OlmSessionWrapper
import im.vector.matrix.android.internal.crypto.store.IMXCryptoStore
import org.matrix.android.sdk.InstrumentedTest
import org.matrix.android.sdk.internal.crypto.model.OlmSessionWrapper
import org.matrix.android.sdk.internal.crypto.store.IMXCryptoStore
import io.realm.Realm
import org.junit.Assert.*
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotEquals
import org.junit.Assert.assertNull
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
@@ -41,22 +43,22 @@ class CryptoStoreTest : InstrumentedTest {
Realm.init(context())
}
@Test
fun test_metadata_realm_ok() {
val cryptoStore: IMXCryptoStore = cryptoStoreHelper.createStore()
assertFalse(cryptoStore.hasData())
cryptoStore.open()
assertEquals("deviceId_sample", cryptoStore.getDeviceId())
assertTrue(cryptoStore.hasData())
// Cleanup
cryptoStore.close()
cryptoStore.deleteStore()
}
// @Test
// fun test_metadata_realm_ok() {
// val cryptoStore: IMXCryptoStore = cryptoStoreHelper.createStore()
//
// assertFalse(cryptoStore.hasData())
//
// cryptoStore.open()
//
// assertEquals("deviceId_sample", cryptoStore.getDeviceId())
//
// assertTrue(cryptoStore.hasData())
//
// // Cleanup
// cryptoStore.close()
// cryptoStore.deleteStore()
// }
@Test
fun test_lastSessionUsed() {

View File

@@ -14,10 +14,12 @@
* limitations under the License.
*/
package im.vector.matrix.android.internal.crypto
package org.matrix.android.sdk.internal.crypto
import androidx.test.ext.junit.runners.AndroidJUnit4
import org.junit.Assert.*
import org.junit.Assert.assertEquals
import org.junit.Assert.assertTrue
import org.junit.Assert.fail
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.runner.RunWith

Some files were not shown because too many files have changed in this diff Show More