From af7e1b04dca4b99bc72424e283808dbba216784d Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 10 May 2020 07:44:56 +0200 Subject: [PATCH] Revert "Removed OAuth limitations" This reverts commit 7547e747766235d54507262758f64d3e6852d122. --- .../java/eu/faircode/email/FragmentSetup.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentSetup.java b/app/src/main/java/eu/faircode/email/FragmentSetup.java index be90bc2e5e..b6153e5505 100644 --- a/app/src/main/java/eu/faircode/email/FragmentSetup.java +++ b/app/src/main/java/eu/faircode/email/FragmentSetup.java @@ -168,14 +168,16 @@ public class FragmentSetup extends FragmentBase { int order = 1; popupMenu.getMenu().add(Menu.NONE, R.string.title_setup_gmail, order++, R.string.title_setup_gmail); - for (EmailProvider provider : EmailProvider.loadProfiles(getContext())) - if (provider.oauth != null && (provider.oauth.enabled || BuildConfig.DEBUG)) - popupMenu.getMenu() - .add(Menu.NONE, -1, order++, getString(R.string.title_setup_oauth, provider.name)) - .setIntent(new Intent(ActivitySetup.ACTION_QUICK_OAUTH) - .putExtra("id", provider.id) - .putExtra("name", provider.name) - .putExtra("askAccount", provider.oauth.askAccount)); + if (!Helper.isPlayStoreInstall() && + (Helper.hasValidFingerprint(getContext()) || BuildConfig.DEBUG)) + for (EmailProvider provider : EmailProvider.loadProfiles(getContext())) + if (provider.oauth != null && (provider.oauth.enabled || BuildConfig.DEBUG)) + popupMenu.getMenu() + .add(Menu.NONE, -1, order++, getString(R.string.title_setup_oauth, provider.name)) + .setIntent(new Intent(ActivitySetup.ACTION_QUICK_OAUTH) + .putExtra("id", provider.id) + .putExtra("name", provider.name) + .putExtra("askAccount", provider.oauth.askAccount)); //popupMenu.getMenu().add(Menu.NONE, R.string.title_setup_activesync, order++, R.string.title_setup_activesync); popupMenu.getMenu().add(Menu.NONE, R.string.title_setup_other, order++, R.string.title_setup_other);