Update all logos
The launcher icons are now in mipmap folders which is the recommended practice, because on a low-res device, the high res drawables are stripped from the app. This is bad when the user decides to show the app icons really big on the launcher and the high-res drawables are not available anymore.
The old launcher icon seemed to have some sort of 3D effect.

Navigation Drawer Old:

Navigation Drawer New:

Closes#828
See merge request !459
Use different notification icons for different features


Closes#795
See merge request !460
Plugins throw exceptions for startup errors
Please review carefully as I don't know much about the code I have touched here.
Closes#285
See merge request !462
Move all unit tests to their modules and remove briar-tests
There are now tests in these modules:
* bramble-api
* bramble-core
* bramble-j2se
* briar-core
* briar-android
In order to run all -core tests together, the following AS run configuration can be used:

Closes#778
See merge request !456
Add sharing information to private group ActionBar subtitle

Closes#646
See merge request !455
Add creator and online information to group member list


Closes#813
See merge request !448
Add sharing info to ForumActivity action bar subtitle
This indirectly does also most of the work for adding the same information to private groups. However, completing this is blocked by !448.

Second part of #646
See merge request !451
Add blog sharing information to toolbar subtitle
This MR introduces a new `SharingController` which is supposed to be used in activities that show blogs, groups and forums. Feedback on this approach is welcome before this is used to add "Shared with" support to other parts of the UI.
The toolbar subtitle shows information about how many contacts the current shareable is shared with and how many of those are online.
So far this is implemented for blogs:

One part of #646
See merge request !447
Fix Sharing Status screens
* Remove distinction between "shared with" and "shared by"
* Show all contacts a blog is shared with
* Show online status of contacts in sharing screen

Closes#810
See merge request !445
Introduce Dialog Theme for Onboarding
Currently onboarding dialogs and confirmation dialogs look the same. This MR introduces a new dialog theme for onboarding dialogs that looks like the tap target onboarding, so that the user can immediately spot the purpose of the dialog.

See merge request !446
* Remove distinction between "shared with" and "shared by"
* Show all contacts a blog is shared with
* Show online status of contacts in sharing screen
Require a label for hashing
* Add a string label argument to `CryptoComponent#hash()`
* Convert `DoubleDigest` from implementing `MessageDigest`
to implementing `org.spongycastle.crypto.Digest`
(we need to keep `DoubleDigest` for `FortunaGenerator`)
* Convert all other uses of `MessageDigest` to `CryptoComponent#hash()`
* Remove `CryptoComponent#getMessageDigest()`, `MessageDigest` and `DigestWrapper`
Closes#548
See merge request !442
Ensure key agreement tasks finish if they ignore interrupts
The problem here was that `BluetoothSocket#connect()` was throwing an IOException when the task was interrupted - the task treated this like any other connection failure and retried, so the task never finished.
The fix is to check whether the timeout has expired before retrying, so the task eventually finishes even if it ignores the original interrupt.
Closes#283
See merge request !443
* Add a string label argument to CryptoComponent#hash()
* Convert DoubleDigest from implementing MessageDigest
to implementing org.spongycastle.crypto.Digest
(we need to keep DoubleDigest for FortunaGenerator)
* Convert all other uses of MessageDigest to CryptoComponent#hash()
* Remove CryptoComponent#getMessageDigest(), MessageDigest and DigestWrapper
Remove blog pagers
I set out to fix potential race conditions in the blog pagers (the screens you reach by tapping the body of a blog post, that allow you to swipe left and right through the posts in the combined feed or a single blog). The race conditions here are similar to those addressed by !356, but the adapters don't inherit from BriarAdapter so they need to be fixed separately.
While I was looking into this I found a few minor problems with the pagers:
* The feed pager wasn't responding to events - this was fixed in !398
* The feed pager finishes NavDrawerActivity when any blog is removed
* The feed isn't updated when a blog is added (this applies to the list view as well as the pager)
* Posts aren't removed from the feed pager when a blog is removed
The last problem is quite serious - the feed pager's adapter contains posts that are no longer in the DB, so they'll fail to load. To fix that problem, the adapter needs to be cleared in onStop() and repopulated in onStart(). This is the same approach we use for other adapters where items can be removed from the underlying dataset. Unfortunately, FragmentStatePagerAdapter has some odd behaviour when you clear and repopulate it:
1. When reselecting the previously selected item after clearing and repopulating the adapter, the item slides into view instead of just appearing, which makes it look like you've accidentally swiped.
2. Items are sometimes duplicated when clearing and repopulating the adapter, so swiping left or right shows another copy of the same post.
These problems only seem to happen if the adapter is cleared - adding new posts works fine on master, although I think there might be some luck involved - FragmentStatePagerAdapter doesn't seem to be designed to support items changing positions.
I spent a lot of time trying to resolve these problems before concluding that maybe it wasn't worth it, and we should just remove the pagers. That's what's currently implemented in this branch. Tapping the body of a post will show the full-length post, but you won't be able to swipe left or right.
The swiping functionality was nice to have, so if you have ideas for fixing the bugs I'd love to hear them. But I'd rather remove this functionality than keep it in a buggy state with no plan for how to fix it.
Closes#705
See merge request !400
Add integration tests for GroupInvitationManager
This MR is based on !433. It adds some integration tests for the private group invitation protocol. One of those tests fails at the moment.
It does not yet cover all corner cases, so it does not fully address #760, but addresses a part of it. Suggestions for more scenarios to test are welcome.
[Wording changed to prevent #760 from being closed automatically based on the description.]
See merge request !434
Refactor Integration Tests
This is quite a massive MR (currently 1763 additions and 3482 deletions). However, there's not so much happening. The only thing I did was moving redundant code from the various protocol integration tests to the `BriarIntegrationTest` class.
All integration tests are still passing.
Closes#727
See merge request !433
Fix Contacts Item always beeing selected if Back is pressed in the NavMenu
Signed-off-by: goapunk <noobie@goapunks.net>
Closes#782
See merge request !438
Bring back the toolbar shadow

Closes#477
See merge request !431
Make navigation drawer scrollable

Closes#666
See merge request !432
Use uuid created from the commitment/payload instead of the uuid returned from getUuid()
Signed-off-by: goapunk <noobie@goapunks.net>
Closes#774
See merge request !435
Make original author look like commenter when reblogged
This wasn't as simple as changing the persona in the XML,
because the same layout is used for a post whether reblogged or not.
So the persona needs to be changed programmatically for reblogged posts.
For this, the `AuthorView#setPersona()` method has been made public and
was changed to always set all views into the desired state to support
usage in a RecyclerView.

Closes#639
See merge request !426
This wasn't as simple as changing the persona in the XML,
because the same layout is used for a post whether reblogged or not.
So the persona needs to be changed programmatically for reblogged posts.
For this, the `AuthorView#setPersona()` method has been made public and
was changed to always set all views into the desired state to support
usage in a RecyclerView.
make TextInputView resizable again
* TextInputView can resize up to 3 lines again
Signed-off-by: goapunk <noobie@goapunks.net>
Closes#762
See merge request !425
Remove old signature class from API
I decided not to remove the SignatureImpl class, as it's not a trivial wrapper around the Bouncy Castle class, but I moved the interface into briar-core and made it package-private.
Closes#763
See merge request !424
Require a label for signing
This adds a sign() and a verify() method to the CryptoComponent
that take a mandatory label argument to ensure that signatures can't be
repurposed.
Closes#549
See merge request !419
Add visibility information to group member list

Closes#754
See merge request !418
use SHOW_IMPLICIT when showing the softkeyboard, otherwise it won't auto hide
* remove the forced hiding in ThreadListActivity as it should no longer be required
Signed-off-by: goapunk <noobie@goapunks.net>
Closes#761
See merge request !421
Activity module refactor
Broke the Activity module into numerous modules to be able to make numerous controller's package visible
Closes#752
See merge request !417
Do not track incoming positive introduction responses
Positive introduction responses are not shown in the UI (for introducees) and are therefore not marked as read. If they would be tracked, the unread message count would be higher than it actually is and would never decrease.
This is a minimal fix that could be better, but I didn't bother to refactor anything, because we need to rewrite the introduction client eventually anyway once more.
Closes#759
See merge request !416
Add third group visibility state
This branch adds a third group visibility state: each group is either invisible, visible, or shared with respect to each contact.
Invisible means that the contact doesn't see any sign that we subscribe to the group. Visible means that the contact can send us messages in the group, but we won't send the contact messages in the group. Shared means that the contact can send us messages in the group and we'll send the contact any shared messages in the group.
This is a preparatory step for #756. I'll put up another MR with the changes that close that ticket.
See merge request !410
Factor MessageTracker out of BdfIncomingMessageHook
The branch moves the MessageTracker implementation from BdfIncomingMessageHook to a separate class. This will allow the private group invitation client to track messages from classes other than the one that implements the delivery hook.
I've also fixed a couple of bugs, removed some redundant code from the validation manager, and added null-safety annotations (which is how I noticed the bugs).
See merge request !405
Add visibility and OPTIONS button to private group join notices


Closes#732
See merge request !408
Made private group timestamp greater than that of latest message
I did not change `getPreviousMsgId()` to `getPreviousMsgHeader()` because there doesn't seem to be a need for it anymore.
Closes#755
See merge request !409
Add onboarding dialog for revealing contacts screen
This MR is based on !406.

See merge request !407
Add UI for revealing contacts within a private group
This addresses one part of #732. Join notices and onboarding will follow in separate MRs.
Although this MR is technically not based on !402, it does require it to be merged first to compile.

See merge request !406
Mark relationship visible when syncing group with peer
This branch updates the private group invitation protocol to use @grote's new method for marking a contact relationship visible to the group.
I've changed the method slightly because the protocol state machine allows us to leave and re-enter the BOTH_JOINED state (see diagram on #659), so the relationship may already be visible when the method is called. In that case the visibility isn't updated, so we stick with whichever of revealed-by-us and revealed-by-contact happened first.
See merge request !402
Prepare UI for revealing contacts
This changes the visibility of some methods (that need to be accessed from another package), removes unnecessary abstractions and fixes erroneous static import of GroupId constant.
See merge request !404
Add new Exception handler
While working on #732 I again needed to use a `UiResultExceptionHandler` when I actually don't need to return a result. We have some other places in the code like this. So I introduced a `UiExceptionHandler` without the result part and used it where appropriate. While I was touching some classes, I also added the new annotations.
This MR includes another small commit that notifies only on local group messages. Joining a group is a message as well and without this change, you are notified about a new message when you yourself joined your newly created group.
See merge request !403
Add support for revealing contacts to the PrivateGroupManager
This also adds three integration tests and improves some small details here and there in the private group client.
Prerequisite for #732.
See merge request !396
Preserve the order of descriptors in QR code payloads
This fixes a regression caused by my recent changes to the Payload class.
Closes#748
See merge request !399
Don't crash if camera is reopened or surface is recreated
This branch fixes the crash is described in #720, which can be reproduced easily by scanning a QR code and failing to connect (for example, scan a screenshot of a QR code from a device that's no longer listening). When the camera view becomes visible again after trying to connect, its surfaceCreated() callback is called again with the same surface. An IllegalStateException added in !340 causes the crash.
Closes#720
See merge request !397
Make the feed pager respond to events, block notifications
This branch fixes a bug I found while working on #705: FeedPostPagerFragment doesn't start or stop the controller, so it doesn't load newly received posts or block notifications, unlike FeedFragment.
See merge request !398
Encode transport properties more compactly in QR codes
The [original BQP spec](https://code.briarproject.org/akwizgran/briar/wikis/BQP) described a compact encoding for transport properties, with the goal of making the QR code as small as possible. At some point during the implementation, I asked @str4d to use TransportIds and TransportProperties instead, as described in the [current spec](https://code.briarproject.org/akwizgran/briar-spec/blob/master/protocols/BQP.md). That was a mistake.
Using the original format reduces the payload from 60 to 34 bytes (43% smaller) for Bluetooth only, and from 96 to 49 bytes (49% smaller) for Bluetooth and LAN. This makes it easier to scan codes from low-resolution screens using fixed-focus and/or low-resolution cameras. Using this branch I can exchange codes between the Sony Xperia Tipo (320x480 screen, fixed focus, 640x480 preview size) and the Huawei Ascend Y300 (480x800 screen, infinity focus, 1280x720 preview size).
This also removes an obstacle to implementing #558, as TransportIds are no longer included in QR codes.
Closes#346.
See merge request !394
Private group invitation protocol
This branch implements the private group invitation protocol. The implementation is something of an experiment with a new way of writing client protocols.
We start with a role enum that lists the roles in the protocol, and a state enum for each role, which lists the states in the role's state machine. Then there's a session class, parameterised by the state class and therefore by the role, which represents the session information held by that role. Then there's an engine interface, parameterised by the session class and therefore by the role, which encapsulates the protocol logic for the role. Most of this stuff can be created pretty mechanically from the state machine diagrams.
The engine interface has a method for each type of message and each local action. I started out with one method for all messages and another for all local actions, but that turned out to be a bad design - the information about what kind of message was being handled was lost when the message was passed to the engine, and had to be recovered using an instanceof ladder.
Each engine method takes a message or an action and a session, and returns an updated session. A transaction is passed in so the engine can send messages, attach events, and do any other work it needs to do (such as changing the visibility of groups, in the case of this protocol). This removes the need to run tasks outside the engine, so the protocol logic is better encapsulated inside the engine.
Parsing and encoding of messages and sessions is separated from protocol logic. MessageParser, MessageEncoder and the validator are the only classes that know how messages and their metadata are formatted, and likewise SessionParser and SessionEncoder are the only classes that know how sessions are formatted. The metadata keys are declared in a package-private interface.
It's common knowledge that I never make mistakes, so to keep things interesting I've hidden 114 deliberate mistakes in this code. See how many you can spot!
Needs tests before #709 is closed.
See merge request !382
Mark private messages read properly
Depends on !386.
This branch uses the same approach as forums to mark messages read, i.e. each message is marked read when it becomes visible, rather than marking all messages read in a batch when the activity finishes. This fixes two problems: messages not being marked read when isFinishing() is false, for example when leaving the activity via the home button, and a race condition between updating and loading the group count when leaving the activity, resulting in a stale unread message count in the contact list.
Closes#196.
See merge request !388
Create GroupDissolvedEvent and react to it
This MR also makes the private group list react to incoming group invitations (once they are implemented).


Closes#736, #737
See merge request !392
Return to group after not inviting new members
This MR also closes the keyboard when returning from the message fragment.
Closes#735
See merge request !389
Fixed asynchronous Activity leaks in Fragments
If a Fragment has been detached its `getActivity()` method will return null, providing numerous crash possibilities within the app.
My approach to fixing this is to make Fragments use their own `runOnUiThreadUnlessDestroyed` method, which also checks if the Fragment has been detached before running the Runnable
Closes#714
See merge request !387
Use contact ID rather than messaging group ID to identify conversation
We originally used the private messaging group ID to identify the private conversation, but now that the conversation includes messages from multiple clients it's more appropriate to use the contact ID.
This refactoring isn't urgent - I've had the branch lying around for a while, but I'm putting it up for review because #734 will touch some of the same code.
See merge request !386
Add unit tests for KeyManagerImpl
This also creates a `TransportKeyManager` interface and a factory for that to be able to test things separately.
Closes#205
See merge request !380
Let only the creator invite new members to private groups
A little bug I noticed when reviewing the implementation of the invitation protocol.
See merge request !383
Improve QR code workflow slightly
* Improve wording so contacts know they need meet up to scan
and scan each other's codes
* Use consistent progress bar styles
Closes#348
See merge request !381
Implement UX for viewing the membership of a private group
This MR is the second and last MR to address #678. The first part is in !377.

Closes#678
See merge request !364
Implement UX for leaving a group
This MR also includes the creator's part of the UX for dissolving a group since it is almost the same.

Closes#671
See merge request !367
Remove forum content type and change bodies to string
Also removes support for anonymous forum posts.
This MR depends on !360.
Closes#698, #681
See merge request !370
Refactor contact lists, their adapters and items
This was supposed to be a preparation for #678 to make the contacts lists cleaner and easier to re-use for different use-cases. Turns out #678 can't use this work, but it is probably nice to have anyway.
During this work, support for multiple identities has been removed from the various contact lists.
See merge request !363
Implement UX for showing and answering private group invitations
As usual, this MR contains several logically separate commits that could be split out into smaller MRs if desired. It consists of two main parts:
* Showing open invitations in the list of private groups with a snackbar
* Showing invitations and responses in the private conversation
For both parts, the existing code was refactored to allow for a smooth implementation and to leave maintainable code behind.



Closes#707
See merge request !357
ProtocolStateException for client protocols
Methods that implement local actions in a client protocol (for example, accepting an invitation) can throw this exception to indicate that the action wasn't taken because the action isn't applicable to the current state. This can happen if the protocol state machine is updated by an incoming message and the user takes an action before the UI has been updated.
See merge request !368
Disable EmojiTextView software layer rendering when cache is too small
This needs to be tested if it works as intended on several devices.
See merge request !362
Limit scene transition animations to API 23 and above
to work-around [android bug #224270](https://code.google.com/p/android/issues/detail?id=224270).
This is only necessary if the transitioning view might not be available anymore when the exit transition is made.
Closes#686
See merge request !361
Implement UX for creating a private group
This MR allows the user to create a new private group and select contacts to be invited into the group.
There are currently 6 commits starting with some small refactoring for code reuse and making more functionality available in the backend. Each commit could be split up into a dedicated MR if desired.

Closes#661
See merge request !353
Fix race conditions when updating UI from events (again)
This is my second attempt at fixing race conditions caused by updating the UI from events while background tasks are loading data from the DB. Unlike my first attempt, this one is pretty simple and doesn't require too much reasoning about possible races.
The first commit fixes a few list loading bugs I found while working on this problem, and moves the lifecycle callbacks from resume/pause to start/stop, closing #609. The second commit contains the fix for #705, which works as follows:
* Each BriarAdapter has a revision counter
* Before making a change to the adapter that could be overwritten by a background task, increment the revision
* Before starting a background task that could overwrite other changes, get the current revision
* Before applying changes from a background task that could overwrite other changes, check whether the revision has changed
* If the revision has changed, restart the background task
* Otherwise apply the changes
Closes#609. #705 remains open because the PagerAdapters for blogs need to be updated.
See merge request !356
Private Group Threaded Conversation
This MR refactors the forum activity, its controller, its adapter and view holder so *most* of the code can be re-used for private groups by making heavy use of generics.
The refactoring has 1383 additions and 1087 deletions, so just grows the code-base slightly and adding the private group conversation just takes an additional 400 lines.
The MR also includes one commit that moves post/message creation more into clients, so the UI doesn't need to keep track of timestamps. This commit can of course be split out into a separate MR if desired.
Closes#662, #663
See merge request !350
This way the forum and private group client do not need to keep track of
message timestamps themselves and do not need to interact with
post/message factories.
Use constructor injection for controllers
Also made some listeners volatile.
This is part of #704 - if I don't find any other classes that need constructor injection I'll close the ticket.
See merge request !351
Null safety annotations
The @NotNullByDefault annotation marks all fields, methods and parameters in a class or package @NotNull, so Android Studio will warn if values that may be null are used. Please use this annotation for new classes, and specify @Nullable for any fields, methods and parameters that may be null.
Injected fields are initialised to null, so injected classes should use @MethodsNotNullByDefault and @ParametersNotNullByDefault, or specify @Nullable for injected fields.
See merge request !349
Private Group List UI
This MR implements the UI for the list of private groups.
It reacts to three types of events to refresh the displayed data:
* new group message received
* private group added
* private group removed
Missing from final implementation:
* entering groups
* adding new groups
* reacting to a future group dissolved event
* actually removing a dissolved group



Closes#660
See merge request !335
Always show the keyboard when asked for it
The main fix is maintaining the internal keyboard state when the entire view gets hidden, because `onMeasure()` isn't called anymore in that case and can't update it itself.
Closes#676
See merge request !348
Always check whether the context has been destroyed
#551 has the same root cause as #610, which is that when a background operation completes, we need to check whether the activity or fragment that started the operation has been destroyed before doing anything with the UI.
DestroyableActivity has been renamed to DestroyableContext because it's now implemented by some fragments as well. Various existing listener interfaces now extend DestroyableContext.
I also modified the ActivityLifecycleController interface so the activity is passed into the onActivityCreate() method rather than being injected - @ernir please check I haven't broken anything!
Closes#551
See merge request !341
Fix NPE when stopping KeyAgreementTask, improve thread safety
This branch fixes#696 and improves the thread safety of the camera code, mostly by adding @UiThread annotations and occasionally by moving stuff onto the UI thread that might have happened on other threads before.
Closes#696
See merge request !345
Use new group metadata for showing lists
What was supposed to be a minimal change turned into a rather large MR. I did my best to keep things in separate commits, so I can still split this into smaller MRs if desired.
While making use of the new group metadata in the contact and forum list, I noticed some other things in need of improvement to get rid of needing to load all messages:
* Refactor `SharingManager` so its events provide message headers that can be used to update list items
* Add `GroupId` to conversation items, so the metadata of the respective group can be updated as well when marking the items read
* Create a very basic `ConversationManager` so the GroupCount for the various clients can be queried in one go without needing to know all their groups per contact
* Fix a nasty bug that caused forum and blog invitation to not update their read state
* Fix some bugs related to displaying the forum list with proper unread count
Some casual measurements with just a few contacts and messages showed a reduction of the contact list load time by one third.
See merge request !343
Refactor existing adapters into a generic superclass
This MR also moves various blog classes into their own packages and makes the required visibility changes.
Closes#687
See merge request !346
Fix IntroductionManager unit tests
I forgot to run the unit tests after changing the `GroupCount` serialization in response to a review comment. This MR fixes the tests.
See merge request !344
Store message count, unread count and timestamp of latest message in group metadata
This is to eventually address #373 and slowness of other lists. The group metadata is not yet used, but if this MR isn't merged fast, another commit that actually uses it and thus takes care of the slowness will be added.
Closes#584, #585, #586
See merge request !336
Clean up identicon code, remove unused classes
I noticed some debug-level logging coming from the identicon code, went in there to remove it, and realised half the code was unused, so I removed that too.
No functional changes except that the logging is gone and the opacity is now OPAQUE rather than UNKNOWN, which wasn't valid in this context.
See merge request !339
Emoji Support for all user input
All text that can be generated by users will show emoji from the shipped sprites by using the `EmojiTextView` instead of the normal `TextView`.
For all messages and posts, the custom emoji keyboard is now available as well. For this, a new `LargeTextInputView` has been introduced that is a sub-class of `TextInputView`. In order for the emoticon keyboard to work properly the existing views had to be modified heavily, sometimes resulting in new behavior such as scroll views now being above the fixed input field. Actual testing on a device (preferably with a tiny screen) is recommended to make sure this still works as expected. Screenshots will be included at the end of this post.
This MR also disables menu actions rather than hiding them and it includes a fix for a regression that was not showing the keyboard automatically in forums.





Closes#92
See merge request !329
Fix regression in IntroduceeManager
This was happening when the remote response arrives before the local
response is made and thus the local response needs to be send with the
ACK following. The problem was that we ACK was sent before the response
which is not allowed and resulted in the session being aborted by the
introducee. This was happening, because recursion is hard ;)
The fix is only restarting another protocol engine to send the ACK
after the first run has been completed.
An integration test was added to prevent such regression in the future
and to test this code path.
Closes#695
See merge request !338
This was happening when the remote response arrives before the local
response is made and thus the local response needs to be send with the
ACK following. The problem was that we ACK was sent before the response
which is not allowed and resulted in the session being aborted by the
introducee. This was happening, because recursion is hard ;)
The fix is only restarting another protocol engine to send the ACK
after the first run has been completed.
An integration test was added to prevent such regression in the future
and to test this code path.
All text that can be generated by users will show emoji from the
shipped sprites.
For all messages and posts, the custom emoji keyboard is now available.
This also disables menu actions rather than hiding them and thus
closes#677
Included is a fix for a regression that was not showing the keyboard
automatically in forums and thus
closes#676
Create PrivateGroupManager Facade and stub implementation
Some classes were renamed and new base classes introduced in the process. I suggest to expand the "Changed files" before reviewing to get an overview over the changes.
Closes#673
See merge request !332
Fix integration tests
First problem was a race condition with message delivery and the second
one due to the fact that we no longer plan to allow adding of additional
blogs, so the test for that has simply been removed.
See merge request !333
First problem was a race condition with message delivery and the second
one due to the fact that we no longer plan to allow adding of additional
blogs, so the test for that has simply been removed.
Forum controller thread safety and tree safety
This branch solves the concurrent forum issues by code restructure and refactoring.
Closes#556Closes#552
See merge request !262
When a message is shared, share its transitive dependencies
Like other recursive operations on the dependency graph, this is
not done in a single transaction to prevent an attacker from creating
arbitrary large transactions.
So at startup, the `ValidationManager` finds and resumes any
unfinished operations, by looking for unshared messages with shared
dependents.
Closes#589
See merge request !325
Like other recursive operations on the dependency graph, this is
not done in a single transaction to prevent an attacker from creating
arbitrary large transactions.
So at startup, the `ValidationManager` finds and resumes any
unfinished operations, by looking for shared messages with unshared
dependencies.
Try harder to find suitable camera parameters
This branch fixes QR code scanning on the Galaxy Nexus running Cyanogen Mod 12.1 (Android 5.1.1), without breaking QR code scanning on any of the other test devices.
The problem on the Galaxy Nexus was that the selected scene mode was overriding the selected focus mode, so we asked for continuous picture mode but got macro mode. Macro mode requires startAutoFocus() to be called, but we weren't calling it because we'd asked for continuous picture mode.
The fix for that problem is to query the focus mode after applying the parameters and call startAutoFocus() based on the actual mode rather than the requested mode.
But then I discovered another problem: barcode scene mode was setting the flash to auto, so in low light the flash was turning on and off while trying to scan QR codes. That might work well for printed QR codes, but it's terrible when scanning from a screen.
The fix for the new problem is to select barcode scene mode, then try to disable the flash, and if that fails, reset the scene mode. Then we pick the best available video stabilisation, focus mode and preview size.
On the Galaxy Nexus with CM 12.1, that means we use continuous picture mode instead of barcode scene mode, which works fine. All the other test devices pick the same settings as before.
See merge request !321
Check whether File#listFiles() returns null
The docs say this can happen if there's an I/O error. Also fixed a throw-in-finally-block warning and renamed an IoUtils method to make its contract clearer.
See merge request !328
Remove base32 TODOs, fix a potential NPE
I thought we'd be able to get higher data density in QR codes by using base32 instead of base64, allowing the QR code to use alphanumeric mode instead of byte mode. But I tried it, and although the QR code does use alphanumeric mode, it comes out at exactly the same size (see the 346-use-base32-for-qr-codes branch). So this MR removes the TODOs and fixes a potential NPE I spotted while working on the other branch.
See merge request !327
Recreate cache directory after deleting app data
This fixes a warning on the Moto G:
```
E/libEGL: error creating cache file /data/data/org.briarproject/cache/com.android.opengl.shaders_cache: No such file or directory (2)
```
@grote might possibly be related to hardware rendering issues.
See merge request !326
Add first onboarding screen
When the user enters a private conversation after adding her second
contact, an onboarding screen will be shown highlighting the possibility
of introducing the contacts to each other.

Closes#357
See merge request !324
When the user enters a private conversation after adding her second
contact, an onboarding screen will be shown highlighting the possibility
of introducing the contacts to each other.
Emoji
This MR introduces a custom Emoji implementation to Briar for devices that do not support Emoji sufficiently. It is heavily based on Signal's implementation. Hence, the license for the Android part has been changed to GPLv3.
So far, emoji input is only supported for forums and private conversations that both rely on the same `TextInputView`.

See merge request !317
Include stream number in stream header nonce
See the corresponding change in the BTP spec for an explanation:
388e1d23c0Closes#329
See merge request !320
* The offset of the payload length in the record header, in bytes.
*/
intRECORD_HEADER_PAYLOAD_LENGTH_OFFSET=2;
/**
* The length of the BQP key commitment in bytes.
*/
intCOMMIT_LENGTH=16;
longCONNECTION_TIMEOUT=20*1000;// Milliseconds
/**
* The transport identifier for Bluetooth.
*/
intTRANSPORT_ID_BLUETOOTH=0;
/**
* The transport identifier for LAN.
*/
intTRANSPORT_ID_LAN=1;
}
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.