Commit Graph
100 Commits
Author SHA1 Message Date
Torsten Groteandakwizgran d5beca5351 Port Signal's emoji implementation to Briar
Add functionality to save and restore recently used Emojis

Update emoji and add new categories based on AOSP's XML file
2016-09-23 17:18:18 +01:00
Torsten Grote 1583163f88 Merge branch '538-recipient-offers-message-to-sender' into 'master'
Don't offer messages back to the sender

Closes #538

See merge request !323
2016-09-22 15:02:06 +00:00
Torsten Grote fd4dbdc081 Avoid repeated author status lookups 2016-09-21 17:26:24 -03:00
Torsten Grote 89ab4dd04e Merge branch '665-android-executor-npe' into 'master'
Fix potential NPE in AndroidExecutorImpl

Always wait for the startup latch to ensure the background thread's Handler is initialised before using it.

Closes #665.

See merge request !319
2016-09-19 16:15:41 +00:00
Torsten Grote bf023874f0 Merge branch '664-no-delivery-hook' into 'master'
Don't throw an exception if the client has no delivery hook

Closes #664.

See merge request !318
2016-09-16 23:41:53 +00:00
Torsten Grote 7a1003178d Introduce new MovementMethod for text selection and link clicks 2016-09-13 15:02:27 -03:00
Torsten Grote cab667ef6a Show all apps that can open links and dismis dialog after click 2016-09-13 14:47:52 -03:00
Torsten Grote 7035d8063c Clean HTML from RSS feeds with Jsoup and show Link Warning 2016-09-13 14:47:51 -03:00
Torsten Grote 2fbbb663a3 Merge branch '619-validation-transactions' into 'master'
Refactor ValidationManager and fix some bugs

The validation manager uses a pattern of throwing an exception from within a transaction, then trying to ensure that the transaction gets committed anyway by setting it complete in a finally block. This is a bad idea - if the intentional exception isn't thrown but a later method throws an unintentional exception, the changes up to that point will be committed instead of rolled back.

I reworked the control flow to remove this pattern, and in the process realised that the validation manager was doing a lot of work to provide objects to attach to MessageStateChangedEvents, which are only used by tests these days. So I fixed that and a couple of other issues.

The VALID state is no longer needed and has been removed.

Closes #619

See merge request !313
2016-09-13 15:18:16 +00:00
Torsten Grote af5b246d7b Introduce a DestroyableActivity for UI result handlers 2016-09-08 11:25:02 -03:00
Torsten Grote 7c5945de01 Check if activity is still alive before returning results to it 2016-09-07 17:44:07 -03:00
Torsten Grote ccc49df08e Address review issues 2016-09-07 14:24:19 -03:00
Torsten Grote ac325d4423 remove unused resources 2016-09-07 12:51:43 -03:00
Torsten Grote 0a0e1b4280 Always replace current blog activity when new one opened
Fixes #635
2016-09-07 12:51:42 -03:00
Torsten Grote cb64740916 Set blog title when opening blog
Fixes #634
2016-09-07 12:51:42 -03:00
Torsten Grote 73bc86df4a show only a teaser for blog posts in lists 2016-09-07 12:51:41 -03:00
Torsten Grote 307e124ee8 Make the blog post pager usable for the feed and individual blogs 2016-09-07 12:51:41 -03:00
Torsten Grote 60b4c5649a Make blog post text clickable
by making it only selectable in detail view
2016-09-07 12:51:40 -03:00
Torsten Grote 448bf86379 don't crash if an RSS entry has no date 2016-09-06 15:55:53 -03:00
Torsten Grote 91e529a9e9 Merge branch 'socks-socket' into 'master'
Fetch RSS feeds via Tor

This patch replaces jsocks with our own minimal SOCKS 5 implementation, which is compatible with Android's OpenSSL hacks (see discussion on #599 for the horrifying details). This allows us to use OkHttp over Tor to fetch RSS feeds.

It turns out that SOCKS 5 without authentication is a really simple protocol: https://tools.ietf.org/html/rfc1928

Closes #599.

See merge request !308
2016-09-06 18:37:38 +00:00
Torsten Grote 54290bc374 Show Blog Posts always in the same design
This also adds comments to the blog post detail screen that were
previously missing.
2016-09-05 13:33:44 -03:00
Torsten Grote 3e39ad8a68 Add one introduction test for modified response message 2016-09-02 11:49:10 -03:00
Torsten Grote 07445ada41 Fix view recycling issue with author name typeface 2016-09-02 11:38:44 -03:00
Torsten Grote 5281d8b468 Allow Blog Controller listener to re-attach 2016-09-02 11:25:17 -03:00
Torsten Grote 0deac1d1b6 Only show RSS Feed Import Failed Dialog when Activity lives 2016-09-02 11:12:24 -03:00
Torsten Groteandakwizgran bb0a2a5b32 Add a scene transition animation when reblogging a blog post 2016-09-02 11:53:16 +01:00
Torsten Groteandakwizgran 6d7e0aab07 Reblogging and Comment UI 2016-09-02 11:53:08 +01:00
Torsten Groteandakwizgran da08072409 Make the user's own identities visually distinct
Closes #593
2016-09-02 11:52:34 +01:00
Torsten Groteandakwizgran 9664aea520 Introduce and use CardView and AuthorView for Blog Posts 2016-09-02 11:52:34 +01:00
Torsten Grote fe4f71fe0f Remove lots of unused code for identity selection 2016-09-01 16:13:55 -03:00
Torsten Grote 6f0ffa8439 Add database method for retrieving a contact by author ID
and use it for retreiving the status of an author faster.
Also add tests for both.
2016-09-01 14:06:38 -03:00
Torsten Grote 69dd399bd2 Scroll down Adding Contact screen
Closes #616
2016-09-01 12:16:26 -03:00
Torsten Groteandakwizgran e023e5d8fc Start RSS Feed Fetcher only after TransportEnabledEvent for Tor 2016-09-01 12:55:25 +01:00
Torsten Grote 61c05c1dd4 Fix tests broken by latest merges! 2016-08-31 11:32:53 -03:00
Torsten Grote fc5a7290e3 Calculate and verify signature and MAC for Introduction ACKs
Before the introducee sends her ACK,
she derives a master key from the ephemeral shared secret as before.

Two nonces and a MAC key are then derived from the master key.
The local introducee signs one of the nonces and calculates a MAC
over her own identity public key, ephemeral public key,
transport properties and timestamp.
The local introducee includes the signature and MAC in her ACK.

On receiving the remote introducee's ACK,
the local introducee verifies the signature and MAC.
Should the verification fail, an ABORT is sent to the introducer and
the remote introducee that was added as inactive is deleted again.
2016-08-30 19:58:54 -03:00
Torsten Grote 7db0e4472a Introduction Client: Add MAC and signature to ACK message
The MAC and signature are not yet generated and verified.
This will happen in a later commit.
2016-08-30 19:25:53 -03:00
Torsten Grote 65bdd5558e Address bugs and comments from reblogging code review 2016-08-30 18:52:33 -03:00
Torsten Grote 3dd3a18694 Add support for comments and reblogging to Blog Client
Comments and reblogs need to depend on the post they refer to.
Since message dependencies are limited to one group,
the post and also the comments need to be wrapped
when commented on or reblogged to another blog.

For this reason, in addition to comments, two new wrapping message types
are introduced. They retain all data of the original messages and allow
for reconstruction and signature verification.

This commit breaks backwards compatibility with old blog posts.
It removes the content type, title and parent ID from the post
message structure.
2016-08-29 13:37:20 -03:00
Torsten Grote 743fc7dd1f Do not require an entire Message for the MessageSharedEvent 2016-08-29 13:36:09 -03:00
Torsten Grote 4518f59a54 Improving notices with messages attached in conversation view 2016-08-29 12:01:51 -03:00
Torsten Grote 11c0cb667f Improve conversation screen graphics with less padding
Also replace more raster graphics with vector graphics.
2016-08-29 10:02:15 -03:00
Torsten Grote 132a03d0a9 Merge branch '364-add-mac-to-crypto-component' into 'master'
Add MAC function to crypto component



See merge request !295
2016-08-26 13:34:56 +00:00
Torsten Grote c666b0493c Merge branch '618-bdf-dictionary-iteration-order' into 'master'
Define iteration order of BdfDictionary

Closes #618

See merge request !296
2016-08-26 13:29:06 +00:00
Torsten Grote 55602ed76a Merge branch '614-dev-reporter-does-not-close-stream' into 'master'
Use Briar's IoUtils.copy(), not H2's IOUtils.copy()

Our implementation closes both streams, H2's implementation leaves them open.

Closes #614.

See merge request !293
2016-08-25 13:11:54 +00:00
Torsten Grote d93f59b4ef Merge branch '555-blog-controller' into 'master'
Blog controller thread safety

This patch removes the mutable list of posts from the blog controller to make it thread-safe, and adds a cache of message bodies to speed up reloads.

Closes #555.

See merge request !276
2016-08-24 19:36:06 +00:00
Torsten Grote 743053930a Remove crash report settings
Closes #311
2016-08-24 13:33:03 -03:00
Torsten Grote cc7602e566 Remove sensitive information from crash and feedback reports 2016-08-24 13:24:12 -03:00
Torsten Grote 8b56e082b3 Scrub IP addresses before logging 2016-08-24 13:22:28 -03:00
Torsten Grote ca094620d8 Scrub Bluetooth MAC addresses before logging 2016-08-24 12:47:20 -03:00
Torsten Grote 83be5c766e Scrub onion addresses from log 2016-08-24 12:47:20 -03:00
Torsten Grote 72fb4e9bc7 Post RSS entries within one transaction
This also fixes a bug where new feeds was not added properly.
2016-08-24 12:39:04 -03:00
Torsten Grote e10f68b496 Add feed title to imported entries
Also fixes one bug where a new feed was not saved and
improved HTML stripping a bit.
2016-08-24 11:20:45 -03:00
Torsten Grote 22e7ec5b27 Merge branch 'gradle-2.14.1' into 'master'
Upgrade gradle to 2.14.1 and gradle plugin to 2.1.3.



See merge request !292
2016-08-24 13:44:47 +00:00
Torsten Grote 00240bfa57 Merge branch '573-hidden-service-address' into 'master'
Add hidden service address for dev reports

Closes #573

See merge request !289
2016-08-23 13:14:35 +00:00
Torsten Grote bc6557e82d Merge branch '566-raise-api-level' into 'master'
Stop supporting Gingerbread

Closes #566

See merge request !278
2016-08-22 16:52:41 +00:00
Torsten Grote 659cf85ca1 really bump the expiry date 2016-08-22 12:56:42 -03:00
Torsten Grote 294bc0bdd2 update translations and bump expiry date 2016-08-22 12:23:21 -03:00
Torsten Grote c3a14d9275 Add a new event that is broadcasted when a contact is verified
Also, don't support unverifying contacts.
2016-08-19 12:41:10 -03:00
Torsten Grote e690bcb3cc Add introduced contacts as UNVERIFIED
Closes #580
2016-08-19 12:31:00 -03:00
Torsten Grote caee7fe61b Validate New Messages for Reblogging and Comments of Blog Posts
Also includes unit tests for the new message types.

Closes #591
2016-08-15 14:28:17 -03:00
Torsten Grote bcf7488afd Cleanup Gradle and Proguard to fix connectedCheck 2016-08-11 14:54:31 -03:00
Torsten Grote 71196e3494 Let clients decide whether to share messages or not 2016-08-11 12:19:10 -03:00
Torsten Grote 9defb099dd Merge branch '342-organise-strings-xml-to-make-life-easier-for-translators' into 'master'
Group strings and remove unused resources

Before I grouped the strings, I removed unused resources as well to not group things that are not being used anymore.

The grouping tries to follow a normal usage lifecycle of the app where the user works their way down the navigation drawer and explores all features in one area.

Closes #342

See merge request !277
2016-08-11 14:28:19 +00:00
Torsten Grote b3d6e7d12d Open Camera in UI Thread to prevent crash on some devices
Also properly handle back navigation when trying to add contacts.
2016-08-10 20:00:01 -03:00
Torsten Grote 739e8b4511 Fix one crash when showing QR Code 2016-08-10 18:44:55 -03:00
Torsten Grote 72906acaee Group strings and remove unused resources
Closes #342
2016-08-09 15:06:11 -03:00
Torsten Grote 6fc7e69849 Harmonize Text Color of Blog Posts in Detail View 2016-08-08 13:00:25 -03:00
Torsten Grote 30092550c7 Don't crash when pressing Up button in WriteBlogPostActivity
Closes #587
2016-08-08 13:00:11 -03:00
Torsten Grote b17fbcb135 Merge branch '582-tor-assets' into 'master'
Update Tor assets if they're older than the APK

Extract the Tor binary, GeoIP database and config file from the APK if they haven't been extracted since the APK was last updated.

On the Galaxy Nexus, skipping extraction of the binary if it's already up to date shaves about 1.5 seconds off the Tor plugin's startup time.

Closes #582.

Depends on !272.

See merge request !273
2016-08-08 14:47:24 +00:00
Torsten Grote f8337d09ae Merge branch '578-tor-ports' into 'master'
Don't connect to Tor if it's already running

For some time now we've had a reliable way of shutting down the Tor process (the __OwningControllerProcess command line argument combined with the TAKEOWNERSHIP command), but TorPlugin#start() still assumes that Tor may already be running. This allows another app to bind the Tor control and SOCKS ports and collect confidential data from Briar (#578). It also allows two Briar instances running on the same device to try to communicate with the same Tor process, which prevents proper shutdown (#572).

This patch prevents the Tor plugin from starting unless it's able to start its own Tor process with the expected control and SOCKS ports. If two Briar instances are running on the same device, only one of them will be able to use Tor. The other should fail to start its Tor plugin and then function normally without Tor access, including normal shutdown.

Fixes #572, #578. Open another ticket if you want two Briar instances on the same device to have their own Tor processes. :-)

See merge request !272
2016-08-08 14:27:28 +00:00
Torsten Grote 1ec56fa3ef Allow unsubscribing from shared blogs
Only personal blogs from non-contacts can be removed.
This also adds integration tests that check if blogs can actually be removed.

Closes #579
2016-08-05 14:08:09 -03:00
Torsten Grote 17db03d40a Return proper Invitation objects in SharingManager
Fixes #470
2016-08-05 13:07:16 -03:00
Torsten Grote b04bde4f41 Fix crashes when no Bluetooth or no Camera is available
Briar crashed when run in a device without bluetooth or without camera
such as an emulator.

Closes #514
2016-08-05 12:30:57 -03:00
Torsten Grote 7be17668c1 Fix regression where forum entries were not shown
Closes #565
2016-08-04 19:07:30 -03:00
Torsten Grote f8f1c7f0d4 Show Explanatory Graphic Before Scanning QR Codes
Closes #429
2016-08-04 18:22:48 -03:00
Torsten Grote dd0d23359b Prevent empty state messages from showing briefly
When we clear a list in onPause(), the proper behavior is that the empty state
message is shown, because the list is indeed empty.

However, we will reload the list content again in onResume(),
so the fix chosen in this commit is to force showing the progress bar
right after clearing the list.

Closes #576
2016-08-03 19:12:53 -03:00
Torsten Grote 1a32458783 Merge branch '498-implement-ui-for-sharing-blogs' into 'master'
UI for sharing blogs

Not posting any screenshots, because the UI is the same as for forums.

This does not yet offer the possibility to unsubscribe from blogs again. Should be done in a different MR as this one is big enough already.

Closes #498,  #497

See merge request !263
2016-08-03 21:47:02 +00:00
Torsten Grote a4cf91fba5 Use Inheritence for shared Forum and Blog Sharing Code 2016-08-03 18:46:20 -03:00
Torsten Grote 16da3f2cab Fix SharerLeavesBeforeResponse Integration Test
Closes #575
2016-08-03 18:15:14 -03:00
Torsten Grote a3b2358164 Show Sharing Status for Blogs
This refactors the current SharingStatusActivity
so it can be used for forums and blogs.
2016-08-03 13:01:25 -03:00
Torsten Grote e4f5d8e6e7 Show Blog Invitations
This refactors the forum invitation code,
so it can be used by both: forums and blogs.
2016-08-03 13:01:25 -03:00
Torsten Grote a69a4028b0 Fix Blog Sharing Backend and Add Blog Sharing Integration Tests 2016-08-03 13:01:24 -03:00
Torsten Grote a552d1b6a6 Show blog invitation requests and responses in private conversation 2016-08-03 13:01:24 -03:00
Torsten Grote 2f7d188a07 UI for Sharing Blogs
This commit refactors the code for sharing forums,
so it can be used for sharing blogs as well.

It does not yet include code for responding to blog invitations.
2016-08-03 13:01:23 -03:00
Torsten Grote 50d2742cae Fix two Blog NPEs
Closes #571
2016-08-03 10:38:45 -03:00
Torsten Grote 62c1c3e08d Simple UI for Managing and Importing RSS Feeds
Closes #517
2016-08-02 20:21:54 -03:00
Torsten Grote 6454acdaa5 Post new RSS entries into the user's personal blog
Closes #486
2016-08-02 20:02:40 -03:00
Torsten Grote 8d1a26ba72 Keep track of which RSS entries have been seen
This is done by remembering the time of the latest entry.
All entries newer than that are considered new and will be posted.

Closes #485
2016-08-02 19:19:48 -03:00
Torsten Grote e527e30712 Implement background task for fetching RSS feeds
* Implemented in briar-core as a `ScheduledExecutorService`
  that gets started when the app starts
* The briar-api has a `FeedManager` interface
  that the UI can use to register and unregister feeds
* In this first iteration, feeds are fetched via HTTP(S), not Tor

Closes #484
2016-08-02 19:18:55 -03:00
Torsten Grote a452060b41 Address issues found in code review 2016-08-01 18:08:05 -03:00
Torsten Grote 31cd6e8958 Fix NPE in ContactListFragment
Closes #562
2016-08-01 16:26:01 -03:00
Torsten Grote c17ef86968 Clear Forum Invitation adapter only when invitations could be removed 2016-08-01 12:55:56 -03:00
Torsten Grote ce2cb01558 Show Blog Post times with new timestamp and update it periodically
Closes #559
2016-08-01 12:37:14 -03:00
Torsten Groteandakwizgran 5a2fd2018f Fix Chevron in Forum sometimes losing its Blue Color 2016-08-01 14:35:52 +01:00
Torsten Groteandakwizgran 15d139afd4 Pause Periodic List Refresh when View is not Visible
Closes #553
2016-08-01 14:35:51 +01:00
Torsten Groteandakwizgran 04af39f567 Show notifications for new blog posts
This also adds a setting allowing people to turn blog post notifications off.

Closes #488
2016-08-01 13:21:12 +01:00
Torsten Groteandakwizgran 64b596d0f9 Show Responses to Forum Invitations in Private Conversation
Closes #472
2016-08-01 12:13:51 +01:00
Torsten Groteandakwizgran bca12bb0e5 Show Personal Blog When Clicking On Post in Combined Blog Feed
Closes #415
2016-08-01 11:26:53 +01:00
Torsten Grote d8272d875b Remove ForumPersistentData 2016-07-29 15:36:15 -03:00
Torsten Grote e782e699fe Remove BlogPersistentData 2016-07-29 15:29:04 -03:00