Fix NPE in AccountManagerService.

Test: atest AccountManagerServiceTest
Bug: 243969466
Change-Id: I59ad96dfd6894dda21d2a8c86b18ee88dc7f7a00
This commit is contained in:
Aseem Kumar
2022-11-10 20:42:28 +00:00
parent 2f0fafc42e
commit e52e9ebd65

View File

@@ -1870,7 +1870,7 @@ public class AccountManagerService
}
if (accounts.accountsDb.findAllDeAccounts().size() > 100) {
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;
}
long accountId = accounts.accountsDb.insertCeAccount(account, password);
@@ -3520,10 +3520,10 @@ public class AccountManagerService
@Override
protected String toDebugString(long now) {
String requiredFeaturesStr = TextUtils.join(",", requiredFeatures);
return super.toDebugString(now) + ", startAddAccountSession" + ", accountType "
+ accountType + ", requiredFeatures "
+ (requiredFeatures != null ? requiredFeaturesStr : null);
+ (requiredFeatures != null
? TextUtils.join(",", requiredFeatures) : "null");
}
}.bind();
} finally {