Structured metadata. #112
Task #112 involves defining an interface between the sync protocol and its clients. To avoid the need for clients to keep their own databases, which could get out of step with the sync protocol's database, we're giving clients that ability to store metadata in the sync protocol's database.
Metadata can be associated with any message, channel, or client. Each metadata object is a simple map from strings to byte arrays. We'll provide a simple query interface to retrieve metadata and/or data by specifying a set of metadata keys. Basically we're building a shitty NoSQL database... erm, I mean, an enterprise-grade key-value store.
The basic metadata object is kind of Spartan, so this patch provides an encoder and parser for storing structured metadata. This gives clients an easy way to associate structured data with messages and channels, while leaving them the option of using their own encoding if they prefer.
This MR depends on !49.
See merge request !50
BdfList and BdfDictionary are no longer thread-safe, they require external locking. Metadata (which is the class that will be passed across API boundaries) is still thread-safe.
Transport properties manager facade, key manager refactoring. #112
Refactoring for #112: decouple the invitation and plugin code from the database with a TransportPropertiesManager facade (which will become a BSP client), and move some key management logic from the invitation code to the KeyManager. Update the integration tests to use the new FooManager facades.
See merge request !49
Final crypto changes for BTPv2. #111
This patch brings the implementation into line with the BTPv2 spec. Changes:
* Use BLAKE2s to generate tags
* KDF arguments for key rotation
* Frame IV format
Closes#111.
See merge request !48
Improve PasswordActivity
* removing screen border visible on small screens
* showing noticeable error message on wrong password input
* showing keyboard again after entering wrong password
* making lost password link easier to recognize as link
* renaming keyboard toggle method from 'hide' to 'toggle'
See merge request !53
* removing screen border visible on small screens
* showing noticeable error message on wrong password input
* showing keyboard again after entering wrong password
* making lost password link easier to recognize as link
* renaming keyboard toggle method from 'hide' to 'toggle'
Use new BriarRecyclerView in ConversationView
This now handles progress bar and empty view itself.
With this commit, it also scrolls down on layout changes like when
keyboard is opened.
See merge request !46
Fix contacts duplicating itself when pressing back button in conversation view.
Normally, this should be handled by the `SortedList` in the `RecyclerView`, but it isn't for some reason. Instead of spending way too much time on finding out why, I am clearing the adapter instead (on each `activity.onResume()`) as it was done before.
Closes#200
See merge request !42
Use BLAKE2s for hashing, key derivation and signatures
SHA-256 is still used for password-based key derivation (will be replaced with Argon2) and Fortuna.
See merge request !47
This is done by update existing items rather than just adding them,
because different timestamps in added items change the sorting criteria
and cause duplicates in the SortedList.
Closes#200
BLAKE2s implementation
Implementation is based on the BLAKE2b implementation from BouncyCastle, and is
therefore licensed under the BouncyCastle license (which will make future
upstreaming of the code easier).
Closes#189.
See merge request !39
Implementation is based on the BLAKE2b implementation from BouncyCastle, and is
therefore licensed under the BouncyCastle license (which will make future
upstreaming of the code easier).
Fix SetupActivity warnings for API 10
Closes#176.
The manual setting of the error message color also (strangely) stops the message from disappearing every second character. I'm not complaining ^_^
I guessed that the text color problem probably stopped occurring from API 14 (at the big 4.0 overhaul), but it would be great if someone could confirm.
See merge request !40
Create custom BriarRecyclerView and use it for the contact list.
It is a common pattern to have a list with an empty view and a progress bar.
This commit introduces a custom BriarRecyclerView and uses it for the
contact list.
No more manually hiding and showing empty views and progress bars is
necessary when using the new BriarRecyclerView instead of RecyclerView.
Please note that this conflicts with !44 at the moment and needs to be
implemented for !36 once merged.
Closes#198
See merge request !45
Overhauled Conversation View with Message Bubbles
The Conversation View now uses a RecyclerView with conversation bubbles
in alternating colors and vector drawables to indicate message state.
The conversation bubbles have been taken from Telegram
and can be replaced by a UX designer later.
There's also a special bubble for unread messages,
so they are not overlooked when they come in delayed.
This commit also addresses #9, because message text can
now be selected and copied. This is done by using
android:textIsSelectable="true"
which only works for API level 11 or higher.
If we want copy and paste on lower API levels,
additional measures have to be implemented.
See merge request !36
It is a common pattern to have a list with an empty view and a progress bar.
This commit introduces a custom BriarRecyclerView and uses it for the
contact list.
No more manually hiding and showing empty views and progress bars is
necessary when using the new BriarRecyclerView instead of RecyclerView.
Please note that this conflicts with !44 at the moment and needs to be
implemented for !36 once merged.
Closes#198
Add a floating action button (FAB) in the contact list
The button hides itself when you scroll down the list of contacts
and shows again when you scroll up.
To properly color the button, the accent color has been defined.
It uses the same color as the action bar (primary color).
I leave it to a UX designer to adapt the color scheme.
Please note that the design support library was used.
It includes the app-compat library, so this has been removed
from the `build.gradle` file.
Closes#199
See merge request !44
The button hides itself when you scroll down the list of contacts
and shows again when you scroll up.
To properly color the button, the accent color has been defined.
It uses the same color as the action bar (primary color).
I leave it to a UX designer to adapt the color scheme.
Please note that the design support library was used.
It includes the app-compat library, so this has been removed
from the `build.gradle` file.
Closes#199
Show home screen if user backs out of password activity
This borrows a technique from @grote's crash reporter patch to fix#7. If the user presses the back button in PasswordActivity, the home screen is shown. Previously, pressing the back button removed PasswordActivity from the back stack, causing the next activity in the back stack to spawn another PasswordActivity.
See merge request !41
Use XSalsa20-Poly1305 instead of AES-GCM for transport encryption and password storage.
This patch integrates @str4d's new authenticated cipher implementation. It depends on !18.
See merge request !35
properly notify the view adapter of dataset changes
in order to avoid invalidating the entire dataset when not absolutely necessary.
This change also shows unread messages in a different color,
so users do not fail to notice delayed messages.
It now uses conversation bubbles in alternating colors
and vector drawables to indicate message state.
The conversation bubbles have been taken from Telegram
and can be replaced by a UX designer later.
This commit also addresses #9, because message text can
now be selected and copied. This is done by using
android:textIsSelectable="true"
which only works for API level 11 or higher.
If we want copy and paste on lower API levels,
additional measures have to be implemented.