Prevent apps from spamming addAccountExplicitly.
See comment here for the discussion on solution
https://b.corp.google.com/issues/169762606#comment14
Change-Id: If212df3a3b7be1de0fb26b8e88b2fcbb8077c253
Bug: 169762606
(cherry picked from commit 11053c17b3)
Change-Id: I424e098dd70ae31bbbc7cb2f3eccd1ccc287064b
Merged-In: If212df3a3b7be1de0fb26b8e88b2fcbb8077c253
This commit is contained in:
@@ -1788,8 +1788,8 @@ public class AccountManagerService
|
||||
return false;
|
||||
}
|
||||
if (accounts.accountsDb.findAllDeAccounts().size() > 100) {
|
||||
Log.w(TAG, "insertAccountIntoDatabase: " + account
|
||||
+ ", skipping since more than 50 accounts on device exist");
|
||||
Log.w(TAG, "insertAccountIntoDatabase: " + account.toSafeString()
|
||||
+ ", skipping since more than 100 accounts on device exist");
|
||||
return false;
|
||||
}
|
||||
long accountId = accounts.accountsDb.insertCeAccount(account, password);
|
||||
|
||||
Reference in New Issue
Block a user