Commit Graph

715 Commits

Author SHA1 Message Date
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
b480777548 Services should throw exceptions for startup errors. 2016-04-05 15:44:50 +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
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
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
a8fa6339fb Don't disable Bluetooth, always reuse the connection. 2016-03-30 10:38:38 +01:00
akwizgran
ed6c3fb1e3 Expect runtime exceptions from camera API methods. 2016-03-29 17:22:59 +01:00
akwizgran
9714713d73 Add transports to DB during startup. #269 2016-03-28 13:47:23 +01:00
akwizgran
0417639410 Merge duplex and simplex plugin config classes. 2016-03-28 11:28:46 +01:00
str4d
0f7131b83b Replace BT introduction activity with BQP QR code activity 2016-03-26 15:53:13 +13:00
str4d
8cacc73bef Implement BQP Android UI using QR codes 2016-03-26 15:53:09 +13:00
str4d
d7c7a72710 Factor out loading screen activity XML 2016-03-26 15:53:02 +13:00
str4d
d2d8d9d46e Implement BQP transport descriptors 2016-03-26 15:52:58 +13:00
akwizgran
e39a74bd40 Finish SplashScreenActivity when starting next activity.
Fixes #270.
2016-03-15 20:58:57 +00:00
akwizgran
d605e1cae4 Reverted text colour to black.
@color/briar_text_primary is used in a lot of places other than the settings screen - if we want to use grey text in the settings screen we'll need to find another way.

Also fixed some misspelled resource names and included the colours from the Briar palette in color.xml.
2016-03-15 20:46:24 +00:00
akwizgran
3d57516258 Fixed merge issues. 2016-03-15 20:26:50 +00:00
Ernir Erlingsson
11bfa212cc minor tweaks 2016-03-14 21:02:51 +01:00
Ernir Erlingsson
85c66417b5 branch cleanup 2016-03-14 21:02:51 +01:00
Ernir Erlingsson
4da63b3800 Modified the project structure, removed module extension and went instead for a non-complete core dependency graph 2016-03-14 21:02:51 +01:00
Ernir Erlingsson
7670bc48ea Removed unecessary module 2016-03-14 21:02:51 +01:00
Ernir Erlingsson
6f233070fe Semi-encapsulated the core/api dependency graphs and created a proper structure to load eager singletons 2016-03-14 21:02:51 +01:00
Ernir Erlingsson
10764d727b rebased with master 2016-03-14 21:02:51 +01:00
Ernir Erlingsson
9af3ce123a Added eager singletons and made some fixes 2016-03-14 21:02:51 +01:00
Ernir Erlingsson
5aba1d79f1 Fixes after comments, also removed the CryptoComoponent from the IdentIcons 2016-03-14 21:02:51 +01:00
Ernir Erlingsson
95d89553d5 merged with master 2016-03-14 21:02:51 +01:00
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
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
e458853f34 Extra logging to track down Tor connection problems. 2016-03-11 15:21:26 +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
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
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
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
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
d8079b1841 Fixed race condition in descriptor publication.
If two contacts publish their descriptors simultaneously, they may both stop polling without retrieving each other's descriptors. Continue polling for 2 intervals after publishing the descriptor.
2016-02-25 10:10:57 +00:00
akwizgran
066285b86a New polling logic for Tor. #250
Poll for outgoing connections each time the network is enabled, then disable polling once our hidden service descriptor has been published.
2016-02-25 10:10:57 +00:00
akwizgran
fee4beae63 Merge branch '252-lan-polling' into 'master'
New polling logic for LAN. #252

Same approach as !104. Modified the poller to cancel any scheduled poll when pollNow() is called and randomise the next polling interval so plugins that call pollNow() at the same time don't end up polling in sync.

Depends on !104. Fixes #252.

See merge request !105
2016-02-24 20:11:54 +00:00
akwizgran
d829d4711b Merge branch '251-bluetooth-polling' into 'master'
New polling logic for Bluetooth. #251

Increase the polling interval exponentially each time polling is unsuccessful, up to a maximum of 60 minutes. The interval is reset to 2 minutes whenever a connection is made and whenever Bluetooth is re-enabled.

This should reduce battery usage when there are no contacts nearby.

Fixes #251.

See merge request !104
2016-02-24 20:08:05 +00:00
akwizgran
000936b7a2 Return the empty string instead of the fake address. 2016-02-24 20:03:04 +00:00
akwizgran
9789c0ff52 Try to use the real Bluetooth address on Android 6. #225 2016-02-23 11:53:54 +00:00
akwizgran
5ce8927477 New polling logic for LAN (and WAN). #252
Same exponential backoff approach as Bluetooth.
2016-02-22 13:25:07 +00:00
akwizgran
c081c08ff5 New polling logic for Bluetooth. #251
The polling interval increases exponentially each time polling is unsuccessful, up to a maximum of 60 minutes. The interval is reset to 2 minutes whenever a connection is made and whenever Bluetooth is re-enabled.
2016-02-22 13:21:05 +00:00