Merge "Fix NPE in AccountManagerService."

This commit is contained in:
Aseem Kumar
2022-11-11 23:06:19 +00:00
committed by Android (Google) Code Review

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 {