Fix NPE in AccountManagerService.
Test: atest AccountManagerServiceTest Bug: 243969466 Change-Id: I59ad96dfd6894dda21d2a8c86b18ee88dc7f7a00
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user