Use caller uid for logRecordWithUid in addAccountAsUser
Fix logRecordWithUid, it was using userId parameter instead of uid
Test: atest AccountsDbTest
Change-Id: I29a90121ad2306ba203c9e6261290ed1f8706d32
diff --git a/services/core/java/com/android/server/accounts/AccountManagerService.java b/services/core/java/com/android/server/accounts/AccountManagerService.java
index 4f54e64..b5cab1f 100644
--- a/services/core/java/com/android/server/accounts/AccountManagerService.java
+++ b/services/core/java/com/android/server/accounts/AccountManagerService.java
@@ -3248,7 +3248,7 @@
UserAccounts accounts = getUserAccounts(userId);
logRecordWithUid(
accounts, AccountsDb.DEBUG_ACTION_CALLED_ACCOUNT_ADD, AccountsDb.TABLE_ACCOUNTS,
- userId);
+ uid);
new Session(accounts, response, accountType, expectActivityLaunch,
true /* stripAuthTokenFromResult */, null /* accountName */,
false /* authDetailsRequired */, true /* updateLastAuthenticationTime */) {