|
|
@ -296,7 +296,7 @@ public class FragmentSetup extends FragmentBase implements SharedPreferences.OnS
|
|
|
|
int order = 1;
|
|
|
|
int order = 1;
|
|
|
|
|
|
|
|
|
|
|
|
// OAuth
|
|
|
|
// OAuth
|
|
|
|
order = getMenuItems(menu, context, providers, order, false);
|
|
|
|
order = getMenuItems(menu, context, providers, order, false, debug);
|
|
|
|
|
|
|
|
|
|
|
|
menu.add(Menu.NONE, R.string.title_setup_other, order++, R.string.title_setup_other)
|
|
|
|
menu.add(Menu.NONE, R.string.title_setup_other, order++, R.string.title_setup_other)
|
|
|
|
.setIcon(R.drawable.twotone_auto_fix_high_24);
|
|
|
|
.setIcon(R.drawable.twotone_auto_fix_high_24);
|
|
|
@ -315,7 +315,7 @@ public class FragmentSetup extends FragmentBase implements SharedPreferences.OnS
|
|
|
|
item.setIcon(resid);
|
|
|
|
item.setIcon(resid);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
order = getMenuItems(menu, context, providers, order, true);
|
|
|
|
order = getMenuItems(menu, context, providers, order, true, debug);
|
|
|
|
|
|
|
|
|
|
|
|
SpannableString ss = new SpannableString(getString(R.string.title_setup_pop3));
|
|
|
|
SpannableString ss = new SpannableString(getString(R.string.title_setup_pop3));
|
|
|
|
ss.setSpan(new RelativeSizeSpan(HtmlHelper.FONT_SMALL), 0, ss.length(), 0);
|
|
|
|
ss.setSpan(new RelativeSizeSpan(HtmlHelper.FONT_SMALL), 0, ss.length(), 0);
|
|
|
@ -403,13 +403,13 @@ public class FragmentSetup extends FragmentBase implements SharedPreferences.OnS
|
|
|
|
popupMenu.show();
|
|
|
|
popupMenu.show();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private int getMenuItems(Menu menu, Context context, List<EmailProvider> providers, int order, boolean alt) {
|
|
|
|
private int getMenuItems(Menu menu, Context context, List<EmailProvider> providers, int order, boolean alt, boolean debug) {
|
|
|
|
Resources res = context.getResources();
|
|
|
|
Resources res = context.getResources();
|
|
|
|
String pkg = context.getPackageName();
|
|
|
|
String pkg = context.getPackageName();
|
|
|
|
|
|
|
|
|
|
|
|
for (EmailProvider provider : providers)
|
|
|
|
for (EmailProvider provider : providers)
|
|
|
|
if (provider.oauth != null &&
|
|
|
|
if (provider.oauth != null &&
|
|
|
|
provider.oauth.enabled &&
|
|
|
|
(provider.oauth.enabled || (provider.debug && debug)) &&
|
|
|
|
!TextUtils.isEmpty(provider.oauth.clientId) &&
|
|
|
|
!TextUtils.isEmpty(provider.oauth.clientId) &&
|
|
|
|
provider.alt == alt) {
|
|
|
|
provider.alt == alt) {
|
|
|
|
String title = getString(R.string.title_setup_oauth, provider.description);
|
|
|
|
String title = getString(R.string.title_setup_oauth, provider.description);
|
|
|
|