Commit Graph

5330 Commits

Author SHA1 Message Date
Ernir Erlingsson ac5d68df81 Added dependency verifications and removed Splash header 2016-03-14 21:01:21 +01:00
Ernir Erlingsson 25324697ac cleanup and added missing desktop modules 2016-03-14 21:01:21 +01:00
Ernir Erlingsson 1be400eb84 Switched Roboguice/Guice out for Dagger 2 2016-03-14 21:01:21 +01:00
akwizgran e5d7038195 Merge branch '206-settings-prefs-alt' into 'master'
Material design settings - alternative

Closes #206.

Alternative to !77 that does not rely on an additional external library. The two alternatives should be compared for backwards-compatibility specifically regarding the ringtone selector.

Includes code from https://github.com/consp1racy/android-support-preference
License: Apache License v2.0

See merge request !78
2016-03-14 16:20:35 +00:00
Torsten Grote e8ad11210c Merge branch '266-message-queues' into 'master'
Message queues. #266

A message queue is a group shared by two devices that delivers messages from each device to the other in order. The first 64 bits of the message body contain a sequence number that's incremented for each message sent in a given direction. The incoming and outgoing sequence numbers and information about any messages received out of order and waiting to be delivered are stored in the group metadata.

See merge request !121
2016-03-14 14:56:43 +00:00
Santiago Torres 24f733ed05 WIP: Adds Transport properly validator test 2016-03-13 20:42:09 -04:00
str4d 770d9ddc5f Migrate settings to PreferenceFragmentCompat
Includes code from https://github.com/consp1racy/android-support-preference
License: Apache License v2.0
2016-03-11 21:06:06 +00:00
akwizgran 02eca8ec38 Unit tests for MessageQueueManagerImpl. 2016-03-11 17:18:10 +00:00
akwizgran e458853f34 Extra logging to track down Tor connection problems. 2016-03-11 15:21:26 +00:00
akwizgran 4afcf2e4a4 Added logging to track down deletion bug. 2016-03-11 10:13:35 +00:00
akwizgran c615dd1ed1 Merge branch 'bluetooth-race' into 'master'
Fix race condition when closing redundant Bluetooth sockets

The Bluetooth invitation code has a race condition: if Alice and Bob connect to each other at roughly the same time, they each consider their outgoing socket to be redundant and close it, resulting in both sockets being closed. This can be triggered pretty reliably by using two phones of the same model and pressing 'Continue' at the same time on both phones.

When more than one invitation socket is opened, Alice should pick which one to use and Bob should use whichever one Alice picks, which Bob can detect by trying to read from both sockets.

Hopefully the Bluetooth invitation code will be retired when #117 is merged, but I'm putting this up for review in case we need to keep Bluetooth as a fallback method.

See merge request !120
2016-03-09 10:12:05 +00:00
akwizgran 5bb8e95b26 Pass original message to BDF validators and hooks. 2016-03-08 17:03:22 +00:00
akwizgran 9e40d0be16 Added placeholder for MessageQueueManagerImpl tests. 2016-03-08 16:28:31 +00:00
akwizgran efa06527c9 Moved validation interfaces into respective managers. 2016-03-08 16:22:09 +00:00
akwizgran d308a30d05 Added BdfIncomingMessageHook. 2016-03-08 16:07:36 +00:00
akwizgran ab7cc13014 Added QueueMessage support to BdfMessageValidator. 2016-03-08 16:07:36 +00:00
akwizgran a4d6de0340 Added message queue manager. 2016-03-08 16:07:29 +00:00
akwizgran c8fed348f0 Merge branch '263-delete-all-the-things' into 'master'
Delete all app data when deleting account. #263

When deleting the user's account, delete everything in the app's persistent storage directory except the libs directory, which is populated with native libs when the app is installed.

Fixes #263.

See merge request !119
2016-03-08 09:37:24 +00:00
akwizgran c9276de399 Renamed validation hooks to incoming message hooks. 2016-03-07 18:36:30 +00:00
Torsten Grote 8960644273 Merge branch 'use-client-helper' into 'master'
Use client helper in existing clients

Use the new ClientHelper to reduce boilerplate in existing clients. Add a BdfMessageValidator superclass for clients that format their messages as BDF lists and their metadata as BDF dictionaries (which all existing clients do).

See merge request !115
2016-03-07 14:47:32 +00:00
akwizgran fe9c3adc64 Raise interrupt flag when catching InterruptedException. 2016-03-07 12:17:00 +00:00
akwizgran 0ac67239e3 Fixed race condition when closing redundant sockets.
When more than one invitation socket is opened, Alice should pick which one to use and Bob should use whichever one Alice picks. This fixes a race condition where each party picked a different socket and closed the other.
2016-03-07 11:50:47 +00:00
akwizgran 88ab694af8 No need to unwrap Bytes before adding to dictionary. 2016-03-04 21:11:25 +00:00
akwizgran 5998412a8a Use ClientHelper in PrivateMessageFactoryImpl. 2016-03-04 21:10:52 +00:00
akwizgran d342594313 Use ClientHelper in ForumPostFactoryImpl. 2016-03-04 21:10:52 +00:00
akwizgran cc7ffee28d Superclass for validating messages that are BDF lists. 2016-03-04 21:10:44 +00:00
akwizgran 05ec49e45b Use ClientHelper in TransportPropertyManagerImpl. 2016-03-04 21:07:33 +00:00
akwizgran 9d5924fc24 Use ClientHelper in ForumSharingManagerImpl. 2016-03-04 21:07:33 +00:00
akwizgran 2ccd1dee33 Use ClientHelper in ForumManagerImpl. 2016-03-04 21:07:33 +00:00
akwizgran 8beff5c743 Use ClientHelper in MessagingManagerImpl. 2016-03-04 21:07:33 +00:00
akwizgran 4ddc34ee01 Added new methods to ClientHelper. 2016-03-04 21:07:33 +00:00
akwizgran 5b47d6d3ff Merge branch 'bdf-improvements' into 'master'
BDF improvements

* Change the semantics of the BdfList/Dictionary methods with default values so they return the default value if the value is missing, or throw an exception if it the value's present but has the wrong type - this is more useful for validators, which have to deal with optional values without accepting values of the wrong type
* Reuse BdfReader/Writer for MetadataParser/Encoder so we don't have two implementations of BDF


See merge request !117
2016-03-04 21:06:11 +00:00
akwizgran db188657ca Reuse BdfReader/Writer for MetadataParser/Encoder. 2016-03-04 21:00:30 +00:00
akwizgran 418798b1f0 Added BdfList/Dictionary getters for optional values. 2016-03-04 21:00:05 +00:00
akwizgran 30c3a33a0a Delete all app data when deleting account. #263 2016-03-03 16:23:10 +00:00
akwizgran 08099714ba Bumped expiry date to 1 April 2016. 2016-03-02 09:58:23 +00:00
akwizgran 10561a2df3 Added new module to roboguice.xml. 2016-02-29 16:38:55 +00:00
akwizgran cab94360ec Skip message header when parsing body. 2016-02-29 15:47:56 +00:00
akwizgran 154e95a989 Merge branch 'client-helper' into 'master'
Helper class to reduce client boilerplate

* Renamed BdfReader methods for consistency with BdfList/BdfDictionary
* Added readList() and readDictionary() methods to BdfReader
* Added ClientHelper to reduce boilerplate when converting messages and metadata to and from BDF
* Moved PrivateGroupFactory to the same package as ClientHelper


See merge request !114
2016-02-29 14:37:45 +00:00
akwizgran 75d53598b0 Merge branch 'validation-manager-tests' into 'master'
Unit tests for ValidationManagerImpl

Unit test for the validation manager. I also changed the way the validation manager loads unvalidated messages - instead of using a single DB task to load all unvalidated messages, it loads a list of message IDs and then loads each message in a separate task. This prevents the DatabaseExecutor from being blocked by a long-running task if there are lots of messages to validate.

See merge request !113
2016-02-29 14:35:30 +00:00
akwizgran 34d34a754a Renamed metadata methods. 2016-02-29 14:29:53 +00:00
akwizgran 640f5484e0 Moved PrivateGroupFactory to clients package. 2016-02-29 14:25:29 +00:00
akwizgran 2e7df53dba Added helper class so clients can use less boilerplate. 2016-02-29 14:23:50 +00:00
akwizgran 9e0add7d4c Renamed BdfWriter methods, added support for NULL_VALUE. 2016-02-29 14:23:49 +00:00
akwizgran 3ce62818aa Renamed BdfReader methods, added convenience methods. 2016-02-29 14:23:49 +00:00
Torsten Grote 9dec498e7e Merge branch 'add-contact-transaction' into 'master'
Add contact and transport keys in the same transaction

This avoids a potential problem where the app crashes after adding the contact but before adding the transport keys, leaving the contact unusable.

See merge request !112
2016-02-29 14:07:33 +00:00
akwizgran e3374b7584 Rename BDF methods. 2016-02-29 11:57:42 +00:00
akwizgran 46e7a52c22 Merge branch 'bdf-type-conversion' into 'master'
Convert BDF types in lists and dictionaries



See merge request !111
2016-02-29 11:55:08 +00:00
akwizgran 5045b58e01 Explicitly check array lengths. 2016-02-29 11:51:16 +00:00
akwizgran e28dc17881 Helper methods and unit tests for BdfList/Dictionary. 2016-02-26 16:27:24 +00:00