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.
We manually play the ringtone when in-thread notifications are enabled,
but we weren't using the sound specified by the channel in the system
settings. This fixes that problem by reading the NotificationChannel
setting.
Previously, contact shares would be displayed as "Media Message". Now
it'll show the same as it does in a notification, namely
"{contact-emoji} {contact-name}".
Notifications for replies will no longer display as a "Media Message" if
they do not contain media. Instead, they will just contain the reply
text.
Fixes#7798
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.
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
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
1) Prefetch identity keys when possible
2) Always accept prefetched keys or keys from incoming messages
3) Block sending only if it's a recent change, or if always
block is enabled
// FREEBIE
getActiveNotifications() seems to throw an NPE on some Motorola
ROMs, all of which appear to be 6.0.1. This change just swallows
the exception.
6.0 doesn't support bundled notifications, so I think it's alright
if they don't get canceled, since the summary notification will
still be displayed correctly.
This would only affect users who have an android wear device
attached to one of these buggy ROMs. By swallowing this exception,
they would not always get notifictions dismissed on their wear
device.
Fixes#6043
// FREEBIE