Commit Graph

174 Commits

Author SHA1 Message Date
Santiago Torres
190bb12964 ENH: Replaces transport config with namespaced settings 2016-01-20 00:57:16 -05:00
Torsten Grote
8b817be076 Offer option to uninstall Briar in a panic event
Due to the nature of how Android app install/uninstall works without
root, this requires manual confirmation after a panic was triggered.

Closes #211
2016-01-18 14:31:10 -02:00
akwizgran
42d1f6ded0 Use verbs instead of yes/no for lost password dialog. 2016-01-13 17:17:45 +00:00
akwizgran
0d2e12e7ff Merge branch '210-support-panic-kit-purge' into 'master'
Support for Destructive Panic Actions

This MR is based on and requires !52.

More details are available in the commit message.

All known issues have now been fixed by new upstream releases.

See merge request !54
2016-01-13 15:37:38 +00:00
akwizgran
d8c65d0029 Capitalise panic button header, tweak wording. 2016-01-13 15:32:11 +00:00
Torsten Grote
63d87ae085 Support for Destructive Panic Actions
PanicKit does distinguish between two kinds of panic responses:

* default responses such as logging out which are non-destructive and
  do not require user interaction, so that the basics work without
  configuration
* destructive responses such as deleting user data. These require
  some sort of authentication to make sure they are not triggered
  by malicious apps

The second type of responses is implemented with this commit.

Authentication is done by comparing the package name
which is very weak. It requires the user to opt-in to
destructive responses and to configure from which app
to receive those (since there might be many different panic
trigger apps).

While possible to uninstall an app and install one with the same
package name afterwards, this always triggers notifications to
the user (if the attacker does not have root access).

Still that is no sufficient security for Briar's requirements,
so that TrustedIntents are used as well to make sure that the
app sending the destructive trigger is signed by a signing key
that we specified before. Currently, that is the one from the
GuardianProject and from IilabEngineering who does the Amnesty
International Panic App.

The responsibility of checking that the panic TRIGGER is
legitimate lies with the app responding to the trigger, so Briar
in this case. This commit checks whether the TRIGGER comes from
a trusted app before performing destructive actions,
but does perform the default action even when triggered from
untrusted apps.

Closes #210
2016-01-12 11:05:14 -02:00
Torsten Grote
e603b4f60e Implemented Sign Out as a first PanicKit Response
This closes #204
2016-01-12 10:49:14 -02:00
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
7e48267f92 Consistent styling for setup and password activities.
Also removed some unused code from BaseActivity.
2016-01-08 13:22:33 +00: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
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
805bf39ec8 Created TransportPropertyManager facade. 2016-01-04 12:56:06 +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
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
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
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
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
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
4bcd204687 Use a RecyclerView for the Contact List 2015-12-28 14:37:23 -02:00
Torsten Grote
1dd7a35685 Small Improvements for Crash Handling Activities 2015-12-21 17:11:46 -02:00
akwizgran
c9e2bf7efb Put labels below transport icons. #191 2015-12-18 11:58:26 +00:00
akwizgran
52720c5c04 Pass-through implementations of UI/DB interfaces. 2015-12-17 16:56:57 +00:00
akwizgran
545a2c04bb Merge branch 'explain-tor-setting' into 'master'
Longer explanatory text for Tor mobile data setting



See merge request !29
2015-12-17 16:56:27 +00:00
akwizgran
3e3109254f Merge branch 'conversation-layout-tweaks' into 'master'
Layout tweaks for ConversationActivity.

Centre the progress wheel and empty list message, hide the empty list message until the list has loaded.

See merge request !26
2015-12-17 16:35:36 +00:00
akwizgran
6dd64ed02e Merge branch '179-bluetooth-diagram-too-large' into 'master'
Replace bluetooth diagram PNG image with vector XML file.

I decided to not use several raster graphics, but use an XML file instead, so the android gradle plugin creates the raster files itself at build-time. I hope that this resolves the problem you saw on that device of yours.

See merge request !30
2015-12-17 14:49:07 +00:00
Torsten Grote
d99b643a58 Replace bluetooth diagram PNG image with vector XML file.
Closes #179
2015-12-17 11:58:41 -02:00
Torsten Grote
264285ecf7 Show all transports on the dashboard
and indicate which transports are currently available.
The icons have been chosen from the official material icons and might be
replaced later with icons that better represent the given transport.

Please note that I used vector drawables which will be automatically
converted at build time to raster graphics.

Closes #96
2015-12-17 11:34:10 -02:00
Torsten Grote
2d28dcada2 Create two new events to signal enabling and disabling of transports 2015-12-17 11:34:10 -02:00
akwizgran
2c52a95ad5 Explanatory text for Tor mobile data setting. 2015-12-17 12:39:23 +00:00
akwizgran
01ecfb435a Updated Roboguice modules list. 2015-12-16 12:13:43 +00:00
akwizgran
8fa05e545f Merge branch '174-bsp-renaming' 2015-12-16 10:39:16 +00:00
akwizgran
d710841728 Merge branch '37_optionally_disable_tor' into 'master'
37 optionally disable tor

Provides:

* Checkbox in the settings view to disable Tor if not connected to a wifi network
* A network change callback in the Tor plugin to identify wifi connect/disconnect events
* A settings change event handler to disable enable tor when the user enables or disables the setting



See merge request !11
2015-12-15 17:12:39 +00:00
akwizgran
b6c9544373 Layout tweaks for ConversationActivity. 2015-12-15 17:08:23 +00:00
Santiago Torres
403ab75d13 [plugins/tor/TorPlugin] Adds tor-over-wifi setting
Provides a checkbox in the settings view, as well as an event handler to
disable/enable the tor network if the device is not on using the wifi
connection.

Refactors network-enabling code to a separate function. This function
is ran after the network state changes, or the settings change and
will update the status accordingly.
2015-12-15 10:17:29 -05:00
Torsten Grote
327073f514 Put conversation view layout in XML file
and fix message divider background for lower API levels.
2015-12-15 13:11:11 -02:00
Torsten Grote
2bd53f8363 Show connection status of contact in conversation view
Closes #97
2015-12-15 13:11:11 -02:00
akwizgran
e7e7bf35ea Use 'forum' instead of 'group'. #174 2015-12-15 13:23:52 +00:00
akwizgran
09774cb362 Don't stretch progress wheel on Android 2.3. 2015-12-15 11:56:00 +00:00
akwizgran
4dd9e25079 Merge branch '52-appcompat-action-bar' into 'master'
Added AppCompatActivity

Closes #52 

See merge request !14
2015-12-15 11:34:03 +00:00
Ernir Erlingsson
cdf8392725 code nitpicks and color fix 2015-12-14 22:22:49 +01:00
akwizgran
3f58af3b04 Merge branch '87-improve-adding-contacts' into 'master'
Improve Adding Contacts

These changes provide more detailed instructions for adding contacts.

Users were confused by the process of adding a contact for the first time.
This change adds additional explanation and a picture of what is going on.

Closes #87

This change also shows the current step and the total number of steps when adding a contact.

Closes #33

The UI was transferred into XML files and lots of redundant code was deleted such as the custom CodeEntryView.

Please note that I did not implement a countdown for Bluetooth discoverability (#71), because of the way how the state machine resets the entire content view of the activity. This should probably be refactored to use fragments which would make the code cleaner and a permanent progress bar easier to implement.

See merge request !15
2015-12-14 17:55:36 +00:00
akwizgran
f6cb3926fb More compact layout for first add contact screen. 2015-12-14 17:43:12 +00:00
Torsten Grote
527ac0c1e0 Show current step and total number of steps when adding a contact.
UI was transferred into XML files
and lots of redundant code was deleted such as the custom CodeEntryView.

Closes #33
2015-12-14 15:02:04 -02:00
akwizgran
0c0388437f Added paddingLeft/Right for older devices. 2015-12-14 15:49:08 +00:00
Ernir Erlingsson
6ac999c113 Added AppCompatBar and fixed dependencies 2015-12-14 14:03:55 +01:00
Torsten Grote
04be7c9b92 Providing more detailed instructions for adding contacts
Users were confused by the process of adding a contact for the first time.
This change adds additional explanation and a picture of what is going on.

It also moves part of the UI into XML files.

Closes #87
2015-12-14 09:29:55 -02:00