Commit graph

314 commits

Author SHA1 Message Date
Andreas Straub efcefc2e63 Refactor out inner classes, cache trust store
Moves SQLiteAxolotlStore and XmppAxolotlSession into proper classes.

IdentityKeys trust statuses are now cached in an LruCache to prevent
hammering the database when rendering the UI.
2015-07-29 02:59:26 +02:00
Daniel Gultsch e5fae429fa call refreshUi directly 2015-07-24 14:43:13 +02:00
Daniel Gultsch cd204d5931 show warning when trying to highlight users that have left the conference 2015-07-22 15:57:17 +02:00
Daniel Gultsch a1e63944a2 use 'interactive mode' when starting downloads from the context menu 2015-07-22 12:15:09 +02:00
Andreas Straub c2813cea29 Hide regenerate keys button
Can re-enable it via Config.java setting
2015-07-22 01:00:20 +02:00
Andreas Straub 4c1c2892c7 Disable trust toggle completely for INACTIVE keys 2015-07-22 00:53:54 +02:00
Andreas Straub 92b5081b5e Add INACTIVE state for removed keys
We introduce a new trust state: INACTIVE. This state is intended for
old keys that have been removed.

When a TRUSTED device is removed from the PEP devicelist, it's status
will be set to INACTIVE. INACTIVE keys are shown in the UI as greyed
out, non-interactible key rows. Messages are not encrypted for INACTIVE
devices.

When an INACTIVE device reappears in PEP, or a message is received from
an INACTIVE device, it is set back to trusted.
2015-07-21 14:24:59 +02:00
Daniel Gultsch 1aeb5874b0 allow for private messages being started from muc details in anonymous mucs 2015-07-21 13:15:59 +02:00
Andreas Straub 8be0e8a27d Start TrustKeysActivity if no keys are TRUSTED
If there are no UNDECIDED keys, but none of the contact's keys are
trusted, redirect the user to the TrustKeysActivity
2015-07-20 22:35:07 +02:00
Andreas Straub 4ee3f330f5 Do not display clear devices button if not online 2015-07-20 22:19:04 +02:00
Andreas Straub ab2d114bbc Add purge axolotl key option
Can now long-press a key to permanently purge it.
2015-07-20 22:18:24 +02:00
Raphael Pohl e6cb12dfe4 changed message bubble appearance 2015-07-20 16:02:17 +02:00
Daniel Gultsch 504ef0b72e rely on refreshUi/refreshUiReal and make sure it is being used everywhere 2015-07-20 15:48:58 +02:00
Andreas Straub aaa8fe8978 Merge branch 'CryptoNextBeta' into development
* CryptoNextBeta: (60 commits)
  Lock TrustKeys if no trusted keys are available
  Optimize imports
  Use MD style for key trust toggle switch
  Fix set/remove OnUpdateBlocklistListener
  Fix axolotl database migration
  Remove device list from EditAccount
  Add clear devices to overflow menu in EditAccount
  Ask for key trust when sending messages
  Encrypt files for HTTP upload in encrypted chats
  Refactor trust key ui and show in account details
  Send correct body for HTTP files
  Handle file transmission properly in axolotl
  Remove unneccessary code
  Fix trust status for outgoing messages
  Don't merge messages with different trust statuses
  Fix copying of axolotl keys to clipboard
  Add refresh icon to v21 theme
  Disable Axolotl option if not usable
  Show trust status of messages' originating session
  Add key trust toggle to ContactDetailsActivity
  ...
2015-07-20 15:13:14 +02:00
Andreas Straub 19a0ae42d6 Lock TrustKeys if no trusted keys are available 2015-07-20 14:56:41 +02:00
Andreas Straub 012f036840 Optimize imports 2015-07-20 14:26:29 +02:00
Daniel Gultsch 9c91b9036a don't show 'show contact details' context menu item when contact isn not in roster 2015-07-20 14:24:59 +02:00
Andreas Straub 2240066bbe Remove device list from EditAccount 2015-07-19 23:38:09 +02:00
Andreas Straub 480b1cde81 Add clear devices to overflow menu in EditAccount 2015-07-19 23:35:03 +02:00
Andreas Straub 14010bf5a6 Ask for key trust when sending messages
If the contact (or the own account) has keys that have UNDECIDED trust,
we now drop the user into the new TrustKeysActivity, where they have to
decide for each new key whether it should be TRUSTED or UNTRUSTED.
2015-07-19 22:27:26 +02:00
Andreas Straub 6f67469bda Refactor trust key ui and show in account details
Refactored the trust key row UI element so it can be used in multiple
places. It now also uses a slider to toggle the trust state, and the
redundant trust state description was removed.

EditAccountActivity now shows the keys of other devices associated with
that account.
2015-07-19 22:24:03 +02:00
Andreas Straub 4038af2f47 Fix trust status for outgoing messages
Tag sent messages with own fingerprint, set own fingerprint as always
trusted, include own fingerprint in database trust search, explicitly
reset trust colorfilter
2015-07-19 22:23:28 +02:00
Sam Whited fca0c36757 Fix copying of axolotl keys to clipboard 2015-07-19 22:23:28 +02:00
Sam Whited 3ab59c93a6 Add refresh icon to v21 theme 2015-07-19 22:23:27 +02:00
Andreas Straub 6c38e53128 Disable Axolotl option if not usable
In MUCs or if contact is not axolotl capable, disable axolotl menu
option
2015-07-19 22:23:27 +02:00
Andreas Straub 9e8d9a6401 Show trust status of messages' originating session
Shade lock icon red if message was received in a session that has not
been marked trusted by the user or fingerprint is unknown
2015-07-19 22:23:27 +02:00
Andreas Straub 3d33946088 Add key trust toggle to ContactDetailsActivity
Can now toggle IdentityKey trust
2015-07-19 22:23:27 +02:00
Andreas Straub 23a4e1e6fa Display trust status in ContactDetailsActivity 2015-07-19 22:23:25 +02:00
Andreas Straub 2628662a7f Display axolotl chat message hint 2015-07-19 22:17:57 +02:00
Andreas Straub 7049904c32 Add basic PEP managemend UI to EditAccountActivity
EditAccountActivity now show own fingerprint, and gives an option to
regenerate local keying material (and wipe all sessions associated with
the old keys in the process).

It also now displays a list of other own devices, and gives an option to
remove all but the current device.
2015-07-19 22:17:55 +02:00
Christian S 37b214a8a8 show contact details in conference details ... 2015-07-19 22:11:51 +02:00
Andreas Straub 8fd46d40d6 Adapt prettifyFingerprint() to axolotl FP sizes 2015-07-19 21:32:27 +02:00
Andreas Straub 491f623708 Fix displaying Contact IdentityKeys
Migrate ContactDetailsActivity to use new SQL IdentityKeys storage,
remove dead code from Contact class.
2015-07-19 21:32:27 +02:00
Andreas Straub 299bbdf27f Reformat code to use tabs
This really sucks to do it like this. Sorry. :(
2015-07-19 21:32:26 +02:00
Andreas Straub 065519d3f3 Added axolotl activation code to UI 2015-07-19 21:32:26 +02:00
Daniel Gultsch f58b2afcaa changed switch widget 2015-07-18 19:38:52 +02:00
Daniel Gultsch aa1b9de20c code cleanup 2015-07-17 23:58:53 +02:00
Daniel Gultsch 13cce172ab show error message in account details when info has not been edited 2015-07-17 13:14:24 +02:00
Daniel Gultsch 425f0479a8 even less jumpy 2015-07-16 14:06:54 +02:00
Daniel Gultsch 6a329c7465 fixed some ux glitches in editaccount 2015-07-16 13:42:52 +02:00
Daniel Gultsch b477b8f57b fixed some npes 2015-07-16 13:14:51 +02:00
Daniel Gultsch b525b42e59 fixed crash on invalid muc bookmarks 2015-07-15 17:42:08 +02:00
Daniel Gultsch ffffca10f0 renamed colors 2015-07-13 12:55:13 +02:00
Daniel Gultsch 84bfe8c721 catch exception on broken android phones 2015-07-12 20:17:12 +02:00
Daniel Gultsch 558d065d48 made lock button reflect encryption status of the next messages instead of the last 2015-07-12 17:59:22 +02:00
Daniel Gultsch 78aff1329f renamed HttpConnection to HttpDownloadConnection 2015-07-10 15:14:13 +02:00
Daniel Gultsch ce79f4bbe3 renamed downloadable to transferable 2015-07-10 15:11:03 +02:00
Daniel Gultsch 0f5c87ca1f display toast in ui on failed http download
fixes #954
2015-07-10 13:28:50 +02:00
Daniel Gultsch b02ef0c62f show timestamp on images in mucs
fixes #1178
2015-07-10 12:42:41 +02:00
Daniel Gultsch c745fbb562 fixed share with activity to account for http file upload 2015-07-02 23:51:59 +02:00