Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 551d70e1 authored by Aseem Kumar's avatar Aseem Kumar
Browse files

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 11053c17)

Change-Id: I424e098dd70ae31bbbc7cb2f3eccd1ccc287064b
Merged-In: If212df3a3b7be1de0fb26b8e88b2fcbb8077c253
parent 204ab511
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);