Commit graph

288 commits

Author SHA1 Message Date
Daniel Gultsch 28e005f926 send and show read markers in private, non-anonymous groups 2017-11-20 11:26:20 +01:00
Daniel Gultsch 7e93f4519a catch all RuntimeExceptions when using MetadataRetriever 2017-11-12 19:20:35 +01:00
Daniel Gultsch f4638d7eec catch some more exception when retrieving media runtime 2017-11-10 20:17:42 +01:00
Daniel Gultsch 459cf09f06 FileProvider: attempt to work with sd cards 2017-11-08 20:34:08 +01:00
Daniel Gultsch ad6f6183b8 video processing: pick smaller file after transcoding. do not transcode very small files 2017-10-27 11:34:53 +02:00
Daniel Gultsch 50d436fd81 EventReceiver: use setting to store enabled accounts 2017-10-01 18:44:28 +02:00
Daniel Gultsch bbfabaf930 FileBackend: close cursor after retrieving file size 2017-09-30 15:50:01 +02:00
Daniel Gultsch 30b6201b95 reworked file params to store audio runtime amoung other things 2017-09-19 22:42:22 +02:00
Daniel Gultsch 4e864935fe ignore http upload file size constraints for videos that will be compressed 2017-09-18 22:42:25 +02:00
Daniel Gultsch c2105dfe46 use lower resolution for videos longer than 8s 2017-09-18 11:54:14 +02:00
Daniel Gultsch 57c11d42d5 create a new axolotl service when the account jid changes 2017-08-10 22:34:03 +02:00
Daniel Gultsch 0da2f1ed3f prevent users from editing their account jid after successful login 2017-08-10 22:34:03 +02:00
Daniel Gultsch f5da4791ad avoid unnecessary roster sync in OMEMO code. fixed startup performance regression 2017-07-29 13:50:32 +02:00
Daniel Gultsch da87eac48e provide upgrade path for accounts with publish-options 2017-07-18 12:51:15 +02:00
Daniel Gultsch 7a2856ac86 fetch required device ids on demand 2017-07-18 12:51:15 +02:00
Daniel Gultsch dfa17d1339 more migration fixes for updating from 1.6.0 to 1.19.3 2017-07-14 10:34:01 +02:00
Daniel Gultsch ea6b756c0f fixed bug in db migrations when going from <15 to something recent 2017-07-13 19:28:16 +02:00
Daniel Gultsch cbce73c301 fixed fingerprint trust (was messed up after library upgrade) 2017-06-25 18:18:13 +02:00
Daniel Gultsch 24768d051d upgrade to signal-protocol-java. thanks @ysangkok
fixes #1384
closes #2509
2017-06-18 16:36:30 +02:00
Daniel Gultsch 51badfa721 enable forground service for sony smartphones by default 2017-06-02 13:00:20 +02:00
Daniel Gultsch 2cf05528b4 add the 4 most frequently contacted contacts as app shortcuts 2017-05-31 16:45:51 +02:00
Daniel Gultsch 2f577097d1 work around for brokens ROMs that expose file uris as notification sound 2017-05-13 08:10:47 +02:00
Daniel Gultsch 91db2023d3 use mam reference instead of timestamp 2017-05-07 21:05:35 +02:00
Daniel Gultsch cc1402442a don't load signed prekeys on startup 2017-05-04 11:03:58 +02:00
Daniel Gultsch a5e15d5a10 code cleanup: made conversation property final in message object 2017-04-26 12:43:52 +02:00
Daniel Gultsch 9d043076e8 only take 1:1 conversations into account when determining catchup timestamp 2017-03-08 20:54:13 +01:00
Daniel Gultsch c76b073b8e do not sync thumbnail creation on cache. fixes #2283 2017-02-09 14:32:50 +01:00
Daniel Gultsch d9e2ab62b2 add index to message.conversationUuid 2017-02-07 21:17:08 +01:00
Daniel Gultsch 6313c3c92e Merge pull request #2270 from moparisthebest/master
Stop Conversations force closing over sqlite errors due to long messages
2017-02-07 17:35:25 +01:00
Daniel Gultsch d7198bd68c fixed rare npe when doing file migration 2017-02-07 10:20:13 +01:00
moparisthebest 2a34ece571 Stop Conversations force closing over sqlite errors due to long messages 2017-01-30 00:03:51 -05:00
Daniel Gultsch a86b2fefd9 add database and file migrations for 1.16.0 2017-01-25 13:22:20 +01:00
Daniel Gultsch 66457c9f2e transcode videos before sharing. change storage location 2017-01-24 20:17:36 +01:00
Daniel Gultsch 9b6ae6d75f configurable local message retention period. (untested) 2017-01-23 17:14:30 +01:00
Daniel Gultsch 2c1d3ef968 fixed avatar republish missing the mime type 2017-01-12 12:20:10 +01:00
Daniel Gultsch b116926bb1 unify getFileUri across share and open intents 2017-01-09 17:00:08 +01:00
Daniel Gultsch 4a299920dc add overlay to indicate that image is gif 2017-01-03 14:05:10 +01:00
Michael Eden 5a670c88b0 Do not compress GIFs, allow GBoard to send GIFs 2017-01-01 16:16:35 -05:00
Daniel Gultsch 6b0242523b Merge branch 'master' of https://github.com/Fenisu/Conversations into Fenisu-master 2016-12-02 11:25:14 +01:00
Daniel Gultsch f0f2aab92d made provider authorities relativ to deal with different package ids 2016-12-01 12:09:49 +01:00
Daniel Gultsch d983f0bc71 fixed migrations from pre-btbv phase 2016-11-25 17:04:23 +01:00
Daniel Gultsch 7b99346a4b when swiping don't clean startup counter entirely. just don't count last startup 2016-11-21 10:48:59 +01:00
Daniel Gultsch b71aa6d3a4 remove omemo devices from annoucement after 7 days of inactivity 2016-11-19 21:39:16 +01:00
Daniel Gultsch 6362799d56 save last activation time in fingerprint status 2016-11-19 13:34:54 +01:00
Daniel Gultsch 7e2e42cb11 parse omemo fingerprints from uris 2016-11-17 20:09:42 +01:00
Daniel Gultsch 4d965e96ed reset startup count when swiped away (only count kills) 2016-11-17 10:58:26 +01:00
Daniel Gultsch e84af51272 distinguish between general i/o error and write exception when copying files 2016-11-15 15:43:04 +01:00
Daniel Gultsch 05fc15be3d refactore trust enum to be FingerprintStatus class with trust and active 2016-11-14 22:27:41 +01:00
Daniel Gultsch 698ddadbee brought restart threshold down to 8 times in 8h 2016-11-08 21:37:44 +01:00
Daniel Gultsch bca8f11c9c add frequent restart detection 2016-11-08 12:20:07 +01:00
Ignacio Quezada 297c0a792f Private files using a boolean flag from Config.java. 2016-11-08 11:45:20 +01:00
Daniel Gultsch ffebb4677a Revert "use file provider on android M as well"
This reverts commit a4020e85f6.
2016-10-30 20:27:39 +01:00
Daniel Gultsch 8557120ef8 add error message to failed messages. accessible via context menu 2016-10-26 12:26:04 +02:00
Daniel Gultsch a4020e85f6 use file provider on android M as well 2016-10-23 09:03:36 +02:00
Daniel Gultsch 44ce5df359 write prepped string to db. use display version everywhere else 2016-10-20 17:31:46 +02:00
Daniel Gultsch 5ac0e9267d fixed omemo shown as unavailable in 1:1 chats 2016-10-03 21:04:10 +02:00
Daniel Gultsch cea52b0722 resolve take photo uri for internal use 2016-10-03 18:26:11 +02:00
Daniel Gultsch f4a883848c properly index take photo uris from file provider 2016-10-03 11:25:15 +02:00
Daniel Gultsch dcd6ef8f84 explicit logging when copying files to storage 2016-10-03 10:13:45 +02:00
Daniel Gultsch f0dbcce58f expert 'setting' to remove omemo identity. fixes #2038 2016-09-28 12:24:50 +02:00
Daniel Gultsch 13ed27f91e don't use file provider for photo uris on android < N. fixes #2030 2016-09-21 18:20:53 +02:00
Daniel Gultsch 7b445bc4c7 use history clear date as minimum date for mam 2016-09-16 11:07:52 +02:00
Daniel Gultsch d3dfecae8a don't use display version of jids 2016-09-12 22:48:51 +02:00
Daniel Gultsch 416481bb65 be a bit more careful when deleting and deactivating accounts 2016-09-07 14:34:58 +02:00
Daniel Gultsch f7d8580969 fixed typo 2016-08-31 17:02:50 +02:00
Daniel Gultsch 3685c8cd2a use file provider for taking pictures 2016-08-30 13:14:38 +02:00
Daniel Gultsch 8b331895d1 catch NPE in getVideoPreview() because getFrame sometimes returns null 2016-08-02 10:57:50 +02:00
Daniel Gultsch 3c48b14448 catch exception when trying to get video preview of pgp encrypted file 2016-07-31 22:31:47 +02:00
Daniel Gultsch 0e96e0a796 show identity type for device selection 2016-07-28 22:58:37 +02:00
Daniel Gultsch 3a5735e717 provide black background video thumbnail if preview couldn't be generated 2016-07-22 16:32:38 +02:00
Daniel Gultsch be4aa2afc9 show a preview for video files 2016-07-11 21:24:33 +02:00
Daniel Gultsch d2ca0c7fe8 catch exceptions when retrieving uri file extension 2016-06-24 13:35:39 +02:00
Daniel Gultsch f8b1e8098c extract relevant extension from file name when processing share intent 2016-06-16 11:46:25 +02:00
Daniel Gultsch 74d376be68 close db cursor after reading cert 2016-06-12 12:50:31 +02:00
Daniel Gultsch 0eb8d4226e also save form elements in disco storage 2016-05-19 10:41:56 +02:00
Daniel Gultsch 0157039e87 log more information about HTTP’s max upload size 2016-05-05 19:34:44 +02:00
Daniel Gultsch 98ecac0ffa removed unnecessary logging 2016-04-30 13:34:20 +02:00
Daniel Gultsch 252d015b71 synchronize around thumbnail cache to avoid loading images twice 2016-04-28 20:15:28 +02:00
Daniel Gultsch 59652ecaf2 fixed table creation 2016-04-25 11:06:17 +02:00
Daniel Gultsch 1901abd05f expert setting to manually change presence 2016-04-22 21:25:06 +02:00
Daniel Gultsch 594e65bb2b hacky workaround to determine if uri points to private file on < lolipop 2016-04-13 11:14:36 +02:00
Daniel Gultsch 7ff890e513 republish avatar if server offers non-persistent pep :-( 2016-04-11 22:20:32 +02:00
Daniel Gultsch db0301310b removed ernoexception in exchange for a regular exeption to prevent verify error on <5.0 2016-04-08 18:28:40 +02:00
Daniel Gultsch 0460702710 check file owner when attaching files or using them as avatar 2016-04-07 20:29:40 +02:00
Daniel Gultsch 701742f550 don't ask for resource when server uses http upload v0.1 2016-04-02 18:07:38 +02:00
Daniel Gultsch 2549ce89b0 check max http file size when attaching files 2016-04-01 00:03:14 +02:00
Daniel Gultsch 8d98c52803 closed some cursors under error conditions 2016-03-31 13:55:46 +02:00
Daniel Gultsch a9b66e3ea5 allow to delete attachments. fixes #1539 2016-03-23 19:23:22 +01:00
Daniel Gultsch 281cb65046 only add image files to media scanner 2016-03-23 12:20:09 +01:00
Daniel Gultsch 9548f43998 close cursor in caps db query 2016-03-11 09:01:27 +01:00
Daniel Gultsch 09d87965fb mark oob messages and always display download button 2016-03-04 20:09:21 +01:00
Daniel Gultsch c0b3a3ff0c basic support for XEP-0308: Last Message Correction. fixes #864 2016-02-15 23:15:04 +01:00
Daniel Gultsch 4a1a59f0c8 Merge branch 'disco-caps' of https://github.com/singpolyma/Conversations into singpolyma-disco-caps 2016-02-02 18:19:26 +01:00
Daniel Gultsch 31fd425c9a changed FileBackend API to allow files instead of messages to be copied and resized 2016-01-24 12:17:00 +01:00
Stephen Paul Weber ad36a4ba89 Persisitence and loading for ServiceDiscoveryResult 2016-01-23 10:53:56 -05:00
Daniel Gultsch ad5bcb7d43 removed some unused methods from db backend 2016-01-16 18:57:19 +01:00
Daniel Gultsch 943d0391d4 catch exception when reading message id from database 2016-01-15 23:46:52 +01:00
Dheeraj CVR ffb49c7217 use batch transactions when writing roster
Fixes https://github.com/siacs/Conversations/issues/1648
2016-01-13 11:56:35 +04:00
Daniel Gultsch 708d7c5b98 automatically adjust image compression to keep files under 512MiB 2016-01-09 16:16:18 +01:00
Daniel Gultsch fb97f9d18f null check in getOriginalPath 2016-01-04 20:14:08 +01:00
Daniel Gultsch f815a7cd26 properly rotate avatars 2016-01-04 15:17:02 +01:00
Daniel Gultsch f46cbb38a9 show certificate information 2015-12-23 19:18:53 +01:00
Daniel Gultsch d0bad09f13 save certificate when verifying with x509 2015-12-23 17:41:26 +01:00
Daniel Gultsch 293e820a58 get rid of lastMessageTransmitted in favor of db query 2015-12-11 13:52:04 +01:00
Daniel Gultsch 739648e909 ask for contact permissions when first opening StartConversationActivity 2015-12-07 13:24:41 +01:00
fiaxh e5f154316c Unset all PGP signatures once
... so they will be redone to match the changed status.
2015-12-02 18:06:48 +00:00
Daniel Gultsch 02c6793ca9 fixed avatar loading for non-file uris 2015-12-02 15:30:03 +01:00
Philip Flohr 0329c9c738 users are now able to crop their avatar pictures using the android-crop
library
2015-12-02 14:25:20 +01:00
Daniel Gultsch f0b1761ec3 initial tor support 2015-12-01 12:00:50 +01:00
Daniel Gultsch 06cadab7cc changed method signature of calcSampleSize 2015-11-30 16:03:04 +01:00
Daniel Gultsch a557d38e4d pgp fixes and revert configuration changes 2015-11-25 20:47:02 +01:00
Andreas Straub c6e54e7e5a Move migration 19 before 17
Migration 17 depends on Account deserialization, so any migrations that
touch the accounts table need to be applied beforehand.

Re-writing the migration to work directly on the database would lead to
a lot of code duplication, so it's not worth it at this time, but might
become necessary later on to avoid dependency cycles.
2015-11-06 14:50:55 +01:00
Daniel Gultsch bca29cf7fd explicitly mark verified omemo keys in UI 2015-10-31 10:57:57 +01:00
Daniel Gultsch c7ff196f58 push CN into nick pep node when uploading certificate. subscribe to nick node 2015-10-29 13:41:08 +01:00
Daniel Gultsch 5f9476448f make unread status and notifications presistent across restarts 2015-10-14 21:18:34 +02:00
Daniel Gultsch 32abc76689 changed store path for files 2015-10-06 16:18:23 +02:00
Daniel Gultsch 4b62bd256d properly recycle bitmaps 2015-10-02 11:39:30 +02:00
Daniel Gultsch 64dbb069ab rotate thumbnails. fixes #1438 2015-09-29 12:25:32 +02:00
fiaxh 024e697cee Iterator to go through all messages of a conversation 2015-09-20 22:17:32 +01:00
Daniel Gultsch 2c4a6b0912 add null pointer check to db migration 2015-09-05 18:47:37 +02:00
Andreas Straub e2d506c96a Never build a session with oneself
If we detect our own ID is not in our own devicelist on receiving an
update, we reannounce ourselves. This used to have the side effect of
modifying the list of devices we thought were in the update set, causing
us to accidentally build a session with ourselves.

This lead to our own key being set to TRUSTED_INACTIVE, resulting in red
lock icons on messages sent by the own device.

We fix this by having publishOwnDeviceId() operate on a copy of the
original set. This commit also includes a db migration which deletes
sessions with oneself and sets own keys back to TRUSTED.
2015-09-05 17:29:58 +02:00
Daniel Gultsch aaf3ecaf41 made useImageAsIs determination a bit more foolproof (samsung) 2015-08-31 20:19:26 +02:00
Michael ae9de26f59 remove unused imports. 2015-08-25 12:40:22 +02:00
Daniel Gultsch 7617a19280 additonal null checks in file backend 2015-08-25 11:11:53 +02:00
Daniel Gultsch 8043833156 bugfix: next encryption is now being properly detected 2015-08-23 19:40:45 +02:00
Daniel Gultsch 6e1870b00a check if inputstream is null before cropping avatar images 2015-08-19 12:25:17 +02:00
Daniel Gultsch d7b3060fc8 catch broken base64 in avatars 2015-08-16 14:55:24 +02:00
Daniel Gultsch 32826ec29d provide extra interface to close sockets. fixes #1330 2015-08-15 14:14:33 +02:00
Daniel Gultsch dad90762b4 do not touch pictures that are already in the right format
fixed #522
2015-08-11 16:50:00 +02:00
Andreas Straub 6cd9383e53 Let UNTRUSTED/UNDECIDED keys become INACTIVE 2015-08-01 18:30:11 +02:00
Daniel Gultsch 26ac7c9030 added missing carbon column message table create statement
fixes #1310
2015-07-31 13:08:35 +02:00
Andreas Straub e6df4d81d2 Tag carbon messages in parser, adapt session logic
Messages sent from another device of the own account are now explicitly
tagged as carboned message. The session detection logic now uses this
tag to find "session borders".
2015-07-29 16:41:58 +02:00
Andreas Straub efcefc2e63 Refactor out inner classes, cache trust store
Moves SQLiteAxolotlStore and XmppAxolotlSession into proper classes.

IdentityKeys trust statuses are now cached in an LruCache to prevent
hammering the database when rendering the UI.
2015-07-29 02:59:26 +02:00
Daniel Gultsch 456d4c8b23 made image file format configurable by Config.java 2015-07-21 23:49:35 +02:00
Andreas Straub b7ff2c3461 Use properly fixed numeral values in Trust enum
Why, oh God, why?! #thanksjamesgosling
2015-07-21 01:52:22 +02:00
Andreas Straub 0ee64124fe Fix getNumTrustedKeys 2015-07-20 22:02:54 +02:00
Andreas Straub 19a0ae42d6 Lock TrustKeys if no trusted keys are available 2015-07-20 14:56:41 +02:00
Andreas Straub 012f036840 Optimize imports 2015-07-20 14:26:29 +02:00
Andreas Straub dd964077b9 Fix axolotl database migration
Can't call getWritableDatabase in recreateAxolotlDb()
2015-07-20 13:15:49 +02:00
Andreas Straub 14010bf5a6 Ask for key trust when sending messages
If the contact (or the own account) has keys that have UNDECIDED trust,
we now drop the user into the new TrustKeysActivity, where they have to
decide for each new key whether it should be TRUSTED or UNTRUSTED.
2015-07-19 22:27:26 +02:00
Andreas Straub 4038af2f47 Fix trust status for outgoing messages
Tag sent messages with own fingerprint, set own fingerprint as always
trusted, include own fingerprint in database trust search, explicitly
reset trust colorfilter
2015-07-19 22:23:28 +02:00
Andreas Straub 31d375c2c3 Fix setIdentityKeyTrust update statement 2015-07-19 22:23:27 +02:00
Andreas Straub 160e4017df Fix IdentityKey storage model
Added proper UNIQUE statement
2015-07-19 22:23:27 +02:00
Andreas Straub d173913eba Overhauled Message tagging
Messages are now tagged with the IdentityKey fingerprint of the
originating session. IdentityKeys have one of three trust states:
undecided (default), trusted, and untrusted/not yet trusted.
2015-07-19 22:17:58 +02:00
Andreas Straub 03614a0262 Fix getSubDeviceSessions SQL query 2015-07-19 22:17:57 +02:00
Andreas Straub 3458f5bb91 Clean up logging
Add a fixed prefix to axolotl-related log messages, set log levels
sensibly.
2015-07-19 22:17:57 +02:00
Andreas Straub 7049904c32 Add basic PEP managemend UI to EditAccountActivity
EditAccountActivity now show own fingerprint, and gives an option to
regenerate local keying material (and wipe all sessions associated with
the old keys in the process).

It also now displays a list of other own devices, and gives an option to
remove all but the current device.
2015-07-19 22:17:55 +02:00
Andreas Straub 7a962e5180 Refactor axolotl database recreation 2015-07-19 21:32:27 +02:00
Andreas Straub 74026b742b Save IdentityKeys in database 2015-07-19 21:32:26 +02:00
Andreas Straub 9e07fc5651 DatabaseBackend bugfixes
Don't leak cursors, initially create tables
2015-07-19 21:32:26 +02:00