From 6eed965e732695b02a6c4b25071fc6dfcb556d42 Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 26 Jun 2021 09:05:25 +0200 Subject: [PATCH] Link to privacy policies --- FAQ.md | 4 +- PRIVACY.md | 13 ++++++ app/src/main/assets/PRIVACY.md | 13 ++++++ .../java/eu/faircode/email/EmailProvider.java | 2 + .../java/eu/faircode/email/FragmentGmail.java | 16 ++++++++ .../java/eu/faircode/email/FragmentOAuth.java | 20 ++++++++-- .../eu/faircode/email/FragmentQuickSetup.java | 13 ++++++ .../java/eu/faircode/email/FragmentSetup.java | 1 + app/src/main/res/layout/fragment_gmail.xml | 27 ++++++++++++- app/src/main/res/layout/fragment_oauth.xml | 19 ++++++++- .../main/res/layout/fragment_quick_setup.xml | 40 +++++++++++++------ app/src/main/res/values/strings.xml | 1 + app/src/main/res/xml/providers.xml | 4 ++ 13 files changed, 152 insertions(+), 21 deletions(-) diff --git a/FAQ.md b/FAQ.md index 437be40914..a6c93e7660 100644 --- a/FAQ.md +++ b/FAQ.md @@ -3740,8 +3740,8 @@ For more information, please see [this article](https://en.wikipedia.org/wiki/Do FairEmail currently uses the following block lists: -* [Spamhaus zen](https://www.spamhaus.org/zen/) - [Terms of Use](https://www.spamhaus.org/organization/dnsblusage/) - [Privacy policy](https://www.spamhaus.org/organization/privacy/) -* [Spamcop](https://www.spamcop.net/) - [Legal info](https://www.spamcop.net/fom-serve/cache/297.html) - [Privacy policy](https://www.spamcop.net/fom-serve/cache/168.html) +* [Spamhaus zen](https://www.spamhaus.org/zen/) – [Terms of Use](https://www.spamhaus.org/organization/dnsblusage/) — [Privacy policy](https://www.spamhaus.org/organization/privacy/) +* [Spamcop](https://www.spamcop.net/) – [Legal info](https://www.spamcop.net/fom-serve/cache/297.html) — [Privacy policy](https://www.spamcop.net/fom-serve/cache/168.html)
diff --git a/PRIVACY.md b/PRIVACY.md index f62aa9db46..de9fcff52d 100644 --- a/PRIVACY.md +++ b/PRIVACY.md @@ -20,4 +20,17 @@ and therefore adheres to the [Google API Services User Data Policy](https://deve including the Limited Use requirements. Google API Services are used only to authenticate Gmail accounts though OAuth. +FairEmail **can use** these services if they are explicitly enabled (off by default) or are explicitly used by you: + +* [ipinfo.io](https://ipinfo.io/) – [Privacy policy](https://ipinfo.io/privacy-policy) +* [Gravatar](https://gravatar.com/) – [Privacy policy](https://automattic.com/privacy/) +* [Spamhaus zen](https://www.spamhaus.org/zen/) – [Privacy policy](https://www.spamhaus.org/organization/privacy/) +* [Spamcop](https://www.spamcop.net/) – [Privacy policy](https://www.spamcop.net/fom-serve/cache/168.html) +* [Thunderbird autoconfiguration](https://developer.mozilla.org/docs/Mozilla/Thunderbird/Autoconfiguration) – [Privacy policy](https://www.mozilla.org/privacy/) + +FairEmail **can access** the websites at the domain names of email addresses +if [favicons](https://en.wikipedia.org/wiki/Favicon) are explicitly enabled (off by default). + +
+ Copyright © 2018-2021 Marcel Bokhorst. diff --git a/app/src/main/assets/PRIVACY.md b/app/src/main/assets/PRIVACY.md index f62aa9db46..de9fcff52d 100644 --- a/app/src/main/assets/PRIVACY.md +++ b/app/src/main/assets/PRIVACY.md @@ -20,4 +20,17 @@ and therefore adheres to the [Google API Services User Data Policy](https://deve including the Limited Use requirements. Google API Services are used only to authenticate Gmail accounts though OAuth. +FairEmail **can use** these services if they are explicitly enabled (off by default) or are explicitly used by you: + +* [ipinfo.io](https://ipinfo.io/) – [Privacy policy](https://ipinfo.io/privacy-policy) +* [Gravatar](https://gravatar.com/) – [Privacy policy](https://automattic.com/privacy/) +* [Spamhaus zen](https://www.spamhaus.org/zen/) – [Privacy policy](https://www.spamhaus.org/organization/privacy/) +* [Spamcop](https://www.spamcop.net/) – [Privacy policy](https://www.spamcop.net/fom-serve/cache/168.html) +* [Thunderbird autoconfiguration](https://developer.mozilla.org/docs/Mozilla/Thunderbird/Autoconfiguration) – [Privacy policy](https://www.mozilla.org/privacy/) + +FairEmail **can access** the websites at the domain names of email addresses +if [favicons](https://en.wikipedia.org/wiki/Favicon) are explicitly enabled (off by default). + +
+ Copyright © 2018-2021 Marcel Bokhorst. diff --git a/app/src/main/java/eu/faircode/email/EmailProvider.java b/app/src/main/java/eu/faircode/email/EmailProvider.java index a2c85ffb28..79afb5be80 100644 --- a/app/src/main/java/eu/faircode/email/EmailProvider.java +++ b/app/src/main/java/eu/faircode/email/EmailProvider.java @@ -172,6 +172,7 @@ public class EmailProvider implements Parcelable { provider.oauth.authorizationEndpoint = xml.getAttributeValue(null, "authorizationEndpoint"); provider.oauth.tokenEndpoint = xml.getAttributeValue(null, "tokenEndpoint"); provider.oauth.redirectUri = xml.getAttributeValue(null, "redirectUri"); + provider.oauth.privacy = xml.getAttributeValue(null, "privacy"); } else throw new IllegalAccessException(name); } else if (eventType == XmlPullParser.END_TAG) { @@ -802,5 +803,6 @@ public class EmailProvider implements Parcelable { String authorizationEndpoint; String tokenEndpoint; String redirectUri; + String privacy; } } diff --git a/app/src/main/java/eu/faircode/email/FragmentGmail.java b/app/src/main/java/eu/faircode/email/FragmentGmail.java index 8a5484f430..6b46679030 100644 --- a/app/src/main/java/eu/faircode/email/FragmentGmail.java +++ b/app/src/main/java/eu/faircode/email/FragmentGmail.java @@ -32,6 +32,7 @@ import android.database.Cursor; import android.graphics.Paint; import android.net.ConnectivityManager; import android.net.NetworkInfo; +import android.net.Uri; import android.os.Bundle; import android.provider.ContactsContract; import android.text.TextUtils; @@ -66,6 +67,8 @@ public class FragmentGmail extends FragmentBase { private ViewGroup view; private ScrollView scroll; + private TextView tvTitle; + private TextView tvPrivacy; private Button btnGrant; private TextView tvGranted; private EditText etName; @@ -80,6 +83,8 @@ public class FragmentGmail extends FragmentBase { private Group grpError; + private static final String PRIVACY_URI = "https://policies.google.com/privacy"; + @Override @Nullable public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { @@ -90,6 +95,8 @@ public class FragmentGmail extends FragmentBase { scroll = view.findViewById(R.id.scroll); // Get controls + tvTitle = view.findViewById(R.id.tvTitle); + tvPrivacy = view.findViewById(R.id.tvPrivacy); btnGrant = view.findViewById(R.id.btnGrant); tvGranted = view.findViewById(R.id.tvGranted); etName = view.findViewById(R.id.etName); @@ -106,6 +113,14 @@ public class FragmentGmail extends FragmentBase { // Wire controls + tvPrivacy.setPaintFlags(tvPrivacy.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG); + tvPrivacy.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Helper.view(v.getContext(), Uri.parse(PRIVACY_URI), false); + } + }); + btnGrant.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { @@ -170,6 +185,7 @@ public class FragmentGmail extends FragmentBase { // Initialize Helper.setViewsEnabled(view, false); + tvTitle.setText(getString(R.string.title_setup_oauth_rationale, "Gmail")); pbSelect.setVisibility(View.GONE); grpError.setVisibility(View.GONE); diff --git a/app/src/main/java/eu/faircode/email/FragmentOAuth.java b/app/src/main/java/eu/faircode/email/FragmentOAuth.java index 56c889919d..5945eacf94 100644 --- a/app/src/main/java/eu/faircode/email/FragmentOAuth.java +++ b/app/src/main/java/eu/faircode/email/FragmentOAuth.java @@ -25,6 +25,7 @@ import android.content.Intent; import android.content.SharedPreferences; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; +import android.graphics.Paint; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.net.Uri; @@ -92,12 +93,14 @@ import static eu.faircode.email.ServiceAuthenticator.AUTH_TYPE_OAUTH; public class FragmentOAuth extends FragmentBase { private String id; private String name; + private String privacy; private boolean askAccount; private ViewGroup view; private ScrollView scroll; - private TextView tvGrantHint; + private TextView tvTitle; + private TextView tvPrivacy; private EditText etName; private EditText etEmail; private CheckBox cbUpdate; @@ -122,6 +125,7 @@ public class FragmentOAuth extends FragmentBase { Bundle args = getArguments(); id = args.getString("id"); name = args.getString("name"); + privacy = args.getString("privacy"); askAccount = args.getBoolean("askAccount", false); } @@ -135,7 +139,8 @@ public class FragmentOAuth extends FragmentBase { scroll = view.findViewById(R.id.scroll); // Get controls - tvGrantHint = view.findViewById(R.id.tvGrantHint); + tvTitle = view.findViewById(R.id.tvTitle); + tvPrivacy = view.findViewById(R.id.tvPrivacy); etName = view.findViewById(R.id.etName); etEmail = view.findViewById(R.id.etEmail); cbUpdate = view.findViewById(R.id.cbUpdate); @@ -153,6 +158,15 @@ public class FragmentOAuth extends FragmentBase { // Wire controls + tvPrivacy.setVisibility(TextUtils.isEmpty(privacy) ? View.GONE : View.VISIBLE); + tvPrivacy.setPaintFlags(tvPrivacy.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG); + tvPrivacy.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Helper.view(v.getContext(), Uri.parse(privacy), false); + } + }); + btnOAuth.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { @@ -168,7 +182,7 @@ public class FragmentOAuth extends FragmentBase { }); // Initialize - tvGrantHint.setText(getString(R.string.title_setup_oauth_rationale, name)); + tvTitle.setText(getString(R.string.title_setup_oauth_rationale, name)); etName.setVisibility(askAccount ? View.VISIBLE : View.GONE); etEmail.setVisibility(askAccount ? View.VISIBLE : View.GONE); pbOAuth.setVisibility(View.GONE); diff --git a/app/src/main/java/eu/faircode/email/FragmentQuickSetup.java b/app/src/main/java/eu/faircode/email/FragmentQuickSetup.java index 3f7307c466..7fb8b09aac 100644 --- a/app/src/main/java/eu/faircode/email/FragmentQuickSetup.java +++ b/app/src/main/java/eu/faircode/email/FragmentQuickSetup.java @@ -21,6 +21,7 @@ package eu.faircode.email; import android.content.Context; import android.content.Intent; +import android.graphics.Paint; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.net.Uri; @@ -60,6 +61,7 @@ public class FragmentQuickSetup extends FragmentBase { private ViewGroup view; private ScrollView scroll; + private TextView tvPrivacy; private EditText etName; private EditText etEmail; private TextInputLayout tilPassword; @@ -83,6 +85,8 @@ public class FragmentQuickSetup extends FragmentBase { private Group grpSetup; private Group grpError; + private static final String PRIVACY_URI = "https://www.mozilla.org/privacy/"; + @Override @Nullable public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { @@ -93,6 +97,7 @@ public class FragmentQuickSetup extends FragmentBase { scroll = view.findViewById(R.id.scroll); // Get controls + tvPrivacy = view.findViewById(R.id.tvPrivacy); etName = view.findViewById(R.id.etName); etEmail = view.findViewById(R.id.etEmail); tilPassword = view.findViewById(R.id.tilPassword); @@ -118,6 +123,14 @@ public class FragmentQuickSetup extends FragmentBase { // Wire controls + tvPrivacy.setPaintFlags(tvPrivacy.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG); + tvPrivacy.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Helper.view(v.getContext(), Uri.parse(PRIVACY_URI), false); + } + }); + tilPassword.setHintEnabled(false); tilPassword.getEditText().setOnEditorActionListener(new TextView.OnEditorActionListener() { diff --git a/app/src/main/java/eu/faircode/email/FragmentSetup.java b/app/src/main/java/eu/faircode/email/FragmentSetup.java index 462d61016f..74260b9041 100644 --- a/app/src/main/java/eu/faircode/email/FragmentSetup.java +++ b/app/src/main/java/eu/faircode/email/FragmentSetup.java @@ -195,6 +195,7 @@ public class FragmentSetup extends FragmentBase { .setIntent(new Intent(ActivitySetup.ACTION_QUICK_OAUTH) .putExtra("id", provider.id) .putExtra("name", provider.description) + .putExtra("privacy", provider.oauth.privacy) .putExtra("askAccount", provider.oauth.askAccount)); int resid = context.getResources() .getIdentifier("provider_" + provider.id, "drawable", context.getPackageName()); diff --git a/app/src/main/res/layout/fragment_gmail.xml b/app/src/main/res/layout/fragment_gmail.xml index d307f51e30..6138192fe1 100644 --- a/app/src/main/res/layout/fragment_gmail.xml +++ b/app/src/main/res/layout/fragment_gmail.xml @@ -13,15 +13,40 @@ android:layout_width="match_parent" android:layout_height="wrap_content"> + + + + + app:layout_constraintTop_toBottomOf="@id/tvPrivacy" />