Combined with the switch to server acked messages, this will
prevent the race condition that occurred when an incoming message
showed up at exactly the moment the app updated.
It'd be great if we could just do REPLACE INTO, but it's too
late to add a UNIQUE() constraint. =(
Fixes#2287Closes#3029
// FREEBIE
1) Switch to new TextSecureAddress addressing, rather than mixing
long-based recipient IDs into libtextsecure.
2) Get rid of RecipientFormattingException throws in calls to
RecipientFactory.
Closes#2570
1) Migrate from GSON to Jackson everywhere.
2) Add support for storing identity key conflicts on message rows.
3) Add limited support for surfacing identity key conflicts in UI.
- Save drafts without thread in draft database
- Clear drafts when deleting conversation(s), otherwise
the drafts stay in the database and will reappear when a thread
with the same threadId is created
Closes#1510
When searching for messages only simple threads matching the
contact names are returned as search results. With this commit
also group converstations where the group title matches the search
term are displayed in the result. This makes search results more
consistent with the conversation list as now all conversation
titles (i.e. contact names and group titles) are searched through.
Fixes#1954Closes#2216
1) Change SessionBuilder to only establish sessions via
KeyExchangeMessage and PreKeyBundles.
2) Change SessionCipher to decrypt either WhisperMessage
or PreKeyWhisperMessage items, automatically building
a session for the latter.
3) Change SessionCipher to tear down new sessions built
with PreKeyWhisperMessages if the embedded WhsiperMessage
fails to decrypt.
1) Break the core cryptography functions out into libaxolotol.
2) The objective for this code is a Java library that isn't
dependent on any Android functions. However, while the
code has been separated from any Android functionality,
it is still an 'android library project' because of the
JNI.
Fixes#342
- using regex pattern/matcher to escape chars below 0x0020 and
above 0xd7ff
- using String.Replace to escape XML entities
- changed XmlPullParser from Xml.newPullParser() to
XmlPullParserFactory parser to fix import on GB
The "sent time" is not reliable on SMS messages. This switches
to using "sent time" by default for push messages, but "received
time" for SMS messages.
Long-click on a media attachment will now bring up the normal
context menu for a ConversationItem long-click, but with the
addition of a "save attachment" option.
This allows users to long-click on messages with media in them
and still see the other contextual menu options.
// FREEBIE
1) On the push side, this message is a flag in PushMessageContent.
Any secure message with that flag will terminate the current
sessin.
2) On the SMS side, there is an "end session" wire type and
the convention that a message with this wire type must be
secure and contain the string "TERMINATE."
1) In addition to the Recipient interface, there is now
RecipientDevice. A Recipient can have multiple corresponding
RecipientDevices. All addressing is done to a Recipient, but
crypto sessions and transport delivery are done to
RecipientDevice.
2) The Push transport handles the discovery and session setup
of additional Recipient devices.
3) Some internal rejiggering of Groups.
1) Move the attachment structures into the encrypted message body.
2) Encrypt attachments with symmetric keys transmitted in the
encryptd attachment pointer structure.
3) Correctly handle asynchronous decryption and categorization of
encrypted push messages.
TODO: Correct notification process and network/interruption
retries.
1) Move all the crypto classes from securesms.crypto.
2) Move all the crypto storage from securesms.database.keys
3) Replace the old imported BC code with spongycastle.
1) Make the radio change a synchronous action with a timeout.
2) Move the send logic into an MmsTransport, in preparation for
UniversalTransport composition.
3) Move the download logic into a synchronous receiver.
Messages that are not "secure" (encrypted or key exchange) are
automatically marked as read if TextSecure isn't the default
KitKat SMS app.
This change in functionality allows people who aren't using
TextSecure as a default SMS app on KitKat to still receive
notifications when they get incoming encrypted messages.
1) Added a new message status to MmsDatabase to
signify a pending MMS download which requires
APN settings.
2) Added a database method to query MMS messages
based on status.
3) Added login to SendReceiveService for processing
of MMS pending APN information.
4) Moved all APN/MMS settings into ApnPreferencesActivity
and transformed PromptApnActivity into a simple
informational activity.
5) Added logic to check for APN settings on send and
receive of all MMS (media, group, email) and direct
user to PromptApnActivity then ApnPreferencesActivity
if necessary.
6) Vocab/grammar adjustments.
1) Allow imports from the stock SMS database at any time.
2) Provide plaintext export support, in a format compatible with
the "SMS Backup And Restore" app.
3) Fix the DB weirdness on encrypted restore that previously
required killing the app.
1) There is no longer a concept of "verified" or "unverified."
Only "what we saw last time" and "different from last time."
2) Let's eliminate "verify session," since we're all about
identity keys now.
3) Mark manually processed key exchanges as processed.
On some systems, the DB upgrade was failing because there were
too many rows for the cursor window. This moves some looping
operations into single update statements by using the substr()
command, and chunks the rest using a series of LIMITs.
1) Display the individual sender name in a group conversation.
2) Add an "address" column to MmsDatabase and keep FROM there.
3) Remove all blocking operations from MmsDatabase.Reader path.
4) Strip SMIL and other undisplayable parts from part count.
5) Fix places where messages weren't being correctly decrypted.
1) We now delay MMS notifications until a payload is received,
or there's an error downloading the payload. This makes
group messages more consistent.
2) All "text" parts of an MMS are combined into a second text
record, which is stored in the MMS row directly rather than
as a distinct part. This allows for immediate text loading,
which means there's no chance a ConversationItem will resize.
To do this, we need to include MMS in the big DB migration
that's already staged for this application update. It's also
an "application-level" migration, because we need the MasterSecret
to do it.
3) On conversation display, all image-based parts now have their
thumbnails loaded asynchronously. This allows for smooth-scrolling.
The thumbnails are also scaled more accurately.
1) We now try to hand out cursors at a minimum. There has always been
a fairly clean insertion layer that handles encrypting message bodies,
but the process of decrypting message bodies has always been less than
ideal. Here we introduce a "Reader" interface that will decrypt message
bodies when appropriate and return objects that encapsulate record state.
No more MessageDisplayHelper. The MmsSmsDatabase interface is also more
sane.
2) We finally rid ourselves of the technical debt associated with TextSecure's
initial usage of the default SMS DB. In that world, we weren't able to use
anything other than the default "Inbox, Outbox, Sent" types to describe a
message, and had to overload the message content itself with a set of
local "prefixes" to describe what it was (encrypted, asymetric encrypted,
remote encrypted, a key exchange, procssed key exchange), and so on.
This includes a major schema update that transforms the "type" field into
a bitmask that describes everything that used to be encoded in a prefix,
and prefixes have been completely eliminated from the system.
No more Prefix.java
3) Refactoring of the MultipartMessageHandler code. It's less of a mess, and
hopefully more clear as to what's going on.
The next step is to remove what we can from SmsTransportDetails and genericize
that interface for a GCM equivalent.
1) Update the create, prompt, and change passphrase activities.
They are no longer dialog themed, and should look a little
less ugly.
2) Update the import DB activity to be less ugly and more robust.
3) Abstract all of the state handling stuff out of
ConversationListActivity. This is now handled by RoutingActivity,
which all launch intents move through.
1) If a message fails to be delivered, post a notification in the
status bar if that thread is not active and visible.
2) If a message fails to be delivered because there is no service,
keep retrying every time service becomes available again.
1) We record time sent in SMS database (date_sent).
2) We record time received in MMS database (date_received).
3) We union this information correctly in MmsSmsDatabase.
1) Refactor recipient class to support asynchronous loading operations.
2) Refactor recipient factory to simplify recipient access.
3) Consoliate everything into one recipient provider that is capable of
doing async lookups and intelligent caching.
1) When sending an SMS or MMS to multiple recipients, only show one
ConversationItem, but provide statistics on the number of recipients
delivered to.
2) Still break up the messages for secure and insecure messages.
Mostly, the inheritance graph for MessageRecord/MmsMessageRecord was
all messed up, and each class was overloaded for things it shouldn't
have been.
1) Broke MessageRecord/MmsMessageRecord up into: DisplayRecord, ThreadRecord,
MessageRecord, SmsMessageRecord, NotificationMmsMessageRecord, and
MediaMmsMessageRecord.
2) Updated all the adapters/views to keep pace with that change.
1) Change all instances which use concatenation to build strings
with variables in them to use string formatting instead.
2) Extract all string literals from layouts and menus into strings.xml
3) Extract all string literals from code into strings.xml
1) Move to Fragments for the list view.
2) Switch to CursorLoader from my jankey self-managed cursor.
3) Add session security logic to the ActionBar.
4) Fix colors to be less ugly.
1) Start breaking the UI out into Fragments.
2) Switch to Cursor loaders from managed cursors.
3) Switch to inflated menu resources.
4) Break out some basic functionality into helper classes.