From 3768f5c0eecce1cb3e85fe81122f8cb1004b3916 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 31 Jan 2020 13:39:05 +0100 Subject: [PATCH] Added options to open links, show images and original messages without confirmation --- FAQ.md | 25 ++---- .../eu/faircode/email/AdapterMessage.java | 24 ++++-- .../email/FragmentOptionsPrivacy.java | 31 ++++++++ .../res/layout/fragment_options_privacy.xml | 77 ++++++++++++++++++- app/src/main/res/values/strings.xml | 4 + 5 files changed, 137 insertions(+), 24 deletions(-) diff --git a/FAQ.md b/FAQ.md index 6d51253753..86c66321d7 100644 --- a/FAQ.md +++ b/FAQ.md @@ -106,7 +106,6 @@ Related questions: Anything on this list is in random order and *might* be added in the near future. - ## Frequently requested features The design is based on many discussions and if you like you can discuss about it [in this forum](https://forum.xda-developers.com/android/apps-games/source-email-t3824168) too. @@ -114,22 +113,6 @@ The goal of the design is to be minimalistic (no unnecessary menus, buttons, etc All displayed things should be useful in one or another way and should be carefully positioned for easy usage. Fonts, sizes, colors, etc should be material design whenever possible. -Since FairEmail is privacy oriented, the following will not be added: - -* Opening links without confirmation (if you want to reset the default *Open with* apps, please [see here](https://support.google.com/android/answer/9415055)) -* Showing images and original messages without confirmation, see also [this FAQ](#user-content-faq35) -* Direct file/folder access: for security/privacy reasons (other) apps should use the [Storage Access Framework](https://developer.android.com/guide/topics/providers/document-provider), see also [this FAQ](#user-content-faq49) - -Confirmation is just one tap, which is just a small price for better privacy. -You can show images and original messages by default for trusted senders on a case-by-case basis by checking *Do not ask this again for ...*. -Note that your contacts could unknowingly send malicious messages if they got infected with malware. - -Stripped and reformatted messages are often better readable than original messages because the margins are removed, and font colors and sizes are standardized. - -FairEmail does not allow other apps access to your messages and attachments without your approval. - -FairEmail follows all the best practices for an email client as described in [this EFF article](https://www.eff.org/deeplinks/2019/01/stop-tracking-my-emails). - ## Frequently Asked Questions * [(1) Which permissions are needed and why?](#user-content-faq1) @@ -1116,10 +1099,16 @@ Note that your contacts could unknowingly send malicious messages if they got in FairEmail formats messages again causing messages to look different from the original, but also uncovering phishing links. +Note that reformatted messages are often better readable than original messages because the margins are removed, and font colors and sizes are standardized. + The Gmail app shows images by default by downloading the images through a Google proxy server. Since the images are downloaded from the source server [in real-time](https://blog.filippo.io/how-the-new-gmail-image-proxy-works-and-what-this-means-for-you/), this is even less secure because Google is involved too without providing much benefit. +You can show images and original messages by default for trusted senders on a case-by-case basis by checking *Do not ask this again for ...*. + +If you want to reset the default *Open with* apps, please [see here](https://support.google.com/android/answer/9415055)). +
@@ -2053,7 +2042,9 @@ See also [this FAQ](#user-content-faq92). For privacy and security reasons FairEmail does not have permissions to directly access files, instead the Storage Access Framework, available and recommended since Android 4.4 KitKat (released in 2013), is used to select files. + If an app is listed depends on if the app implements a [document provider](https://developer.android.com/guide/topics/providers/document-provider). +If the app is not listed, you might need to ask the developer of the app to add support for the Storage Access Framework. Android Q will make it harder and maybe even impossible to directly access files, see [here](https://developer.android.com/preview/privacy/scoped-storage) and [here](https://www.xda-developers.com/android-q-storage-access-framework-scoped-storage/) for more details. diff --git a/app/src/main/java/eu/faircode/email/AdapterMessage.java b/app/src/main/java/eu/faircode/email/AdapterMessage.java index 3ba90a0e05..a1cf3594d3 100644 --- a/app/src/main/java/eu/faircode/email/AdapterMessage.java +++ b/app/src/main/java/eu/faircode/email/AdapterMessage.java @@ -1484,6 +1484,14 @@ public class AdapterMessage extends RecyclerView.Adapter openPgpProvider = new ArrayList<>(); private final static String[] RESET_OPTIONS = new String[]{ + "confirm_links", "confirm_images", "confirm_html", "disable_tracking", "display_hidden", "default_encrypt_method", "openpgp_provider", "autocrypt", "autocrypt_mutual", "sign_default", "encrypt_default", "auto_decrypt", @@ -102,6 +106,9 @@ public class FragmentOptionsPrivacy extends FragmentBase implements SharedPrefer // Get controls + swConfirmLinks = view.findViewById(R.id.swConfirmLinks); + swConfirmImages = view.findViewById(R.id.swConfirmImages); + swConfirmHtml = view.findViewById(R.id.swConfirmHtml); swDisableTracking = view.findViewById(R.id.swDisableTracking); swDisplayHidden = view.findViewById(R.id.swDisplayHidden); spEncryptMethod = view.findViewById(R.id.spEncryptMethod); @@ -137,6 +144,27 @@ public class FragmentOptionsPrivacy extends FragmentBase implements SharedPrefer final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext()); + swConfirmLinks.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { + @Override + public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { + prefs.edit().putBoolean("confirm_links", checked).apply(); + } + }); + + swConfirmImages.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { + @Override + public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { + prefs.edit().putBoolean("confirm_images", checked).apply(); + } + }); + + swConfirmHtml.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { + @Override + public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { + prefs.edit().putBoolean("confirm_html", checked).apply(); + } + }); + swDisableTracking.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { @@ -353,6 +381,9 @@ public class FragmentOptionsPrivacy extends FragmentBase implements SharedPrefer private void setOptions() { SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext()); + swConfirmLinks.setChecked(prefs.getBoolean("confirm_links", true)); + swConfirmImages.setChecked(prefs.getBoolean("confirm_images", true)); + swConfirmHtml.setChecked(prefs.getBoolean("confirm_html", true)); swDisableTracking.setChecked(prefs.getBoolean("disable_tracking", true)); swDisplayHidden.setChecked(prefs.getBoolean("display_hidden", false)); diff --git a/app/src/main/res/layout/fragment_options_privacy.xml b/app/src/main/res/layout/fragment_options_privacy.xml index c94316bb19..7e95f2e9c3 100644 --- a/app/src/main/res/layout/fragment_options_privacy.xml +++ b/app/src/main/res/layout/fragment_options_privacy.xml @@ -12,6 +12,81 @@ android:layout_width="match_parent" android:layout_height="wrap_content"> + + + + + + + + + + + + Select notification sound MIUI notification sound workaround + Confirm opening links + Confirm showing images + Show reformatted messages by default Automatically recognize and disable tracking images Display hidden message texts Default encryption method @@ -447,6 +450,7 @@ Automatically close conversations when all messages are archived, sent or trashed Most providers do not allow modified sender addresses + Disabling this option might be harmful for your privacy This can result in odd looking and double texts A PIN takes precedence over biometrics authentication