Gmail refresh refactoring

This commit is contained in:
M66B
2020-10-25 15:55:27 +01:00
parent 8f33714f6e
commit 63d1e511f3
4 changed files with 29 additions and 21 deletions

View File

@@ -1334,12 +1334,12 @@ public class FragmentAccount extends FragmentBase {
return null;
AccountManager am = AccountManager.get(context);
Account[] accounts = am.getAccountsByType("com.google");
Account[] accounts = am.getAccountsByType(EmailService.TYPE_GOOGLE);
for (Account google : accounts)
if (account.user.equals(google.name))
return am.blockingGetAuthToken(
google,
EmailService.getAuthTokenType("com.google"),
EmailService.getAuthTokenType(EmailService.TYPE_GOOGLE),
true);
return null;