diff --git a/app/src/main/java/eu/faircode/email/FragmentSetup.java b/app/src/main/java/eu/faircode/email/FragmentSetup.java index 8efb9b97c1..1ae6fb11ad 100644 --- a/app/src/main/java/eu/faircode/email/FragmentSetup.java +++ b/app/src/main/java/eu/faircode/email/FragmentSetup.java @@ -277,25 +277,24 @@ public class FragmentSetup extends FragmentBase { Resources res = context.getResources(); String pkg = context.getPackageName(); - boolean google = true; + boolean web = false; List providers = EmailProvider.loadProfiles(context); for (EmailProvider provider : providers) if ("gmail".equals(provider.id) && provider.oauth != null && provider.oauth.enabled) { - google = false; + web = true; break; } int order = 1; - if (google) { - String gmail = getString(R.string.title_setup_oauth, getString(R.string.title_setup_gmail)); - MenuItem item = menu.add(Menu.FIRST, R.string.title_setup_gmail, order++, gmail); - int resid = res.getIdentifier("provider_gmail", "drawable", pkg); - if (resid != 0) - item.setIcon(resid); - } + String gmail = getString(web ? R.string.title_setup_android : R.string.title_setup_oauth, + getString(R.string.title_setup_gmail)); + MenuItem item = menu.add(Menu.FIRST, R.string.title_setup_gmail, order++, gmail); + int resid = res.getIdentifier("provider_gmail", "drawable", pkg); + if (resid != 0) + item.setIcon(resid); for (EmailProvider provider : providers) if (provider.oauth != null && @@ -303,7 +302,7 @@ public class FragmentSetup extends FragmentBase { !TextUtils.isEmpty(provider.oauth.clientId)) { String title = getString(R.string.title_setup_oauth, "gmail".equals(provider.id) ? getString(R.string.title_setup_google_sign_in) : provider.description); - MenuItem item = menu + item = menu .add(Menu.FIRST, -1, order++, title) .setIntent(new Intent(ActivitySetup.ACTION_QUICK_OAUTH) .putExtra("id", provider.id) @@ -313,7 +312,7 @@ public class FragmentSetup extends FragmentBase { .putExtra("askTenant", provider.oauth.askTenant()) .putExtra("pop", provider.pop != null)); // https://developers.google.com/identity/branding-guidelines - int resid = ("gmail".equals(provider.id) + resid = ("gmail".equals(provider.id) ? R.drawable.google_signin : res.getIdentifier("provider_" + provider.id, "drawable", pkg)); if (resid != 0) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 6f3693c598..5cec2b4d0a 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -201,6 +201,7 @@ Identities Gmail %1$s (OAuth) + %1$s (Android) Sign in with Google Other provider Incoming email only (email cannot be sent!)