this PR removes options to create encrypted database.
existing encrypted databases will continue working for now.
the 'encrypted database' experiment started some years ago
was never finishes and already stopped working partly,
eg. importing backups as encrypted accounts stopped working
some years ago for newer android.
in the light of Signal's "encryption key flaw",
but also recent issues with worsending core things in Delta Chat,
it seems wise to concentrate on the core things ("you have one job!"),
and not on side topics comparable few persons are interested in.
also, it will become harder to maintain that path on upcoming api changes,
leaving the database open as opening is slow is needed but will become harder,
this will make notifications tricy,
may need additional effort to run in background etc.
all that is doable,
however, it will remove resources from far more important parts,
dangerously up to a level that breaks the app - a focus is limited.
also, no one really complained as it is already partly not-working,
it was _never_ working on desktop
(where it would make much more sense),
removal on iOS was flawless, see https://github.com/deltachat/deltachat-ios/pull/2011
tl;dr: better leave the protection up to the operating system
and concentrate on other things.
* Verified 1:1 chats, Android UI (#2560)
Depends on https://github.com/deltachat/deltachat-core-rust/pull/4315/.
Follow-up for https://github.com/deltachat/deltachat-android/pull/2541.
- Show a "verified" icon on protection changed update messages
- Add C API
- Show a dialog over the input bar not only for contact requests, but also when the protection is broken (using the new method `isHalfBlocked()`)
- The positive button reads "OK" (as opposed to contact requests where it reads "Accept")
- Add SVG icons, remove PNG one
- Translations
- When tapping on the `DC_INFO_PROTECTION_{EN|DIS}ABLED` message, show more information (for now, it leads to the online preview of my FAQ PR)
- Block loading remote images in the "Full Msg View" not only for contact requests, also when the protection is broken (using the new method `isHalfBlocked()`)
- Show a big verified/crossed-out-verified symbol over the `DC_INFO_PROTECTION_{EN|DIS}ABLED` messages
- Fix a bug that was kind of present before (for contact requests) but only became really visible now:
- Set a draft with an image (or other attachment)
- Your chat partner breaks verification
- Expected: Both the input bar and the draft image are hidden by the input-bar-dialog.
- Bug behavior (before c31de5bcf): The input bar is hidden, but the draft image stays visible.
* change button order of verification-broken alert (#2621)
Having "OK" in the middle of the buttons is weird. The old order was:
```
End-to-end encryption cannot...
[More Info] [OK] [Scan QR code]
```
1. _If_ the main purpose of the dialog would be to "Scan QR code",
the text should point that out more, also the opening button.
Then, the button position would be correct, however,
it has to read "Cancel" then.
2. _However_, the main purpose of the dialog is to "Show Info",
"Scan QR code" is only an optional offering and the button a shortcut only.
And finishing "Show Info" is better done by a simple "OK".
Then, the "OK" should be rightmost.
This PR implements the second option, the buttons read as follows afterwards:
```
End-to-end encryption cannot...
[More Info] [Scan QR code] [OK]
```
* fix: load updated display name when chat protection breaks
* Implement feature flag for verified 1:1 chats
* Update res/values/strings.xml
Co-authored-by: Hocuri <hocuri@gmx.de>
* Update src/org/thoughtcrime/securesms/connect/DcHelper.java
* Make another AlertDialog
* Revert "Implement feature flag for verified 1:1 chats"
This reverts commit 2efd17edfc.
* Fix typo
* email server->email provider
---------
Co-authored-by: bjoern <r10s@b44t.com>
Co-authored-by: adbenitez <asieldbenitez@gmail.com>
* Set WebView proxy to 0.0.0.0 when possible
* add DcHttpResponse to wrapper
* use new DcHttpResponse to show images in email-html-view
* null-encoding is fine for WebResourceResponse()
---------
Co-authored-by: B. Petersen <r10s@b44t.com>
* add DcBackupProvider add receiveBackup() wrappers
* add 'Add Another Device' item to settings
* add android-ifaddrs
core-rust uses getifaddrs() which is not available on android ndk.
pull in the code from https://github.com/morristech/android-ifaddrs
that provides an implementation.
* add BackupProviderActivity
* make SVG-hack reusable
* add BackupProviderFragment
* prepare scanning backup codes
* Revert "add android-ifaddrs"
This reverts commit 33b1424427620396f282805d37f8e05c67758546.
* more logging
* call receiveBackup() on scanning DC_QR_BACKUP
* Fixup for recvmmsg fallback
* protect BackupProviderActivity by system secret
* show transfer progress as provided form the core; hide qr-code once scanned
* add a permanent notification for the provider
* clarify what we are waiting for
* add a permanent notification for the receiver
* ask before finishing BackupProviderActivity
* it is fine to cancel the abort question by tapping outside the alert
* remove outdated comment from 'keep screen on'
* add and check TRANSFER_MODE
* rename BackupProviderActivity to BackupTransferActivity
* use our base activity
* start/stop IO in base activity
* use BackupTransferActivity also for scanning
* add BackupReceiverFragment
* show detailed transfer progress
* show details instead of percent during preparation, for now
* launch chatlist and remove welcome when transfer is done
* redirect to chatlist automatically after transfer succeeded
* reword
* make log accessible from send and receive activities
* bump version
* show error if backup provider creation fails
* remove unneeded format()
* show some context in the errors alerts, hide QR code sooner
* calculate transfer percentage as specified
* show a 'close' instead of a 'back' button to make visually clear, things are aborted (there is a quesion anyway)
* add option to copy backup-qr-code to clipboard
* remove vague retry statement, core will show a detailed error soon
* warn about QR codes on clipboard getting invalidated
* make basic strings translatable
* add troubleshooting menu item (once help is evolved, it may be a more visible button, may be localized, may be offline)
* rename to backup_transfer_fragment.xml
* add detailed instructions
* move 1,2,3 layout to the .xml
* fix layout
* use text size used elsewhere
* do best effort to show SSID on sending device
* make SSID code reusable for receiver
* adapt to otherwise used font style
* show ssid also for receiver
* minor refactorings
* make qr code subtitle translatable
* tune down 'same network hint' on scanning device
* add progress bar to provider
* add progress bar to receiver
* bump version
* use 'Add Second Device' wording
this seems slightly catchier as "Add Another Device"
and has less "A" esp. in "Add as Another Device" :)
also at least translation to german seems nicer ("Zweitgerät"),
most ppl will use max. two devices, but even if more,
that should still be fine.
this was also the first intuition also by other devs in their mockups,
so we'll give it a try.
* use "Exporting/Preparing/Prepared Account" wording
let's give that a try - "Account" is also widely used,
so that seems to make some sense.
even if not 100% fitting,
it seems better than introducing the new term "Collection".
* refine abort question
* Update res/layout/backup_provider_fragment.xml
Co-authored-by: Hocuri <hocuri@gmx.de>
* Update src/org/thoughtcrime/securesms/qr/BackupProviderFragment.java
Co-authored-by: Hocuri <hocuri@gmx.de>
* Update src/org/thoughtcrime/securesms/qr/BackupReceiverFragment.java
Co-authored-by: Hocuri <hocuri@gmx.de>
* Update src/org/thoughtcrime/securesms/qr/BackupTransferActivity.java
Co-authored-by: Hocuri <hocuri@gmx.de>
* Update src/org/thoughtcrime/securesms/qr/BackupReceiverFragment.java
Co-authored-by: Hocuri <hocuri@gmx.de>
* remove string duplicate
* refine 1,2,3
* simplify string ids
* focus on what matters
---------
Co-authored-by: link2xt <link2xt@testrun.org>
Co-authored-by: Hocuri <hocuri@gmx.de>
* add app icon to webxdc info messages
* Update res/layout/conversation_item_update.xml
Co-authored-by: Hocuri <hocuri@gmx.de>
* check if info message type is DcMsg.DC_INFO_WEBXDC_INFO_MESSAGE before loading parent message
---------
Co-authored-by: Hocuri <hocuri@gmx.de>
- Before Android 6 (API 23), there was no KeyStore yet. Currently, you can still create an encrypted account, but the passphrase is stored in clear-text, because that's how Signal is doing things.
- There is no option to manually set the keyphrase or to unlock via fingerprint. This has the advantage that we never need user input for unlocking the accounts and can simply unlock all accounts on startup and the obvious disadvantage that anyone with access to the unlocked device can open DC.
- Each account is encrypted with a different passphrase.
- When importing, you can choose to encrypt the account.
* add new w30 APIs
* create the webview,
disable internet access,
inject deltachat.js
* connect deltachat to the webview
* promisify api
* use msgActionButton to start the w30 apps
* cleanup
- create observers in onCreate() to avoid memory leak,
- derive from WebViewActivity to easier deal with particularities
and to saves >100 loc
- reorder some methods to reflect lifetimes
* make it more clear, which uri-part is 'domain' and which one is 'path'
* unify logging
* it is 'statusUpdate' not 'stateUpdate'; not sure if promise is needed at the end, we can readd that as needed, simple code for now
* use core implementation for status updates
* disable debugging enabled by default, streamline code
* use same name for InternalJSApi for both, js and java
* getStatusUpdates() always return an array
* call JSON.stringify() on payload
* fix typo, fix equal operator
* use shorter function names in js land
* adapt to new zipped w30 format
* load any file from w30 archives
* add fallback if getMimeTypeFromExtension() fails
* rename w30 to webxdc
* add selfName()
* return selfAddr() if selfName() is empty
* rename deltachat.js to webxdc.js
* observer correct event
* rename getBlobFromArchive() to getWebxdcBlob()
* show webxdc app name in title bar
* swap payload and descr in sendUpdate() (adapt to new core api)
* allow user-defined-texts for webxdc apps, make room for icon+name
* show webxdc icon and name in chats
* render webxdc drafts accordingly
* allow configuring drafts
* do not destroy webxdc-message to be sent out by removing it via setDraft(null)
* fix crash when replying to webxdc messages
* add webxdc messages to profile's document tab
* hide 'search menu' for webxdc apps
* show app summary beside app icon
* remove outdated comment
* add precautious WebView restrictions
* Update src/org/thoughtcrime/securesms/ConversationItem.java
Co-authored-by: Asiel Díaz Benítez <adbenitez@nauta.cu>
* Update src/org/thoughtcrime/securesms/ConversationItem.java
Co-authored-by: Asiel Díaz Benítez <adbenitez@nauta.cu>
* Update src/org/thoughtcrime/securesms/ConversationActivity.java
Co-authored-by: Hocuri <hocuri@gmx.de>
* Webxdc requires at least Android 5 Lollipop
see https://github.com/deltachat/deltachat-android/pull/2174#discussion_r785436874
* recognize .xdc files on android10
based on @Hocuri's findings in #2188
Co-authored-by: Simon Laux <mobile.info@simonlaux.de>
Co-authored-by: adbenitez <asieldbenitez@gmail.com>
Co-authored-by: Asiel Díaz Benítez <adbenitez@nauta.cu>
Co-authored-by: Hocuri <hocuri@gmx.de>
* use the new SVG QR images generated in core
* hack y-offset of fallback-avatar-letter
the dominant-baseline=central and baseline=middle attributes are not working,
see https://github.com/deltachat/deltachat-core-rust/pull/2815#issuecomment-978067378
and source code comment for some more details.
Co-authored-by: B. Petersen <r10s@b44t.com>
* add broadcasts ffi
* add 'broadcast' options to menu, chat, profile etc.
* generate initial broadcast names
* reword broadcast hint
* make 'Broadcasts Lists' experimental; while on that, also add a confirmation dialog to the location streaming switch (wording taken from ios)
* Update res/values/strings.xml
Co-authored-by: Hocuri <hocuri@gmx.de>
* comment on strings.xml
* tweak 'experimental' appearing, avoid the 'test tube'-emoji that is not supported on many devices
Co-authored-by: Hocuri <hocuri@gmx.de>
* add download-ffi methods
* add 'Download' button for incomplete messages
* show 'downloading' animation
* make download_limit configurable
* set button to 'disabled' and text to 'Downloading...' on downloading; color does not really reflect that yet, but that can probably be tweaked by xml
* make 'download message body' translatable
See deltachat/deltachat-core-rust#2514
Fixes#1963Fixes#1890
Before deleting a chat the user is asked for confirmation. Before blocking not, because blocking is not "destructive" (i.e. can be completely reverted by unblocking the contact). I'm wondering whether we should show a snackbar with an Undo button though, but we can probably wait for user feedback on this.
* Start removing deaddrop chat
* Generally works
* Fix the buttons
(it's not easy to not show one of the buttons in
ConstraintLayout; if problems turn up, we should probably
just not use ConstraintLayout)
* fix more things
* restartLoader() instead of notifyDataSetChanged() because the latter didn't do anything
* Archived badge
* Rename "Contact request" to "Request"
* oops
* Remove setStockTranslation(8, context.getString(R.string.chat_contact_request));
* Remove commented-out code, we probably won't need it
* Don't show "Delete" button for 1:1 chats
* Get rid of short flickering when declining a request
* Set the app's night mode to match the preference
This added 6ms to startup time, but I think that's OK, as
we will also be able to use more `-night` views in the future
* Make "Accept" text a bit brighter and easier to read in dark mode
* Check if the chattype is Group instead of members.length == 1
The non-squashed original commits are available at 243bd3a56:
* First, quick and dirty version
* Basic HTML connectivity view
* Codestyle, automatically refresh
* Make it accessible from the settings
* Improve usability
I did some user-testing with my family, these are the results:
- Added an emoji to the html page (red dot for not connected, and so on)
- Adapted error messages for SMTP:
"Not started" -> "(You did not try to send a message recently)"
"🟢 Connected" -> "🟢 Your last message was sent successfully"
- "Not connected" is misleading, because they think that this means that there is no internet connection.
But "Not connected" can have other causes, like, a not responding server or a changed-but-not-updated-in-DC password
Possible solutions:
- "Not connected" -> "Not connected with gmx.de" (or whatever comes after the '@' in configured_addr). The problem: some people have an own domain for their emails, but no own servers. "Not connected with <your domain>" and might make them think that the problem is that DC tries to connect to the server <your domain>, while the server is hosted at Strato.com.
- We can ask the system whether there currently is network and then show another error message. The problem: Sometimes the system is wrong.
* Remove error_network
* Remove server_response string
* Move `getConnectivitySummary()` to `DcHelper`
* Implement the changes we agreed on
* Remove string error_no_network
* small fixes