diff options
| -rw-r--r-- | services/core/java/com/android/server/accounts/AccountManagerService.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/accounts/AccountManagerService.java b/services/core/java/com/android/server/accounts/AccountManagerService.java index 09440e0e997d..600b124ffbf6 100644 --- a/services/core/java/com/android/server/accounts/AccountManagerService.java +++ b/services/core/java/com/android/server/accounts/AccountManagerService.java @@ -3227,6 +3227,12 @@ public class AccountManagerService "the type and name should not be empty"); return; } + if (!type.equals(mAccountType)) { + onError(AccountManager.ERROR_CODE_INVALID_RESPONSE, + "incorrect account type"); + return; + } + Account resultAccount = new Account(name, type); if (!customTokens) { saveAuthTokenToDatabase( |