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

Commit e52e9ebd authored by Aseem Kumar's avatar Aseem Kumar
Browse files

Fix NPE in AccountManagerService.

Test: atest AccountManagerServiceTest
Bug: 243969466
Change-Id: I59ad96dfd6894dda21d2a8c86b18ee88dc7f7a00
parent 2f0fafc4
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -1870,7 +1870,7 @@ public class AccountManagerService
                    }
                    }
                    if (accounts.accountsDb.findAllDeAccounts().size() > 100) {
                    if (accounts.accountsDb.findAllDeAccounts().size() > 100) {
                        Log.w(TAG, "insertAccountIntoDatabase: " + account.toSafeString()
                        Log.w(TAG, "insertAccountIntoDatabase: " + account.toSafeString()
                                + ", skipping since more than 50 accounts on device exist");
                                + ", skipping since more than 100 accounts on device exist");
                        return false;
                        return false;
                    }
                    }
                    long accountId = accounts.accountsDb.insertCeAccount(account, password);
                    long accountId = accounts.accountsDb.insertCeAccount(account, password);
@@ -3520,10 +3520,10 @@ public class AccountManagerService


                @Override
                @Override
                protected String toDebugString(long now) {
                protected String toDebugString(long now) {
                    String requiredFeaturesStr = TextUtils.join(",", requiredFeatures);
                    return super.toDebugString(now) + ", startAddAccountSession" + ", accountType "
                    return super.toDebugString(now) + ", startAddAccountSession" + ", accountType "
                            + accountType + ", requiredFeatures "
                            + accountType + ", requiredFeatures "
                            + (requiredFeatures != null ? requiredFeaturesStr : null);
                            + (requiredFeatures != null
                                ? TextUtils.join(",", requiredFeatures) : "null");
                }
                }
            }.bind();
            }.bind();
        } finally {
        } finally {