Auth: Do not try to get token for non-existing accounts 2/2

This commit is contained in:
Oizaro 2020-12-07 21:17:11 +01:00 committed by GitHub
parent ebe204d2f3
commit 5350cbe875
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -93,6 +93,10 @@ public class AuthManagerServiceImpl extends IAuthManagerService.Stub {
Bundle result = new Bundle();
result.putString(KEY_ACCOUNT_NAME, accountName);
result.putString(KEY_ACCOUNT_TYPE, authManager.getAccountType());
if (!authManager.accountExists()) {
result.putString(KEY_ERROR, "NetworkError");
return result;
}
try {
AuthResponse res = authManager.requestAuth(false);
if (res.auth != null) {