Commit graph

89 commits

Author SHA1 Message Date
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 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 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 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 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
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
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
Sam Lanning 69f180a5ec Fix some potential integer overflows for expiration time
In a number of locations in the code, there were conversions of message
expiration times from seconds to milliseconds, and then assigned to `long`
contexts. However these conversions were being done as integer multiplication
rather than long multiplication, meaning that there was a potential for
overflows.

Specifically, the maximum value that could be represented before overflowing
was (2^31 / 1000 / 60 / 60 / 24) days = 24.8 days (< 1 month). Luckily the
current allowed timeouts are all less than that value, but this fix would
remove the artificial restriction, effectively allowing values of 1000x greater
(68 years), at least for android.

Related #5775
Closes #7338
2018-03-07 09:55:24 -08:00
Moxie Marlinspike 9d5d43cf3a Wait to process messages until after migration when screenlocked
Fixes #7390
2018-02-04 11:26:02 -08:00
Moxie Marlinspike f36b296e2e Migrate from SQLite and ciphertext blobs to SQLCipher + KeyStore 2018-01-30 17:27:05 -08:00
Moxie Marlinspike 4de14a5dc1 Only use startForegroundService for initial service construction 2017-12-15 09:45:00 -08:00
Moxie Marlinspike acfc9d75e0 Use startForegroundService instead of startService on Android 8 2017-11-30 10:26:41 -08:00
haffenloher 3df9112cf8 Fix synced sent media messages expiring too fast
Fixes #6928
Closes #7135
2017-11-01 15:56:46 -07:00
Moxie Marlinspike 2c1337b33e Make early receipts work in group messages
For both conversation item view and message details view

// FREEBIE
2017-10-02 14:54:55 -07:00
Moxie Marlinspike 856a4d2860 Process configuration request messages
// FREEBIE
2017-10-02 12:39:44 -07:00
Moxie Marlinspike 285947eb66 Show per-member delivery/read status on message info in groups
// FREEBIE
2017-10-01 22:36:52 -07:00
Moxie Marlinspike cb9bc9659b Support for read receipts
// FREEBIE
2017-10-01 22:36:52 -07:00
Moxie Marlinspike 3e3ae5f865 Adjust profile key sharing based on sync messages
// FREEBIE
2017-08-28 17:57:07 -07:00
Moxie Marlinspike d0cd2621ca Only process messages if a body is present
// FREEBIE
2017-08-28 10:30:50 -07:00
Moxie Marlinspike 51c1e4485f Support for profile key syncing to sibling devices
// FREEBIE
2017-08-28 10:30:50 -07:00
Moxie Marlinspike f17af19d09 Access all RecipientDatabase settings directly from Recipient
// FREEBIE
2017-08-28 10:30:50 -07:00
Moxie Marlinspike d1790dfe17 Rename RecipientPreferences -> RecipientSettings
// FREEBIE
2017-08-28 10:30:50 -07:00
Moxie Marlinspike 8e6ca53023 Rename RecipientPreferencesDatabase -> RecipientDatabase
// FREEBIE
2017-08-28 10:30:50 -07:00
Moxie Marlinspike 6924f0519e No need for a RecipientFactory any longer
// FREEBIE
2017-08-28 10:30:50 -07:00
Moxie Marlinspike 77a216b705 Support for retrieving and storing profile information
Initial support for sharing profile keys

// FREEBIE
2017-08-28 10:30:50 -07:00
Moxie Marlinspike 375207f073 Switch MMS groups to use the group database infrastructure
Eliminate the concept of 'Recipients' (plural). There is now just
a 'Recipient', which contains an Address that is either an individual
or a group ID.

MMS groups now exist as part of the group database, just like push
groups.

// FREEBIE
2017-08-28 10:30:50 -07:00
Moxie Marlinspike 737810475e Remove the Canonical Address Database
This was a holdover from Signal's origins as a pure SMS app.
It causes problems, depends on undefined device specific behavior,
and should no longer be necessary now that we have all the
information we need to E164 all numbers.

// FREEBIE
2017-07-31 12:02:29 -07:00
Moxie Marlinspike 82b5b35d3b Eliminate MediaNetworkRequirement style attachment job handling
// FREEBIE
2017-07-21 15:59:27 -07:00
Moxie Marlinspike 074e46b2d9 Enable verification syncing
// FREEBIE
2017-06-23 13:59:06 -07:00
Moxie Marlinspike 1eccc07673 Temporarily disable synchronization messages
Until desktop catches up

// FREEBIE
2017-06-12 09:47:58 -07:00
Moxie Marlinspike 76c28cfa7a Add support for SN verification
// FREEBIE
2017-06-09 19:58:01 -07:00
Moxie Marlinspike b50a3fa2b8 Actually handle busy signal correctly
// FREEBIE
2017-06-01 13:11:48 -07:00
Moxie Marlinspike 51d6144591 Significant MMS changes
1) Remove all our PDU code and switch to the PDU code from the
   klinker library

2) Switch to using the system Lollipop MMS library by default,
   and falling back to our own custom library if that fails.

3) Format SMIL differently, using code from klinker instead of
   what we've pieced together.

4) Pull per-carrier MMS media constraints from the XML config
   files in the klinker library, instead of hardcoding it at 280kb.

Hopefully this is an improvement, but given that MMS is involved,
it will probably make things worse instead.
2017-05-08 18:14:55 -07:00
Moxie Marlinspike cb670d6783 Improve UI send latency
// FREEBIE
2017-04-26 10:27:30 -07:00
Moxie Marlinspike f67eb5f9f3 Support for receiving arbitrary attachment types
// FREEBIE
2017-03-29 18:17:34 -07:00
Moxie Marlinspike a8366387ab Fix the build
// FREEBIE
2017-03-14 15:47:08 -07:00
haffenloher 66c9fd44df Honor synced end session messages
Fixes #5174
Closes #5178
2017-03-14 14:07:18 -07:00
Moxie Marlinspike 2f46c6ca1f Don't redisplay notifications after they have been dismissed
Fixes #5751
Fixes #6218
// FREEBIE
2017-03-14 10:09:24 -07:00
Moxie Marlinspike 8cd50d1e82 Update last seen state on desktop sync send
// FREEBIE
2017-02-22 15:05:35 -08:00
Moxie Marlinspike ea0945d406 Beta support for webrtc video and voice calling
// FREEBIE
2017-02-01 13:55:52 -08:00
Moxie Marlinspike 7e51d61c79 Ignore duplicate signal messages
Fixes #5579

// FREEBIE
2017-01-22 14:47:02 -08:00
Moxie Marlinspike cb23e3a930 Untrusted identity is not always a legacy message content
Closes #5924
Fixes #5922
// FREEBIE
2017-01-12 10:33:23 -08:00
Moxie Marlinspike cdf3a849e9 Reduce DB updates on send path, move support SDK up to 24
// FREEBIE
2017-01-02 17:17:48 -08:00
Moxie Marlinspike cf01959e16 Support recovering forgotten/unknown group info from sender
Closes #5876
// FREEBIE
2016-12-01 10:34:47 -08:00
Moxie Marlinspike 3787551878 Squelch notifications for active desktop converastions
Additionally, limit audible notifications to once every 2 seconds.

// FREEBIE

Fixes #4905
Fixes #3165
Closes #5813
2016-11-24 08:09:34 -08:00
Moxie Marlinspike 5ed1c9c72b Fix for expiration update sync sent messages
// FREEBIE
2016-10-03 12:48:30 -07:00