Commit Graph

1846 Commits

Author SHA1 Message Date
Ernir Erlingsson
dae29eecce Navigation drawer (squashed and rebased). 2016-01-21 16:49:21 +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
akwizgran
cd08867611 Made BdfDictionary and BdfList thread-safe. 2016-01-20 10:35:14 +00:00
akwizgran
77054cbae7 Small improvements to DB interface. 2016-01-20 10:35:14 +00:00
akwizgran
5355951466 Separate the sync layer from its clients. #112 2016-01-20 10:35:09 +00:00
akwizgran
f5f572139a Code cleanup. 2016-01-20 10:30:36 +00:00
akwizgran
2216e2b0f2 Merge branch '167-namespaced-settings' into 'master'
ENH: Replaces transport config with namespaced settings

This MR contains the following:

* Adds a new guice module: SettingsManager, that abstracts the settings interface from the underlying database
* Uses SettingsManager to replace the db.getConfig/mergeConfig calls in the Settings activity
* Replaces the getSettings and mergeSettings calls in the database modules to include a namespace parameter. Updates the corresponding queries in the Jdbc module
* Removes the TransportConfig module, as it is not used anymore
* Updates the DuplexPlugin interface, to reflect this change in schemas and calls
* Updates the calls in the corresponding plugins, for both briar-android and briar-desktop
* Updates the hardcoded plugins in the tests to reflect these changes and updates the unit tests.

See merge request !65
2016-01-20 10:13:58 +00:00
akwizgran
1b624af38e Merge branch '223-fix-bluetooth-android-6' into 'master'
Fix adding contacts with Android 6

Adds `ACCESS_COARSE_LOCATION` permission to manifest. Since API 23 this is required for access to the Bluetooth APIs.

See: https://developer.android.com/intl/ko/about/versions/marshmallow/android-6.0-changes.html#behavior-hardware-id

Closes #223

See merge request !67
2016-01-20 10:06:39 +00:00
Santiago Torres
190bb12964 ENH: Replaces transport config with namespaced settings 2016-01-20 00:57:16 -05:00
Torsten Grote
47294047cd add ACCESS_COARSE_LOCATION permission to manifest
Since API 23 this is required for access to the Bluetooth APIs
See:
https://developer.android.com/intl/ko/about/versions/marshmallow/android-6.0-changes.html#behavior-hardware-id

Closes #223
2016-01-19 17:56:05 -02:00
akwizgran
2b02db3023 Merge branch '184-background-threads' into 'master'
Do Bluetooth Adapter enabling/disabling in background thread

Also set the default preferences in a background thread when app starts.

Closes #184

See merge request !66
2016-01-19 15:16:49 +00:00
Torsten Grote
f9f3696fb9 run bluetooth adapter enabling/disabling in background thread
also run setting the default preferences in a background thread

Closes #184
2016-01-19 11:10:34 -02:00
akwizgran
05a83dc32c Merge branch '211-panic-uninstall-briar' into 'master'
Offer option to uninstall Briar in a panic event (#211)

Due to the nature of how Android app uninstall works without root access, this requires manual confirmation after a panic event was triggered.

See merge request !63
2016-01-18 16:44:09 +00:00
Torsten Grote
8b817be076 Offer option to uninstall Briar in a panic event
Due to the nature of how Android app install/uninstall works without
root, this requires manual confirmation after a panic was triggered.

Closes #211
2016-01-18 14:31:10 -02:00
akwizgran
05b7c8aab4 Merge branch '195-remove-notification-when-viewing' into 'master'
Fix notifications for current conversation

* Remove notification about private messages when viewing the conversation
* Do not show a notification for a conversation the user is viewing

Closes #195 

See merge request !61
2016-01-18 15:09:13 +00:00
akwizgran
4625432d76 Merge branch 'remove-jars' into 'master'
Remove upstream jar files from all modules except briar-desktop

This also adds a script for running tests without the Android SDK installed

I've tried to find a better way to do this by conditionally including
the briar-android project in settings.gradle, but failed.
Please note that gradle needs to be installed to run the tests by
executing:
```
./run-tests-without-android.sh
```

See merge request !59
2016-01-18 12:52:44 +00:00
akwizgran
2d36af94ac Removed shell scripts. 2016-01-18 12:50:11 +00:00
akwizgran
ec096e6750 Updated tests for jMock 2.8.1. 2016-01-18 12:47:11 +00:00
Torsten Grote
b956c761bf Add script for running tests without the Android SDK installed
I've tried to find a better way to do this by conditionally including
the briar-android project in settings.gradle, but failed.
Please note that gradle needs to be installed to run the tests by
executing:

    gradle test
2016-01-18 12:47:10 +00:00
Torsten Grote
425c65a75a Add script for running tests without the Android SDK installed
Please note that this script uses the 'configuration on demand' feature
which is still incubating,
so not every test run is guaranteed to work correctly.
However, there have not been any problems so far.
2016-01-15 12:30:41 -02:00
Torsten Grote
872d10e2b0 Removed upstream jar files from all modules except briar-desktop 2016-01-15 12:10:28 -02:00
Torsten Grote
e98677b2bb Do not show a notification for a conversation we are in 2016-01-15 11:27:22 -02:00
Torsten Grote
a1bfe00f1b Remove notification about private messages when viewing messages 2016-01-15 10:53:05 -02:00
akwizgran
4be5b44a41 Merge branch '201-limit-messages-shown-as-unread' into 'master'
Do not show messages as unread when the conversation is open

* Only show them as unread when they arrive out of order
* Mark all messages as read when sending a message

Closes #201

See merge request !62
2016-01-14 14:57:41 +00:00
Torsten Grote
9aa1bbd1ed Do not show messages as unread when the conversation is open
* Only show them as unread when they arrive out of order
* Mark all messages as read when sending a message
2016-01-14 11:49:34 -02:00
akwizgran
36a850d83e Merge branch '215-remove-db-pass-when-panic' into 'master'
Delete database as panic response even when signed out

The method `runOnDbThread()` depends on an executor
that's created by roboguice at startup.
It requires to be signed in, so use a different thread instead.

Closes #215

See merge request !60
2016-01-14 08:59:55 +00:00
Torsten Grote
c8d0e64542 Delete database as panic response even when signed out
The method `runOnDbThread()` depends on an executor
that's created by roboguice at startup.
It requires to be signed in, so use a different thread instead.
2016-01-13 16:49:44 -02:00
akwizgran
d66677e097 Updated Ant build file for briar-tests. 2016-01-13 17:27:58 +00:00
akwizgran
4af522009d Merge branch 'metadata-encoder-parser-tests' into 'master'
Add tests for metadata encoder and parser as well as UTF-8 tests for BDF reader and writer

This also includes a commit to fix issues found in the metadata encoder and parser.

See merge request !58
2016-01-13 17:25:34 +00:00
akwizgran
42d1f6ded0 Use verbs instead of yes/no for lost password dialog. 2016-01-13 17:17:45 +00:00
akwizgran
1a01fc4631 Merge branch '213-use-test-annotation' into 'master'
Use @Test annotation to test for exceptions being thrown (#213)

Please note that this commit only uses the @Test annotation
where exceptions are thrown at the end of the test,
because otherwise the test would not be executed completely.

Examples for this are in DatabaseComponentImplTest where many exceptions
are thrown in close succession or in ConnectionRegistryImplTest where an
exception is thrown in the middle of the test.

Closes #213

See merge request !57
2016-01-13 16:59:36 +00:00
akwizgran
0d2e12e7ff Merge branch '210-support-panic-kit-purge' into 'master'
Support for Destructive Panic Actions

This MR is based on and requires !52.

More details are available in the commit message.

All known issues have now been fixed by new upstream releases.

See merge request !54
2016-01-13 15:37:38 +00:00
akwizgran
d8c65d0029 Capitalise panic button header, tweak wording. 2016-01-13 15:32:11 +00:00
akwizgran
04473d2018 Merge branch '204-support-panic-kit' into 'master'
Initial Support For PanicKit

This MR adds support for the PanicKit libary. It supports the basic default panic response (signing out) which does not require user interaction to work. For destructive panic responses, the user needs to "connect" the panic trigger app (e.g. Ripple) with Briar first. To secure this connection further, TrustedIntents have been added. Gradle Witness is being used to guarantee the integrity of external libraries.

Otherwise, this MR is pretty isolated and should not interfere with other parts of Briar. So merging it should be safe. However, the panic functionality still has rough edges and should not be relied on just now. It will mature along the the PanicKit library and the Ripple app.

Closes #204 


See merge request !52
2016-01-13 10:45:32 +00:00
Torsten Grote
0dfa1b5254 Add UTF-8 tests for BDF Reader and Writer 2016-01-12 17:04:59 -02:00
Torsten Grote
27cb64e936 Properly test values as expected and actual, not the other way around 2016-01-12 17:04:02 -02:00