Commit Graph

1880 Commits

Author SHA1 Message Date
akwizgran
062b987585 Merge branch 'private-groups' into 'master'
Factored out code for creating private groups.



See merge request !85
2016-01-29 13:46:29 +00:00
akwizgran
323a47d2f0 Merge branch '224-duplicate-contacts' into 'master'
Allow multiple identities to have the same contact. #224



See merge request !82
2016-01-29 13:12:48 +00:00
akwizgran
e1ba1465e0 Merge branch 'remove-external-storage-permission' into 'master'
Don't use external storage for crash/test reports.

Crash/test reports were written to external storage so they could be attached to emails - by putting the information in the body of the email we can avoid needing the WRITE_EXTERNAL_STORAGE permission.

Also updated the email address for crash/test reports.

See merge request !83
2016-01-29 13:12:12 +00:00
akwizgran
4e17621081 Factored out code for creating private groups. 2016-01-28 18:05:01 +00:00
akwizgran
2584fb52b9 Don't use external storage for crash/test reports. 2016-01-28 16:29:06 +00:00
akwizgran
0fd8a67ee0 Allow multiple identities to have the same contact. #224 2016-01-28 15:57:22 +00:00
akwizgran
ce9a81ff98 Merge branch '218-remove-unicode-from-tests' into 'master'
Remove unescaped Unicode from tests. #218

Fixes #218.

See merge request !81
2016-01-28 15:12:20 +00:00
akwizgran
1589279c2f Merge branch '229-transport-client' into 'master'
Transport properties client. #229

This branch moves support for exchanging transport properties from the sync layer to the client layer.

Local properties are stored in an unshared group. When a contact is added, the latest local properties are copied into a group shared with the contact. Whenever the local properties are updated, they're copied into the groups shared with all contacts.

The transport update messages include a unique device ID that prevents collisions between local and remote messages, and will be used in future for multi-device support.

See merge request !80
2016-01-28 15:05:00 +00:00
akwizgran
9ce39f3f21 Renamed Latest to LatestUpdate for clarity. 2016-01-28 14:49:35 +00:00
akwizgran
857abd6c11 Merge branch '82-identicons' into 'master'
Identicons

Closes #120. Part of #82.

I pulled in the identicon code because there is no published library, and also because when I used it for Bote I ended up modifying the code somewhat for my purposes; I expect the same to happen here.

I am not sure what information should be used to seed the identicon. I originally thought of using the public key, but that seemed to change the identicon every single page load (obviously the representation wasn't consistent). Then I tried using the `ContactId`, which was fine until I got to adding an identicon to `AuthorView`: activities that use it are only passed (via Intent) a name, not anything else. Hence `AuthorView` identicons are currently inconsistent with the contact list and conversations.

See merge request !51
2016-01-27 17:49:52 +00:00
akwizgran
58b6037912 Remove unescaped Unicode from tests. #218 2016-01-27 14:11:32 +00:00
akwizgran
d63f997813 Fixed bug in detection of unchanged properties. 2016-01-27 12:51:56 +00:00
akwizgran
c776d1e893 Include unique device ID in transport updates. 2016-01-27 12:51:55 +00:00
akwizgran
88475bdd54 Transport properties client. #229 2016-01-27 12:51:55 +00:00
akwizgran
baa580c6f4 Replace for with foreach.
I don't care but Android Studio complains.
2016-01-27 12:51:55 +00:00
akwizgran
47e605fcd8 Don't flush buffers on every commit.
This was meant to prevent key reuse with BTPv1, it's no longer needed with BTPv2.
2016-01-27 12:51:54 +00:00
akwizgran
093e44d3ab Cleaned up database initialisation. 2016-01-27 12:51:54 +00:00
akwizgran
cd175fd119 Removed TransportUpdate and TransportAck. 2016-01-27 12:51:54 +00:00
akwizgran
ea02caf577 Don't use FLAG_ACTIVITY_CLEAR_TASK on API < 11. 2016-01-27 12:51:00 +00:00
str4d
90eded1421 Make identicons round
This commit renames identicons to avatars in field names, and uses an ImageView
derivative to show the identicons, which should make implementing #214 easier.
2016-01-26 20:21:35 +00:00
str4d
9749eefb90 Make symmetric identicons 9x9 instead of 5x5 2016-01-26 19:36:21 +00:00
str4d
9318a50cb7 Migrate LocalAuthorSpinnerAdapter to XML, add identicons 2016-01-26 18:34:03 +00:00
str4d
35c59fdb39 Migrate AuthorView to XML, add identicon 2016-01-26 18:34:03 +00:00
str4d
88d81634ca Add identicons to conversations 2016-01-26 18:34:02 +00:00
str4d
e62d60ff52 Add identicons to contact list 2016-01-26 18:34:02 +00:00
str4d
c7387ee37c Modify IdenticonBase to use a dark background for light identicons 2016-01-26 18:34:02 +00:00
str4d
dfb9222ccd Modify IdenticonBase to use Briar's hashing and to use byte[] instead of String 2016-01-26 18:32:20 +00:00
str4d
d645c435fd Identicon generation code from Android-Identicons
Source: https://github.com/saiimons/Android-Identicons
License: Apache License, Version 2.0
2016-01-26 01:39:02 +00:00
akwizgran
f9aa5a4ef9 Merge branch '234-remove-consumers' into 'master'
Removed consumers from BdfWriter. #234

Cleaning up some unused code.

See merge request !76
2016-01-22 14:04:53 +00:00
akwizgran
d512c218cd Removed consumers from BdfWriter. 2016-01-22 11:50:06 +00:00
akwizgran
d69a242f19 Merge branch '30-navigation-drawer-rebased' into 'master'
Navigation drawer (squashed and rebased).

This is @ernir's work on #30 and #181, rebased onto master with recent changes to ConversationActivity and ForumListActivity ported to the respective fragments.

See merge request !75
2016-01-22 10:33:25 +00:00
akwizgran
6de99ed203 Merge branch '225-bluetooth-address' into 'master'
Show Bluetooth address from Settings.Secure in TestingActivity

* To help with investigating #225 (and maybe other bugs in future), show the Bluetooth address from Settings.Secure as well as the address from BluetoothAdapter.getAddress()
* Add Settings.Secure.ANDROID_ID to the entropy pool - it may provide up to 64 bits of extra entropy from the perspective of a remote attacker (no extra bits from the perspective of a local attacker in the same user account, who sees the same ANDROID_ID)


See merge request !73
2016-01-21 17:12:13 +00:00
Ernir Erlingsson
dae29eecce Navigation drawer (squashed and rebased). 2016-01-21 16:49:21 +00:00
akwizgran
7e020454bf Show Bluetooth address from Settings.Secure. 2016-01-21 16:14:21 +00:00
akwizgran
dd8e111b0b Add Settings.Secure.ANDROID_ID to entropy pool. 2016-01-21 14:41:17 +00:00
Torsten Grote
d33dbca25a Merge branch '228-jsocks' into 'master'
Replaced broken jsocks jar. #228

Fixes #228 and may also fix #217. @str4d and @grote, please test and confirm.

See merge request !72
2016-01-21 13:49:37 +00:00
akwizgran
aacd347376 Merge branch '227-update-contact-list' into 'master'
Update contact list when contacts are deleted. #227

The logic in ConversationActivity for adding or updating items didn't allow for items being removed. We *could* come up with logic for doing that - throw all the items from the adapter into a set, remove any items corresponding to current contacts from the set, then batch update the adapter to remove any items remaining in the set - but I think it would be overly complex. It's simpler to just clear the adapter and add the current contacts.

Also tidied up some adapter code while looking for the bug.


See merge request !70
2016-01-21 12:00:58 +00:00
akwizgran
8e4086a34f Merge branch '226-bluetooth-logic' into 'master'
Don't disable Bluetooth unless we enabled it. #226

Fixes #226

See merge request !71
2016-01-21 12:00:14 +00:00
akwizgran
3b510e768a Replaced broken jsocks jar. #228 2016-01-21 11:28:54 +00:00
akwizgran
124a4380d3 Don't disable Bluetooth unless we enabled it. #226 2016-01-20 16:55:01 +00:00
akwizgran
6bb4d45f42 Merge branch '221-group-metadata' into 'master'
Metadata for groups. #221



See merge request !69
2016-01-20 16:54:20 +00:00
akwizgran
cdfaa39338 Update contact list when contacts are deleted. #227
Also removed unnecessary adapter notifications in various places.
2016-01-20 16:08:22 +00:00
akwizgran
88a8081351 Metadata for groups. #221 2016-01-20 15:03:42 +00:00
akwizgran
3c543b0d62 Fixed crash caused by using DB too early in lifecycle. 2016-01-20 15:03:10 +00:00
akwizgran
3872a05ddd Merge branch '209-contact-manager-hooks' into 'master'
Run hooks when contacts/identities are added/removed. #209

Now that the sync layer is separated from its clients, actions that used to occur within the DatabaseComponent, such as adding or removing private groups when adding or removing a contact, have to be handled by clients.

This patch adds a mechanism for clients to register hooks with the Contact/IdentityManager to be run when contacts/identities are being added/removed. The MessagingManager uses ContactManager hooks for adding and removing private groups, and the ContactManager uses IdentityManager hooks for removing contacts when an identity is removed.

I've also changed the way some components register with the LifecycleManager and EventBus.

This merge request depends on !64 - I'll merge them at the same time. Closes #209.

See merge request !68
2016-01-20 14:47:18 +00:00
akwizgran
281ca734e3 Addressed issues from code review. 2016-01-20 14:43:47 +00:00
akwizgran
c4692a7007 Identity manager hooks. #209 2016-01-20 14:43:47 +00:00
akwizgran
82cf12040f Contact manager hooks. #209 2016-01-20 14:43:46 +00:00
akwizgran
33ef09a6bf Implement Service interface rather than extending it.
Whether or not a class needs to run as a service is an implementation decision.
2016-01-20 14:43:46 +00:00
akwizgran
2cd3a3a4f0 Merge branch '112-message-validators' into 'master'
Separate the sync layer from its clients. #112

This patch contains most of the work for #112. MessagingManager and ForumManager have been converted to BSP clients, and the sync layer's message and group formats no longer contain any client-specific data.

Each client has a MessageValidator that's called by the ValidationManager to validate messages belonging to the client. A new MessageValidatedEvent informs listeners when a message has been validated. This required some changes to the UI, especially the notification manager.

While working on the notification manager I realised it was calling Android API methods from background threads, which may be unsafe, and the notification logic was split across BriarService and AndroidNotificationManagerImpl. So I refactored those classes, along with AndroidExecutorImpl, which was using an unnecessary background thread.

Still to do:
* Synchronise blocks, not messages
* Add message type field to message header as per BSP spec
* Convert TransportPropertyManager into a BSP client
* Convert SubscriptionUpdates/Acks into forum client messages


See merge request !64
2016-01-20 14:43:23 +00:00