Commit graph

600 commits

Author SHA1 Message Date
Niels Andriesse
4a613df52d Clean 2019-10-15 14:32:23 +11:00
Niels Andriesse
65f95839d9 Fix build 2019-10-15 13:51:18 +11:00
Niels Andriesse
08a1b0e947 Merge branch 'dev' of github.com:loki-project/loki-messenger-android into custom-server 2019-10-15 13:42:44 +11:00
Niels Andriesse
a8c4fa22a3 Partially fix build 2019-10-15 13:39:17 +11:00
Niels Andriesse
e423ec8848 Change mentions approach 2019-10-11 16:37:28 +11:00
Mikunj
2f18c5bad2 Merge branch 'dev' into custom-server
# Conflicts:
#	src/org/thoughtcrime/securesms/loki/DisplayNameActivity.kt
2019-10-11 15:40:09 +11:00
Mikunj
4657b79179 UI improvements. 2019-10-11 15:38:15 +11:00
Mikunj
13d42f542c Added public chat manager.
Replace hard coded public chat server with dynamic one.
2019-10-11 09:36:52 +11:00
Niels Andriesse
25bd1073b0 Pre-populate user ID cache as needed 2019-10-10 10:39:56 +11:00
Niels Andriesse
a44c3fcd57 Clean 2019-10-08 14:10:16 +11:00
Niels Andriesse
bf958fffe1 Partially disable settings for slave devices 2019-10-08 12:17:25 +11:00
Mikunj
98498a66aa Fix receiving multiple of the same authorisations at once causing us to delete prekeybundles for the user. 2019-10-08 10:11:46 +11:00
Niels Andriesse
79ec4553aa Clean 2019-10-07 16:53:26 +11:00
Niels Andriesse
19ec4db687 Update for core changes 2019-10-07 15:30:20 +11:00
Mikunj
4f46c6317b Renaming. 2019-10-07 13:28:53 +11:00
Mikunj
0bfa3c33c7 Multi-device sending media message 2019-10-07 10:14:38 +11:00
Mikunj
8a3b4a6a14 Refactor. 2019-10-07 09:44:43 +11:00
Mikunj
fb3967db55 Multi-device sending text messages. 2019-10-04 16:29:51 +10:00
Mikunj
8e495d087b Fix bugs in multi device pairing. 2019-10-03 16:02:22 +10:00
Mikunj
be9afa243c Fix auto accept friend request logic. 2019-10-03 10:05:50 +10:00
Mikunj
e07d8ddb52 Fix ui not being dismissed on message send failure.
Fix prekey bundle not being sent with the device pairing request.
2019-10-02 15:28:36 +10:00
Mikunj
80e9b8223a Hooked up dialog ui 2019-10-01 15:35:52 +10:00
Mikunj
dde4ee6e36 Merge branch 'dev' into multi-device-integration 2019-09-30 12:21:04 +10:00
Mikunj
10c1a9cced Added linking in the ui. 2019-09-26 11:19:36 +10:00
Mikunj
7d1883cfd2 Trigger event when authorisation is accepted. 2019-09-26 10:04:21 +10:00
Mikunj
0b49d7ae0d Fix crashing during start. 2019-09-25 15:08:01 +10:00
Mikunj Varsani
203348b8fb Update device mappings on the file server upon receiving a pairing confirmation. 2019-09-24 16:06:19 +10:00
Mikunj Varsani
8acc0bcff9 Auto accept friend requests if we're friends with the primary device. 2019-09-24 15:02:23 +10:00
Mikunj Varsani
d51c62ecaf Moved LokiMultiDeviceDatabase into LokiAPIDatabase. 2019-09-24 13:33:42 +10:00
Mikunj
90ee676a53 Hookup receiving logic. 2019-09-23 15:38:00 +10:00
Niels Andriesse
3a257d745b Debug 2019-09-19 14:06:54 +10:00
Niels Andriesse
96dadbaaa8 Handle media message friend requests 2019-09-18 17:33:34 +10:00
Niels Andriesse
a78b8a77b6 Clean 2019-09-18 10:00:18 +10:00
Niels Andriesse
74dfac6fd1 Implement GIF sending 2019-09-17 11:46:47 +10:00
Niels Andriesse
df36d5e539 Handle case where GIF fetch fails 2019-09-17 10:36:34 +10:00
Niels Andriesse
bdb950373a Partially implement GIFs 2019-09-16 16:11:07 +10:00
Mikunj
3dba87198a Fix messages infinitely sending.
This was because signal infinitely tries to send message on network errors. Since we already have retrying built into the loki api we just disable this behaviour and set a cap of 3 on PushSendJobs incase.
2019-09-13 11:56:36 +10:00
Niels Andriesse
7cf543bdf8 Fix typo 2019-09-12 12:06:45 +10:00
Niels Andriesse
cbb7f9827c Include public key with display names 2019-09-12 11:52:03 +10:00
Niels Andriesse
52b55652c8 Clean 2019-09-12 09:59:15 +10:00
Niels Andriesse
3b242e7435 Merge branch 'dev' of github.com:loki-project/loki-messenger-android into bug-fixes
# Conflicts:
#	src/org/thoughtcrime/securesms/jobs/PushDecryptJob.java
2019-09-12 09:46:12 +10:00
Niels Andriesse
88a5b7a87f Implement quotes in group chats 2019-09-11 15:52:32 +10:00
Mikunj
a683c3fa90 Disable notification triggers on group messages. 2019-09-11 09:29:29 +10:00
Mikunj
9d8de789d7 Fixed link preview messages not being deleted in group chats. 2019-09-11 09:29:29 +10:00
Niels Andriesse
1859a22419 Debug 2019-09-10 11:09:31 +10:00
Niels Andriesse
869c06e71a Clean 2019-09-10 09:52:43 +10:00
Niels Andriesse
e109df7525 Implement link previews for group conversations 2019-09-09 16:31:28 +10:00
Niels Andriesse
d1c1083751 Refactor 2019-09-09 14:30:02 +10:00
Niels Andriesse
1d5a31aae4 Implement link previews for regular conversations 2019-09-09 13:53:23 +10:00
Niels Andriesse
7273eb2774 Switch to new group chat message deletion endpoint 2019-08-30 17:08:46 +10:00
Niels Andriesse
f6c1a3ef9c Update for core changes 2019-08-28 12:09:05 +10:00
Niels Andriesse
67b7a1d8c2 Disable typing indicators in group chats 2019-08-23 09:41:35 +10:00
Niels Andriesse
8a6559b1fe Disable group updates for now 2019-08-09 13:43:55 +10:00
Niels Andriesse
67889489e9 Fix missing message body 2019-08-09 13:03:41 +10:00
Niels Andriesse
eb9537f1c1 Make group chats a bit more future proof 2019-08-09 12:00:01 +10:00
Niels Andriesse
717a28a446 Fix missing message ID & update for core changes 2019-08-09 10:11:30 +10:00
Niels Andriesse
04aa7db499 Use alternative approach for group message sending 2019-08-08 17:24:00 +10:00
Niels Andriesse
1822e87f7c Merge Signal 4.41.0 2019-08-07 16:48:54 +10:00
Niels Andriesse
3a5f5a9a41 Fix ratcheting bug 2019-08-06 09:46:43 +10:00
Niels Andriesse
93b7472e25 WIP 2019-08-05 16:32:05 +10:00
Niels Andriesse
fcb5cbb74d Fix threading issue 2019-07-26 16:16:40 +10:00
Niels Andriesse
97b25507d2 Partially fix background message issue 2019-07-26 15:17:12 +10:00
Niels Andriesse
a7b49d2ce5 Revert back to old background message strategy 2019-07-26 12:20:55 +10:00
Niels Andriesse
7598830a1b Fix quote messages & friend request handling 2019-07-24 15:05:39 +10:00
gamabuntan
4374a902be
Merge pull request #2 from loki-project/friend-request-handling
Friend Request Handling V2
2019-07-24 12:49:00 +10:00
Niels Andriesse
b3d76bfd28 Clean 2019-07-24 12:48:42 +10:00
Niels Andriesse
0ef0140b0d Update package 2019-07-24 12:30:23 +10:00
Mikunj
1d7cb0d5bb Updated friend request handling. 2019-07-24 12:18:45 +10:00
Niels Andriesse
1b7a04ab50 Update notification & app switcher icon 2019-07-24 09:51:09 +10:00
Niels Andriesse
a925b17419 Fix session handling 2019-07-23 16:02:25 +10:00
Niels Andriesse
ecd60b8723 Clean 2019-07-22 16:46:03 +10:00
Niels Andriesse
6d521e4227 Send session reset request acknowledgement if needed 2019-07-22 16:22:40 +10:00
Niels Andriesse
9be8d75773 Refactor 2019-07-22 15:11:38 +10:00
Niels Andriesse
06e8d20da4 Refactor 2019-07-22 14:25:59 +10:00
Mikunj
16ddfc37ce Finalise session reset. 2019-07-22 12:34:10 +10:00
Mikunj
fce57f46a0 More session reset. 2019-07-22 12:09:34 +10:00
Mikunj
61622fbd3d Session reset handling. 2019-07-22 09:38:12 +10:00
Mikunj
e626e09a45 Send PreKeyBundle with an EndSession message. 2019-07-22 08:30:28 +10:00
Niels Andriesse
956f20fc0e Use display name 2019-07-19 15:02:47 +10:00
Niels Andriesse
acae76161d Parse display name from messages 2019-07-19 14:15:51 +10:00
Niels Andriesse
862288abfd Clean 2019-07-15 15:06:52 +10:00
Niels Andriesse
daa1248e6c Debug session handling 2019-07-02 11:47:28 +10:00
Niels Andriesse
e8bece45b9 Fix missing delegate & friend request acceptance 2019-06-28 14:59:25 +10:00
Niels Andriesse
52a0b2a5e8 Clean 2019-06-28 14:07:42 +10:00
Niels Andriesse
86c765b1c2 Debug friend request logic further 2019-06-28 12:32:23 +10:00
Niels Andriesse
1a7e0562bb Debug friend request logic 2019-06-27 16:03:05 +10:00
Niels Andriesse
232faba39f Fix message delivery 2019-06-27 14:07:13 +10:00
Niels Andriesse
dd67e59807 Fix pre key usage 2019-06-26 14:31:38 +10:00
Niels Andriesse
169a7e609e Propagate message ID 2019-06-24 16:00:15 +10:00
Niels Andriesse
b58fce3a68 Update for core changes & refactor 2019-06-24 14:10:09 +10:00
Niels Andriesse
d99a996d0e Finish friend request view & add message friend request status 2019-06-24 11:22:53 +10:00
Niels Andriesse
a1b6eaf3f5 Refactor 2019-06-21 10:39:05 +10:00
Niels Andriesse
21e1ece19c Model friend request status as an enum 2019-06-18 09:57:36 +10:00
Mikunj
d44081d040 Added database to map thread to loki friend request 2019-06-17 12:17:05 +10:00
Niels Andriesse
69ecb19654 Update for core changes 2019-06-11 16:27:00 +10:00
Niels Andriesse
021bf1b33c Clean 2019-06-11 14:41:04 +10:00
Niels Andriesse
66010f4755 Fix pre key refreshing & add TODO 2019-06-11 13:41:16 +10:00
Niels Andriesse
c8cc22e8fe WIP 2019-06-07 15:21:25 +10:00
Mikunj
75a8123d1e Send friend request accept message back to the user. 2019-06-06 10:39:24 +10:00
Niels Andriesse
858b34306b Share actual public key 2019-06-06 10:04:43 +10:00
Mikunj
89d5c4d0f1 Generate PreKeyBundle if we're sending a friend request. 2019-06-06 09:48:02 +10:00
Mikunj
7d33a9cc8f Always send a friend request if we're not friends.
Pass down isFriendRequest to message sender.
2019-06-05 15:53:10 +10:00
Niels Andriesse
2c35ed2177 Fix ugly spacing 2019-06-05 15:49:15 +10:00
Mikunj
e2ffab9e19 Added friend request state in thread.
Added friend request receive logic.
2019-06-05 12:42:55 +10:00
Mikunj
a0f95c033a Pass PreKeyBundleStore into message sender. 2019-06-05 09:29:18 +10:00
Niels Andriesse
4148d598f9 Stub key pair screen 2019-06-04 16:37:45 +10:00
Mikunj
384a5ba35d Update RefreshPreKeysJob. 2019-06-04 15:00:27 +10:00
Niels Andriesse
4b1c5dfce2 Quick fix compilation issues 2019-06-04 11:45:29 +10:00
Niels Andriesse
72f95dfff3 Silence Gradle warning 2019-06-03 16:25:02 +10:00
Mikunj
e19a71769f Added loki message handling. 2019-06-03 16:11:22 +10:00
Mikunj
9d4509d130 Use LokiServiceCipher when decrypting incoming message. 2019-06-03 14:02:29 +10:00
Greyson Parrelli
2a644437fb Add sticker support.
No sticker packs are available for use yet, but we now have the
latent ability to send and receive.
2019-05-30 01:08:01 -04:00
Alan Evans
9445555d66
Code analysis - address @NotNull/@Nullable issues. 2019-05-22 13:51:56 -03:00
Greyson Parrelli
7b4299d5da Bring back conscrypt, improve provider initialization ordering. 2019-05-02 14:32:48 -07:00
Greyson Parrelli
ecea6abeb6 Temporary revert (again) to fix an avatar retrieval issue.
This reverts commit 77524ae1f2.
2019-05-01 08:25:14 -07:00
Greyson Parrelli
77524ae1f2 Revert "Temporary revert to fix an avatar retrieval issue."
This reverts commit 267bc32e23.
2019-04-30 12:51:58 -07:00
Greyson Parrelli
1c47812877 Fix crash when migrating read receipt jobs.
Fixes #8764
2019-04-15 15:45:16 -04:00
Greyson Parrelli
4a3c173adb Migrated to new JobManager. 2019-04-15 10:56:26 -04:00
Alan Evans
9c40de5bf1 Save the SMS setting on a per-conversation basis. 2019-04-15 10:13:35 -04:00
Greyson Parrelli
267bc32e23 Temporary revert to fix an avatar retrieval issue.
This reverts commit 8aa185070b.
2019-04-03 16:32:52 -04:00
Greyson Parrelli
8caaf057e8 Remove unnecessary pre-19 code branches.
Now that our minSdk is 19, we can remove a lot of old code paths that
only ran pre-19.
2019-03-21 11:19:06 -07:00
Moxie Marlinspike
8aa185070b Update libsignalservice to 2.13.0
- Eliminate the explicit spongycastle dependency. All access to
  primitives is done through the JCE interfaces now, which allows
  us to use a secure native-backed provider like conscrypt.

- Use conscrypt for our default security provider. This gives us
  fast TLS 1.2 and 1.3 support on all devices, even before they
  had platform support (like 4.4).

- Update minSdk to 18. Unfortunately the JCE interfaces for GCM
  primitives are JDK 7+ (!) only, which became supported by Android
  at 18.
2019-03-21 11:19:06 -07:00
Greyson Parrelli
c646316a97 Block typing indicators from blocked contacts. 2019-03-19 09:39:19 -07:00
Greyson Parrelli
18613e3b6f Remove generic foreground service condition from Job.
I don't think it actually helps at all, meaning it just adds
complexity.

Fixes #8677
2019-03-12 11:29:59 -03:00
Greyson Parrelli
a122bb4899 Created new BlobProvider.
One unified place to create blobs for different lifespans.
2019-03-10 15:18:39 -07:00
Greyson Parrelli
a2b6dbda14 Correctly sync Note to Self conversation color. 2019-02-15 14:21:27 -08:00
Greyson Parrelli
a6564f8f84 FCM improvements. 2019-02-15 14:21:23 -08:00
Greyson Parrelli
fe4068afce Don't preview links if your cursor is touching them. 2019-02-14 20:19:07 -08:00
Greyson Parrelli
c2a86fcc74 Sync self-sends to desktop.
Updated UI to show self-conversations as "Note to Self".
2019-02-14 20:19:07 -08:00
Greyson Parrelli
c9a0a66f18 Migrate backup passphrase to be keystore-encrypted when available. 2019-02-14 20:19:06 -08:00
Greyson Parrelli
c364345e1d Add some additional FCM logging. 2019-02-06 00:53:52 -08:00
Greyson Parrelli
d482c60a98 Switch from GCM to FCM. 2019-01-30 16:10:47 -08:00
Greyson Parrelli
c76081d99c Added support for link previews. 2019-01-30 16:10:43 -08:00
Greyson Parrelli
1e534a2a10 Fix group avatars not sending.
Fixes #8547
2019-01-20 12:00:18 -08:00
Greyson Parrelli
e6b4249cf3 Deprecate usage of the signaling key. 2019-01-17 15:37:53 -08:00
Greyson Parrelli
2209ff2272 Use AttachmentUploadJob in PushGroupSendJob. 2019-01-15 12:43:38 -08:00
Greyson Parrelli
5450967d00 Ensure all Workers have a public WorkManager constructor. 2019-01-14 15:15:53 -08:00
Greyson Parrelli
6fa7eca60b Implement new media send flow.
Update our media send flow to allow users to send multiple images/videos
at once. This change includes:

- New in-app media picker flow.
- Ability to caption images and videos.
- Image editing tools are made more prominent in the flow.
- Some fixes to the image editing tools.
2019-01-14 11:25:06 -08:00
Greyson Parrelli
19d5ba5c0e Upload attachments in a separate job. 2019-01-13 19:25:40 -08:00
Greyson Parrelli
038238a333 Allow multiple attachments to download at once.
Not only will this be faster, but it serves as a mitigation
for the times when WorkManager gets 'stuck'.

Fixes #8427
2018-12-06 23:29:55 -08:00
Greyson Parrelli
bfdad2f47c Updated logging. 2018-12-06 12:43:45 -08:00
Greyson Parrelli
f0bfd7224f Handle having a null sender certificate at send time.
Fixes #8425
2018-12-03 13:16:29 -08:00
Greyson Parrelli
d6abf89a7a Filter out typing indicators from ourself. 2018-12-01 09:51:28 -08:00
Greyson Parrelli
81055e61a6 Update WorkManager to 1.0.0-alpha11. 2018-11-27 12:35:41 -08:00
Greyson Parrelli
36b24d0a20 Rotate sender cert at send time if it's expired. 2018-11-26 07:52:59 -08:00
Greyson Parrelli
47a10a0288 Added support for multi-image receive. 2018-11-21 01:55:30 -08:00
Greyson Parrelli
a3411072ba Remove MasterSecret job.
It's no longer necessary.
2018-11-21 01:55:30 -08:00
Greyson Parrelli
776b0e23ae Add support for typing indicators. 2018-11-21 01:55:25 -08:00
Greyson Parrelli
d93bfbf693 Prevent SendJobs from sending already-sent messages.
This is to guard against behavior WorkManager has where it may
re-enqueue a job that has already been completed (if, for instance, it
was preempted).

Fixes #8268
2018-11-14 16:20:55 -08:00
Greyson Parrelli
e7c00a3066 Fix issue where we may oversend SMS messages.
Because SMS sending is split over two jobs, there's no max retry limit
respected if we find out about the failure in SmsSentJob -- it's
requeued as a new job with a fresh attempt counter.

This commit carries a retry count between the two jobs. It also verifies
that we have service before attempting to send a message at all.

Relates to #8268
2018-11-13 15:07:33 -08:00
Greyson Parrelli
78627ecb08 Updated libsignal-service-java to 2.12.1 2018-11-09 12:37:24 -08:00
Greyson Parrelli
bf9582c97e Only set UNRESTRICTED mode if recipients have a non-null verifier.
Otherwise we could send UD messages to people with non-UD linked
devices.
2018-11-06 09:58:45 -08:00
Greyson Parrelli
1ab3d57378 Fix some places where we were using the Android Logger.
We pretty much always want to be using our own logger.
2018-11-06 09:22:25 -08:00
Greyson Parrelli
e31029da89 Update recipient's sealed sender status in more places. 2018-10-31 11:18:35 -07:00
Greyson Parrelli
8c3d50c6dc Ignore messages without content. 2018-10-31 08:26:45 -07:00
Greyson Parrelli
532431b0ad Guard against notifying for errors on non-existent SMS threads.
All of the other send jobs do this already, just didn't do it here.
2018-10-31 08:19:33 -07:00
Greyson Parrelli
2acab563d9 Support for sealed sender - Part 2 2018-10-30 08:48:08 -07:00
Moxie Marlinspike
5f31762220 Support for sealed sender - Part 1 2018-10-30 08:48:08 -07:00
Greyson Parrelli
86e4221182 Use a unique notification icon for backups. 2018-10-27 23:34:18 -07:00
Greyson Parrelli
45e0bb281f Turn MessageRetrievalService into IncomingMessageObserver.
Due to an Android P bug, we basically need to stop calling
startService() in onResume()/onPause(). That means I had to turn
MessageRetrieval service into a singlton instead of a service. I also
moved the offending KeyCachingService calls into static methods that
didn't have to start the service.
2018-10-17 13:58:47 -07:00
Greyson Parrelli
5219d79e27 Remove unnecessary start of KeyCachingService. 2018-10-11 09:55:46 -07:00
Greyson Parrelli
1b736e9e04 Ensure notifications are processed after receiving GCM message.
It's unreliable to run these tasks on WorkManager, as there's no
scheduling guarantees.
2018-10-08 10:00:15 -07:00
Greyson Parrelli
1c197ad93d Reset attachment transfer state if auto-download requirements are not met. 2018-10-07 14:21:33 -07:00
Greyson Parrelli
e4b56d4e40 Show foreground notification for jobs when network is restricted.
Occasionally a job may be run when the app is in a network-restricted
mode, like a form of doze. When this happens, jobs can timeout due to
lack of network access, causing a cascade of job delays. This is
particularly bad in the case of message retrieval.

To prevent this, if a job that normally requires network detects that no
network is available when running, then we start a foreground
notification.
2018-10-03 10:00:42 -07:00
Greyson Parrelli
444e01deae Improve key presence checking in SafeData.
This isn't a perfect check either, but it should be safer and more
consistent than using static "invalid values".
2018-10-02 12:31:12 -07:00
Greyson Parrelli
cfa13867e5 Allow null for profileAvatar in RetrieveProfileAvatarJob. 2018-10-02 08:43:18 -07:00
Greyson Parrelli
87e6aa48bb Schedule jobs with WorkManager.
Should help solve most of our pressing targetSdk=26 migration issues.
2018-10-01 12:12:50 -07:00
Greyson Parrelli
d10a44f8eb Suppress some noisy logs. 2018-10-01 12:12:50 -07:00
Greyson Parrelli
e9a38bab1e Turned SingleUseBlobProvider into MemoryBlobProvider.
Keep the single-use behavior, but allow the creation of multi-use memory
blobs that can be deleted when we're done with them. Will help out with
having URI's for temporary images during the camera capture flow.
2018-09-27 10:35:56 -07:00
Greyson Parrelli
6eb8693546 Don't block messages from unknown groups.
We were incorrectly considering unknown groups to have been "left".
2018-09-25 10:00:14 -07:00
Greyson Parrelli
45c4eafbd7 Add the ability to block groups.
This also fixes the situation where we block group-leave messages,
preventing blocked contacts from leaving groups.

Fixes #7970

Also, this forced us to upgrade libsignal-service, which fixes the
websocket timeout issues. Thanks to @dpapavas!

Fixes #6644
2018-09-18 15:26:50 -07:00
Greyson Parrelli
7c5e1db6a2 Fix NPE in MultiDeviceContactUpdateJob.
Fixes #8180
2018-09-07 17:52:50 -07:00
Greyson Parrelli
e9b85a10a6 Add per-contact notification channels.
Fixes #8119
Fixes #8121
Fixes #8122
2018-08-17 15:51:01 -07:00
Greyson Parrelli
13c72779af Visually note quotes for messages you don't have.
We will now show a small footer under quotes for messages that you
don't have locally.

Also fixes #7850
2018-08-13 18:38:59 -04:00
Greyson Parrelli
dbd42c4af2 Add notification channel support.
Bucket our notifications into channels. Required to target API 26.
2018-08-13 18:38:53 -04:00
Greyson Parrelli
d0db6aa509 Added more logging around message sending and attachment downloads. 2018-08-06 10:50:06 -04:00
Greyson Parrelli
43068e0613 Reduce usage of Log.w() 2018-08-06 10:50:06 -04:00
Greyson Parrelli
a498176043 Switch logs to use new Log class. 2018-08-06 10:50:06 -04:00
Greyson Parrelli
d42cecc32a Fix timer issue with sync messages from desktop.
Related to #8068
2018-08-03 14:08:16 -04:00
Greyson Parrelli
bf692e8da3 Throttle background contact syncs to once every 6 hours.
Unfortunately, there's apps out there that trigger contact changes
very frequently. Because we listen to the system for contact
changes to tell us when to sync, that could result in us sending
an abundance of contact syncs to linked desktop instances.

This throttles contact sync requests using the following methodology:

- By default, throttle contact syncs to 6 hrs while the app is
  backgrounded.
- If a sync is throttled in the background, we set a dirty flag and
  will execute the sync the next time the app is foregrounded.
- Syncs explicitly requested by desktop are never throttled.
2018-07-17 12:06:50 -07:00
Greyson Parrelli
845fcf0864 Remove ability to set group conversation colors (for now). 2018-07-17 09:54:13 -07:00
Greyson Parrelli
24b062d8dd Improve the look of message bubbles. 2018-07-17 09:53:52 -07:00
Greyson Parrelli
b02dda405c Use NetworkBackoffRequirement for group messages. 2018-07-12 10:59:10 -07:00
Greyson Parrelli
18756aedf6 Remove the ability to save backups to the external SD card.
The directory we were previously saving backups to on the external SD
card is actually deleted upon app uninstall and/or clearing the app's
data. There's also no reliable way to write to the root of an external
SD card (that isn't comically inconvenient), so for now it's safer if we
just move back to getting the regular 'ol standard external storage
directory (which is likely internal storage, despite its name).

Fixes #7845
2018-06-29 14:10:45 -07:00
Greyson Parrelli
b39a7ac939 Add expiration time to group update requests. 2018-06-22 11:29:16 -07:00
Greyson Parrelli
b5d4cac90a Send/receive expiration times for group updates.
This particularly helps with the bug where people who were newly added
to a group wouldn't receive an expiration timer until the first message
was sent.
2018-06-22 11:01:55 -07:00
Greyson Parrelli
933be54035 Update scheduling of ServiceOutageDetectionJob.
Previously, we were running this job in PushSendJob#onCanceled().
However, with the new retry logic, this won't happen for 24 hours.

Instead, we now schedule the job in PushSendJob#onRetry().
2018-06-22 10:59:53 -07:00
Greyson Parrelli
a50edc3d25 Keep retrying message sends for 24 hours.
Previously, we retried based on a count. Now we've added the ability to
keep retrying for a specified time, using exponential backoff to
throttle attempts.
2018-06-22 10:59:53 -07:00
Greyson Parrelli
42f1baaf61 Imported JobManager as a source dependency.
We have to make some changes, and it's gotten to the point where
maintaining it as a separate library is more hassle than it's worth,
especially with Google releasing WorkManager as the preferred job
scheduling library.
2018-06-22 10:59:53 -07:00
Greyson Parrelli
3a85c966d0 Fix false-positive outage detection.
Turns out that there's some weird quasi-state when you come out of
airplane mode, that if you do an InetAdress lookup, it returns some
weird IPv6-looking garbage address. Going to retry in that scenario
instead of assuming an outage.
2018-06-20 13:24:33 -07:00
Greyson Parrelli
2c17b54ef9 Show a banner in the event of a service outage.
We will now determine if there has been a service outage and render a
banner at the top of the conversation list if we detect that there has
been one.
2018-06-18 14:32:45 -07:00
Greyson Parrelli
30be732ae8 Don't auto-download attachments from unknown contacts. 2018-06-11 10:47:27 -07:00
Moxie Marlinspike
70c2a863cc Correctly store backup
Fixes #7831
2018-05-24 09:57:16 -07:00
Greyson Parrelli
54dbffaf30 Added ability to share contacts.
The "contact" option in the attachments tray now brings you through an
optimized contact sharing flow, allowing you to select specific fields
to share. The contact is then presented as a special message type,
allowing you to interact with the card to add the contact to your system
contacts, invite them to signal, initiate a signal message, etc.
2018-05-21 15:45:22 -04:00
Moxie Marlinspike
6c1a1fb9ad Use cache directory on removable storage for backups if present
Fixes #7692
2018-05-21 15:45:22 -04:00
Moxie Marlinspike
a5047cb17b Fix for sender's expiring messages in group with unregistered user
Fixes #7719
2018-05-21 15:45:22 -04:00
Greyson Parrelli
43622e603d Save replies in drafts.
Previously, quotes were not saved to drafts, meaning they would be lost
when leaving the conversation or app. Now, a QuoteId (which represents
the necessary data to restore the QuoteModel) is serialized and stored
in the DraftDatabase.

Fixes #7716
Closes #7729
2018-04-26 09:19:22 -07:00
Nicholas Rizzio
e6f76159b0 Export "creating backup" string
Closes #7656
2018-04-19 17:59:31 -07:00
Greyson Parrelli
fa99e8f0d0 Updated reply-to UI.
All UI components are now properly styled and functioning according to
spec.
2018-04-16 17:33:26 -07:00
Moxie Marlinspike
d567534609 replies 2018-04-16 17:33:26 -07:00