Commit Graph

2224 Commits

Author SHA1 Message Date
Torsten Grote
d0036deaf7 This addresses two types of introduction corner cases:
* force decline when two of our own identities are introduced to each
  other
* throw away introduction requests to the same identity
  (impossible to trigger from UI)

Closes #284
2016-04-20 11:31:54 -03:00
akwizgran
9f4cacd81c Merge branch '286-progress-wheels' into 'master'
Don't use inverse style for progress bars. #286

Fixes the appearance of progress bars on Gingerbread, no difference on other platforms. Thanks to @str4d for finding the source of the problem.

See merge request !145
2016-04-19 10:17:05 +00:00
akwizgran
53eb67b153 Removed Tor binaries from repo. #203 2016-04-18 12:50:34 +01:00
Ernir Erlingsson
87635c7654 Merge branch '297-flickering-contacts' into 'master'
Fix flicker when loading contact list

Fixes #297.

See merge request !144
2016-04-18 08:57:54 +00:00
Ernir Erlingsson
48f8460793 Merge branch '298-qr-code-crash' into 'master'
Catch runtime exceptions from QR code decoder. #298



See merge request !146
2016-04-18 08:57:15 +00:00
akwizgran
0927bd5b01 Moved zxing dependency to briar-android. 2016-04-15 17:51:22 +01:00
akwizgran
6197f5a44c Catch runtime exceptions from QR code decoder. #298 2016-04-15 17:06:05 +01:00
akwizgran
98b6b1f471 Don't use inverse style for progress bars. #286 2016-04-15 15:20:32 +01:00
akwizgran
f1a83139cf Fixed flicker when loading contact list. #297 2016-04-15 11:05:02 +01:00
akwizgran
076f7d411e Merge branch '276-introduction-tests' into 'master'
Unit Tests for the Introduction Client

Please note that I based this MR is on top of the introduction UI in !122, because I needed to do some more refactoring on top of the other refactoring ;) The refactoring and the tests are in two separate commits.

An integration test will be added as a separate MR.

This addresses part of #276.

See merge request !136
2016-04-14 16:24:50 +00:00
Torsten Grote
823b95f7d6 Add tests for IntroductionManager and Validator 2016-04-14 12:53:23 -03:00
Torsten Grote
d205f3b0d8 Refactor the Introduction Client to avoid circular dependencies
This injects the IntroducerManager and the IntroduceeManger for easier testing
2016-04-14 12:53:22 -03:00
akwizgran
0f9338f5e9 Message queue manager should be a singleton. 2016-04-14 12:00:08 +01:00
akwizgran
20c8cacda2 Merge branch '253-introduction-ui' into 'master'
Introduction UI

This is the user interface for the new introduction feature as specified by @Megalox in #253.

This will close #253 

See merge request !122
2016-04-13 16:54:04 +00:00
Torsten Grote
f7340caec4 restructure conversation item classes 2016-04-12 17:04:52 -03:00
Torsten Grote
c5bfea2155 address issues found in final review
(except refactoring of conversation item classes)
2016-04-12 17:04:52 -03:00
Torsten Grote
90d984ee52 Ensure responses shown after requests, clarify wording, reuse transactions
When devices' clocks are out of sync, it is possible that a response is
shown before the request. This commit makes sure that the timestamp of
responses is always later than the last message in the conversation.

Some wording could be misunderstood to thing introductions were
successful even though they were not. That has been clarified.

A new database transaction was created when getting contacts and local
transport properties. This has been changed to re-use the existing
transaction.

Also addresses minor issues found in review.
2016-04-12 17:04:52 -03:00
Torsten Grote
4b7a32a5ee Find correct session state in case the same one is used twice.
The code made the assumption that a session state can be identified by
the unique session ID. However, when multiple identities from the same
device are involved, there are two sessions with the same ID running on
the device.

Hence, a second identifying criteria has to be used to uniquely identify
the correct session. Here, the ID of the group was chosen.
Unfortunately, the session state can not be cached easily anymore
leading to a small performance penalty when getting all messages for the
UI.
2016-04-12 17:04:52 -03:00
Torsten Grote
5ea7ff2857 UI for introducing two contacts to each other
Show system notification for successful introductions
2016-04-12 17:04:52 -03:00
Torsten Grote
7c687736df Merge branch '287-local-identities-as-contacts' into 'master'
Don't allow local identities to be added as contacts

Fixes #287

See merge request !137
2016-04-12 20:04:16 +00:00
akwizgran
40022b8326 Don't allow local identities to be added as contacts. 2016-04-11 13:24:25 +01:00
akwizgran
770015e5f9 Fixed wrong size check in introduction validator. 2016-04-06 18:06:42 +01:00
akwizgran
a15dc951c5 Merge branch 'connect-to-new-contacts' into 'master'
Connect to new contacts

The motivation for this change was realising that when we add a new contact, if the Tor plugin has finished publishing its descriptor and stopped polling, we'll never try to connect to that contact via Tor. I decided that instead of making a special case for Tor, we should try to connect to new contacts via all transports.

Changes:
* Don't register outgoing connections until we've read the incoming tag - this prevents the connection indicator from blinking when connecting to a contact who's removed us
* Connect to newly activated contacts using all available transports, without waiting for the poller
* Removed device IDs from transport properties, we don't know how we're going to handle multi-device support yet


See merge request !135
2016-04-06 16:13:59 +00:00
akwizgran
3c2378e024 Fixed indentation. 2016-04-06 17:12:27 +01:00
akwizgran
d38aa4fd9b Exchange transport properties when adding contact. 2016-04-06 17:12:27 +01:00
akwizgran
7de83b5624 Removed device ID from transport properties. 2016-04-06 17:12:20 +01:00
akwizgran
befd916eba Connect to newly activated contacts. 2016-04-06 17:10:54 +01:00
akwizgran
04a1f2b12c Don't poll plugins that don't support polling. 2016-04-06 17:10:54 +01:00
akwizgran
90f3d33f86 Log the transport ID when registering connections. 2016-04-06 17:10:54 +01:00
akwizgran
d5bf7194f6 Register outgoing duplex connection after reading tag.
This prevents the connection from being registered until the contact responds, which ensures we're actually connected to the contact.
2016-04-06 17:10:53 +01:00
akwizgran
4e3835d2fe Merge branch 'tests-cleanup' into 'master'
Clean up tests

* Broke up ConstantsTest (#280) - the key encoding parts are now in KeyEncodingAndParsingTest, the message encoding parts are in MessageSizeIntegrationTest
* Renamed the other integration tests in briar-android-tests
* Moved the integration tests in briar-android-tests to the top-level package, as they all involve code from multiple packages
* Separated DatabaseExecutorModule from DatabaseModule so we can use a different @DatabaseExecutor in integration tests
* Merged AppModule with AndroidModule (@ernir, this touches code you're working on but I don't think there are any conflicts)
* Renamed some TestUtils methods for consistency
* Used TestUtils.getRandomBytes() where applicable

Fixes #280.

See merge request !133
2016-04-06 16:03:48 +00:00
akwizgran
88852de283 Renamed AndroidModule to AppModule. 2016-04-06 17:02:56 +01:00
Torsten Grote
21bb23ba67 Merge branch '273-service-exceptions' into 'master'
Services should throw exceptions for startup errors

Fixes #273

See merge request !134
2016-04-06 15:51:03 +00:00
akwizgran
bd38a84322 Merge branch '281-close-transport-connection' into 'master'
Close transport connection if tag isn't recognised. #281

Factored out common code from various DuplexTransportConnection implementations into an abstract superclass, and changed the logic for closing connections so that connections with unrecognised tags are closed immediately. This prevents deleted contacts from thinking they're connected to us when they're not.

See merge request !132
2016-04-06 14:58:05 +00:00
akwizgran
f7dbfe2551 Renamed a couple of integration tests. 2016-04-06 15:56:34 +01:00
akwizgran
b480777548 Services should throw exceptions for startup errors. 2016-04-05 15:44:50 +01:00
akwizgran
205dc66572 Test cleanup. #280 2016-04-05 14:19:10 +01:00
akwizgran
dc1adc21ae Merged AppModule and AndroidModule. 2016-04-05 14:16:42 +01:00
akwizgran
2b19e4c8db Close transport connection if tag isn't recognised. #281 2016-04-05 11:37:38 +01:00
akwizgran
bbd14f1af4 Merge branch '279-create-client-state' into 'master'
Create local state for clients at startup. #279

Most of the clients we've written so far use private groups shared with individual contacts and/or a local group that's not shared with anyone. To make it easier to ensure that the necessary groups exist when we need them, this patch allows clients to register startup hooks for creating their local state.

Fixes #279.

See merge request !131
2016-04-04 15:07:37 +00:00
akwizgran
355c84d7ac Merge branch '123-crash-xml-layout' into 'master'
Migrate CrashReportActivity to XML layout

Part of #123.

See merge request !126
2016-04-04 15:07:05 +00:00
akwizgran
8850a2ad61 Merge branch 'non-reentrant-db-lock' into 'master'
Don't allow reentrant transactions

The database's transaction lock is reentrant, meaning that a thread that's already holding the lock can acquire it again. This would allow a thread that already has a transaction in progress to start another transaction, which could cause transaction isolation issues and/or lock timeouts on the database's internal locks.

Check that the current thread isn't already holding the lock when starting a transaction.

See merge request !127
2016-04-04 15:06:22 +00:00
str4d
884d8530b4 Migrate CrashReportActivity to XML layout 2016-04-02 16:54:05 +13:00
akwizgran
945b5eb1ac Create local state for clients at startup. #279 2016-04-01 17:15:35 +01:00
akwizgran
845d3fa47e Bumped expiry date to 1 May 2016. 2016-04-01 12:21:58 +01:00
akwizgran
e44329a2b4 Removed debug logging from message queue manager. 2016-03-31 12:34:53 +01:00
akwizgran
4393517f31 Merge branch '118-contact-introductions' into 'master'
Contact Introduction Backend

This MR allows you to introduce two of your contacts to each other. They both will receive an introduction with an optional message and then can accept or refuse the introduction which is presented as a notification.

When reviewing, I propose to review the individual commits separately as I took great care to split functional independent parts into separate commits. You might also want to have a look at the [Introduction Client Wiki page](https://code.briarproject.org/akwizgran/briar/wikis/IntroductionClient) to better understand what is going on before looking into the actual code.

Protocol sessions and states are not yet deleted and the UI is still missing (#253). In order to practically test this feature, the UI from !122 is needed.

See merge request !116
2016-03-31 11:26:09 +00:00
akwizgran
db6c813522 Merge branch '117-qr-contacts' into 'master'
BQP with QR codes

This MR implements BQP for key agreement over short-range transports. It also implements the Android UI for using BQP with QR codes.

Closes #117.

See merge request !84
2016-03-31 11:21:02 +00:00
akwizgran
5d1084ae84 Fixed a stupid forum post validation bug.
The signature covers the forum post body, not the message body.
2016-03-31 12:06:28 +01:00
akwizgran
7e3d3625aa Don't allow reentrant transactions.
The database's transaction lock is reentrant, meaning that a thread that's already holding the lock can acquire it again. This would allow a thread that already has a transaction in progress to start another transaction, which could cause transaction isolation issues and/or lock timeouts on the database's internal locks.

Check that the current thread isn't already holding the lock when starting a transaction.
2016-03-31 11:02:52 +01:00