Commit Graph

1785 Commits

Author SHA1 Message Date
akwizgran
25c9cff8d6 Merge branch '112-transport-properties-manager' into 'master'
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
2016-01-12 11:35:18 +00:00
akwizgran
1bcfbc9088 Merge branch 'btp-final-crypto-changes' into 'master'
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
2016-01-12 11:17:15 +00:00
akwizgran
3c6ead0603 Code clarity, more unit tests for ByteUtils.
Addresses comments for !48.
2016-01-12 11:10:22 +00:00
Ernir Erlingsson
68b333491a Merge branch '208-remove-private-message-activities' into 'master'
Remove Read/WritePrivateMessageActivity. #208

Removed obsolete activities and cleaned up some code.

See merge request !55
2016-01-11 22:18:33 +00:00
akwizgran
7e48267f92 Consistent styling for setup and password activities.
Also removed some unused code from BaseActivity.
2016-01-08 13:22:33 +00:00
akwizgran
90214c7f93 Removed Read/WritePrivateMessageActivity. #208 2016-01-08 13:21:42 +00:00
akwizgran
2a83cdba04 Merge branch 'password-activity-improvements' into 'master'
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
2016-01-08 10:07:03 +00:00
Torsten Grote
0a11c0632f introduce a hideSoftKeyboard() method and use it 2016-01-07 19:31:06 -02:00
Torsten Grote
4460d69a06 Improve PasswordActivity by
* 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'
2016-01-07 14:15:57 -02:00
akwizgran
6e26391e03 Bumped expiry date to 1 Feb 2016. 2016-01-06 12:40:11 +00:00
akwizgran
b7860ba46c Merge branch 'use-briarrecyclerview-in-conversation-view' into 'master'
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
2016-01-04 14:17:10 +00:00
akwizgran
033c937640 Merge branch '200-duplicate-entries-in-contactlist' into 'master'
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
2016-01-04 14:11:59 +00:00
akwizgran
805bf39ec8 Created TransportPropertyManager facade. 2016-01-04 12:56:06 +00:00
akwizgran
7c869a6ebd Cleaned up some javadocs. 2016-01-04 12:56:06 +00:00
akwizgran
99f8d21eea Fixed a typo. 2016-01-04 12:47:49 +00:00
akwizgran
6a4aea77fb Final crypto changes for BTPv2. #111
Use BLAKE2s to generate tags.
KDF arguments for key rotation.
Frame IV format.
2016-01-04 12:42:30 +00:00
akwizgran
19bfe71f18 Merge branch 'use-blake2s' into 'master'
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
2016-01-01 14:30:44 +00:00
akwizgran
7e115fed6d Allow output shorter than getDigestSize(). 2016-01-01 14:28:38 +00:00
akwizgran
7c1ee9ce87 Restored accidentally deleted javadoc. 2015-12-31 17:46:18 +00:00
akwizgran
90af176810 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.
2015-12-31 17:42:11 +00:00
Torsten Grote
027b3cd33a Fix contacts duplicating itself when pressing back button in conversation view
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
2015-12-31 14:17:14 -02:00
akwizgran
6d2ef508d3 Merge branch '189-blake2s' into 'master'
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
2015-12-31 16:06:53 +00:00
akwizgran
affba07baa Added BLAKE2s test to Ant build file. 2015-12-31 16:04:58 +00:00
str4d
d5b347e6c9 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).
2015-12-31 16:01:33 +00:00
Torsten Grote
a4437a729a 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.
2015-12-31 13:14:33 -02:00
akwizgran
2dee821f3c Updated Ant build file for automated tests. 2015-12-31 12:05:12 +00:00
akwizgran
01dc4fb996 Merge branch '176-setupactivity-warnings-api10' into 'master'
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
2015-12-31 12:03:44 +00:00
akwizgran
50b941e50e Show strength meter when password entry has focus.
Also fixed some IME action issues on Android 2.3.
2015-12-31 12:00:42 +00:00
str4d
9b1dacfe97 Use TextInputLayout from the Design Support Library to display errors 2015-12-31 11:36:59 +00:00
str4d
981903aa57 Migrate SetupActivity to XML 2015-12-31 11:36:27 +00:00
str4d
64e63fa0c2 Enable StrengthMeter to be defined in XML 2015-12-31 11:36:26 +00:00
akwizgran
b1f2f7d120 Merge branch '198-briar-recycler-view' into 'master'
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
2015-12-31 11:32:58 +00:00
akwizgran
d0092ee5aa Merge branch '9-conversation-view' into 'master'
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
2015-12-31 11:20:29 +00:00
Torsten Grote
970560c21e address issues with new BriarRecyclerView found in review 2015-12-30 13:22:23 -02:00
Torsten Grote
f309cb36d4 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
2015-12-30 11:50:15 -02:00
akwizgran
e17765e80f Merge branch '199-use-fab-for-adding-new-contact' into 'master'
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
2015-12-30 13:36:38 +00:00
Torsten Grote
a51726f147 This introduces 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
2015-12-30 10:58:05 -02:00
str4d
b46f779003 Merge branch '197-improve-readability-transport-status-bar' into 'master'
Do not show green text for enabled transports, use only green icons.

This addresses part of #197 and is a fairly small change.

See merge request !43
2015-12-29 12:34:01 +00:00
Torsten Grote
7f29aede97 Do not show green text for enabled transports, use only green icons.
This addresses part of #197
2015-12-29 10:23:17 -02:00
Torsten Grote
880333f094 address issues found so far in code review 2015-12-28 17:04:03 -02:00
akwizgran
590d1e8ded Merge branch '7-password-activity' into 'master'
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
2015-12-28 18:09:00 +00:00
akwizgran
d7f204019d Merge branch 'use-xsalsa20-poly1305' into 'master'
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
2015-12-28 18:07:20 +00:00
Torsten Grote
e98d4f2260 Use a RecyclerView for the ConversationView and
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.
2015-12-28 14:49:03 -02:00
Torsten Grote
68cd1ff28c New Conversation View in XML
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.
2015-12-28 14:49:03 -02:00
Torsten Grote
83a2552a7c Merge branch 'contact-list-activity' into 'master'
Use a RecyclerView for the Contact List

This is the first RecyclerView in the project. I am using a SortedList to keep the contacts sorted by latest activity.

Also, I removed the icon footer and moved the icon into ActionBar. I did the same with the long-press contact deletion action which eventually will move to the new contact details activity.

Several icons have been replaced by vector drawables and all the views are now defined in XML.

See merge request !38
2015-12-28 16:40:36 +00:00
Torsten Grote
6a954021ae Sort contacts by latest activity.
When you receive a message from a contact,
it will be moved to the top of the list with a nice animation.
Also with this commit, not the entire data set is invalidated each time data changes,
but only the parts of the data that really require an update.

Furthermore, the ContactListItemComparator that is not needed anymore is
removed.
2015-12-28 14:37:23 -02:00
Torsten Grote
4bcd204687 Use a RecyclerView for the Contact List 2015-12-28 14:37:23 -02:00
akwizgran
d46ad6cc14 Merge branch '189-dbexecutor' into 'master'
Inject dbExecutor as ExecutorService

Closes #188, despite the branch name. :0)

See merge request !33
2015-12-28 16:33:59 +00:00
akwizgran
bbf1770d8d Show home screen if user backs out of password activity. 2015-12-28 11:42:37 +00:00
akwizgran
435efc3b8c Merge branch '7-crash-handling' into 'master'
Small Improvements for Crash Handling Activities

This relates to #7 and closes #193

See merge request !37
2015-12-28 11:22:25 +00:00