Commit Graph

150 Commits

Author SHA1 Message Date
Moxie Marlinspike
723fb4ffdd MMS and Group Messaging Improvements
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.
2013-05-06 08:40:55 -07:00
Moxie Marlinspike
2305a648fb Minor refactoring 2013-05-06 08:40:55 -07:00
Moxie Marlinspike
e80882b83b Locally encrypted messages no longer show as ciphertext notifications. 2013-05-06 08:40:55 -07:00
Moxie Marlinspike
7c47ea5cec Make MMS more asynchronous and consistent with new SMS types.
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.
2013-05-06 08:40:55 -07:00
Moxie Marlinspike
dd0aecc811 First cut at group messaging refactor. 2013-05-06 08:40:55 -07:00
Moxie Marlinspike
83e260436b Major storage layer refactoring to set the stage for clean GCM.
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.
2013-05-06 08:40:55 -07:00
Moxie Marlinspike
303d1acd45 Initial client support for GCM message send/receive 2013-05-06 08:40:55 -07:00
Moxie Marlinspike
2f39283da3 Initial GCM registration 2013-05-06 08:40:55 -07:00
Moxie Marlinspike
f2475491fe Fix for NPE on null encrypted MMS messages. 2013-04-23 14:49:32 -07:00
Moxie Marlinspike
fcea8ebc3f Added Telenor Norway to APN Defaults 2013-03-17 11:38:44 -07:00
cavanm
8e2288205c Use APN defaults when no other APN information is available.
Provides an in-app source for APN info for use in the case that the
device store is unavailable and the user hasn't provided local
connection parameters.

Only covers T-Moble USA, AT&T, and Verizon right now. Only T-Mobile is
tested. Other carriers can be added and tested on an ongoing basis.
2013-03-17 11:31:17 -07:00
Moxie Marlinspike
fb21c09dbe Catch NPE thrown by APN provider. 2013-03-17 11:19:36 -07:00
Moxie Marlinspike
5df88cc0a7 Scrub recipients for MMS messages so they'll be valid PLMN. 2013-03-14 15:59:28 -07:00
Moxie Marlinspike
ecaaff50da Switch UA to Android default and added x-wap-profile header 2013-03-14 08:44:42 -07:00
Moxie Marlinspike
cdd6d59e6e Remove send button smart enable/disabled.
Temporarily remove this functionality, since it doesn't account for
attachments yet.
2013-03-13 17:45:32 -07:00
Jake McGinty
674cd68ebd Modern-style Android chat icons (incl. secure icon)
Make the send-button appearance more similar to the default Android
messenger application
2013-03-10 16:05:35 -07:00
Moxie Marlinspike
b05c840616 Fix for MMS send bug with an APN proxy. 2013-03-10 15:47:13 -07:00
Moxie Marlinspike
58961fe0a8 Minor spelling correction. 2013-03-10 14:50:55 -07:00
Moxie Marlinspike
bb3777aa68 Fix for viewing group recipients without contact information. 2013-03-07 17:47:57 -08:00
Moxie Marlinspike
07c59d969a Prompt user for APN details when missing.
If TextSecure is running on a device without APN details, we prompt
the user to manually specify them when the user goes to send an MMS
message.
2013-03-04 17:43:04 -08:00
Moxie Marlinspike
01fdb1115d We don't support unknown content lengths yet. 2013-03-03 18:50:13 -08:00
Moxie Marlinspike
2e55e9cdca Guard NPE 2013-03-03 18:49:55 -08:00
Moxie Marlinspike
6230abb524 Add synchronized access to cache 2013-03-03 18:49:39 -08:00
Moxie Marlinspike
ef6a5c69af Tweak MMS retrieval and submission.
1) Only attempt direct connect outside of MMS radio mode on CDMA.

2) Don't switch back to normal radio state if pending messages remain.
2013-03-03 18:44:58 -08:00
Moxie Marlinspike
48576dbb58 Catch mysterious SMS too large exception. 2013-02-26 22:57:09 -08:00
Moxie Marlinspike
5ca7b1080c Fix for concurrentmodificationexception on race condition. 2013-02-26 22:56:48 -08:00
Moxie Marlinspike
eb9b2ef318 Fix for NPE on null mms bytes. 2013-02-26 22:56:15 -08:00
Moxie Marlinspike
6bd0f35787 Sometimes querying the APN DB throws this exception as well. 2013-02-26 22:55:23 -08:00
Moxie Marlinspike
2397176d9e Search support in ConversationList for <3.0 devices.
Switch to the newly-introduced ActionBarSherlock SearchView.
2013-02-24 19:37:37 -08:00
Moxie Marlinspike
34822557a6 Catch exception triggered by bug in telephony provider during import. 2013-02-24 11:59:43 -08:00
Moxie Marlinspike
bac6b78b11 Clear passphrase field on invalid entry. 2013-02-21 14:47:18 -08:00
Moxie Marlinspike
5bf5b404a1 Fix for notification NPE on unknown sender. 2013-02-20 20:44:38 -08:00
Moxie Marlinspike
f73adfc8f5 Change MMS network request pattern.
Currently we're flipping the radio in "MMS" mode, and connecting through
any proxies specified in the APN.  This always work, or at least doesn't
seem to work on Sprint, since the configured mms proxy rejects proxy
requests.

Instead we try the following in this order:

1) Connect over normal data connection directly to MMSC.
2) Connect over MMS radio connection to MMSC.
3) Connect over MMS radio connection with any configured proxy to MMSC.

Hopefully this doesn't fuck up shit on other unknown networks.
2013-02-20 18:10:33 -08:00
Moxie Marlinspike
df05508a6f Switch to AndroidHttpClient and explicit targeting. 2013-02-20 10:25:53 -08:00
Moxie Marlinspike
1ff4fd842c Pass on incoming messages until DB is imported. 2013-02-17 15:09:01 -08:00
Moxie Marlinspike
5eb04328d3 Improve passphrase and onboarding UI. Abstract out routing.
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.
2013-02-17 15:09:01 -08:00
Moxie Marlinspike
0a7181670c Radio updates happen frequently on some phones, switch to dynamic. 2013-02-14 20:42:29 -08:00
Moxie Marlinspike
d0d85ea52c Fix for duplicate message bug. 2013-02-14 19:15:40 -08:00
Moxie Marlinspike
c2dcf7ae74 Refactor MasterSecret initialization, access, and timeout paths.
1) Consolidate all of the KeyCachingService interaction into a single
   mixin. Activities extend delegates which call through to the mixin.

2) Switch Activity increment/decrement triggers from onStop to onPause
   in order to account for some screen locks that don't stop activities.
2013-02-10 17:30:51 -08:00
Moxie Marlinspike
90280a62ae Poor man's styling. 2013-02-09 17:43:31 -08:00
Moxie Marlinspike
2277dbd572 Localize ok/cancel 2013-02-09 17:38:33 -08:00
Moxie Marlinspike
471ef16a5b Support for robust delivery.
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.
2013-02-09 15:17:55 -08:00
Moxie Marlinspike
71f43075a9 Distinguish unread threads with background color. 2013-02-09 10:03:38 -08:00
Moxie Marlinspike
0a8c62e0e3 Include incoming message body in notifications.
1) Refactor the master secret reset logic to properly interact with
   services.

2) Add support for "BigText" and "Inbox" style notifications.

3) Decrypt message bodies when unlocked, display 'encrypted' when
   locked.
2013-02-08 16:27:43 -08:00
Moxie Marlinspike
49ea135e37 Don't auto-set thread to read on send. 2013-02-06 16:40:09 -08:00
Moxie Marlinspike
a29120d911 Fix for IndexOutOfBoundException (race condition on Recipients resolution) 2013-02-04 22:09:17 -08:00
Moxie Marlinspike
b044a68168 Fix for mysterious 'anonymous sender' NPE. 2013-02-04 21:51:25 -08:00
Moxie Marlinspike
01a5c889b0 Export stray strings for localization. 2013-02-04 11:12:03 -08:00
Moxie Marlinspike
dcf73cd009 Fix for 'group message' regression. 2013-02-04 11:03:19 -08:00
Moxie Marlinspike
bf92de394b Add support for resuming compose drafts. 2013-02-04 00:13:07 -08:00