Loading services/core/java/com/android/server/accounts/AccountManagerService.java +22 −1 Original line number Original line Diff line number Diff line Loading @@ -112,6 +112,7 @@ import com.android.internal.messages.nano.SystemMessageProto.SystemMessage; import com.android.internal.notification.SystemNotificationChannels; import com.android.internal.notification.SystemNotificationChannels; import com.android.internal.util.ArrayUtils; import com.android.internal.util.ArrayUtils; import com.android.internal.util.DumpUtils; import com.android.internal.util.DumpUtils; import com.android.internal.util.FrameworkStatsLog; import com.android.internal.util.IndentingPrintWriter; import com.android.internal.util.IndentingPrintWriter; import com.android.internal.util.Preconditions; import com.android.internal.util.Preconditions; import com.android.modules.expresslog.Histogram; import com.android.modules.expresslog.Histogram; Loading Loading @@ -1226,7 +1227,17 @@ public class AccountManagerService // been re-enabled (after being updated for example), then we just overwrite the old // been re-enabled (after being updated for example), then we just overwrite the old // values. // values. for (Entry<String, Integer> entry : knownAuth.entrySet()) { for (Entry<String, Integer> entry : knownAuth.entrySet()) { accountsDb.insertOrReplaceMetaAuthTypeAndUid(entry.getKey(), entry.getValue()); String type = entry.getKey(); Integer newUid = entry.getValue(); if (!Objects.equals(metaAuthUid.get(type), newUid)) { FrameworkStatsLog.write( FrameworkStatsLog.ACCOUNT_MANAGER_EVENT, type, newUid, FrameworkStatsLog .ACCOUNT_MANAGER_EVENT__EVENT_TYPE__AUTHENTICATOR_ADDED); } accountsDb.insertOrReplaceMetaAuthTypeAndUid(type, newUid); } } final Map<Long, Account> accountsMap = accountsDb.findAllDeAccounts(); final Map<Long, Account> accountsMap = accountsDb.findAllDeAccounts(); Loading Loading @@ -1945,6 +1956,11 @@ public class AccountManagerService } } accounts.accountsDb.setTransactionSuccessful(); accounts.accountsDb.setTransactionSuccessful(); FrameworkStatsLog.write( FrameworkStatsLog.ACCOUNT_MANAGER_EVENT, account.type, callingUid, FrameworkStatsLog.ACCOUNT_MANAGER_EVENT__EVENT_TYPE__ACCOUNT_ADDED); logRecord(AccountsDb.DEBUG_ACTION_ACCOUNT_ADD, AccountsDb.TABLE_ACCOUNTS, logRecord(AccountsDb.DEBUG_ACTION_ACCOUNT_ADD, AccountsDb.TABLE_ACCOUNTS, accountId, accountId, accounts, callingUid); accounts, callingUid); Loading Loading @@ -2544,6 +2560,11 @@ public class AccountManagerService } } String action = userUnlocked ? AccountsDb.DEBUG_ACTION_ACCOUNT_REMOVE String action = userUnlocked ? AccountsDb.DEBUG_ACTION_ACCOUNT_REMOVE : AccountsDb.DEBUG_ACTION_ACCOUNT_REMOVE_DE; : AccountsDb.DEBUG_ACTION_ACCOUNT_REMOVE_DE; FrameworkStatsLog.write( FrameworkStatsLog.ACCOUNT_MANAGER_EVENT, account.type, callingUid, FrameworkStatsLog.ACCOUNT_MANAGER_EVENT__EVENT_TYPE__ACCOUNT_REMOVED); logRecord(action, AccountsDb.TABLE_ACCOUNTS, accountId, accounts); logRecord(action, AccountsDb.TABLE_ACCOUNTS, accountId, accounts); } } } } Loading Loading
services/core/java/com/android/server/accounts/AccountManagerService.java +22 −1 Original line number Original line Diff line number Diff line Loading @@ -112,6 +112,7 @@ import com.android.internal.messages.nano.SystemMessageProto.SystemMessage; import com.android.internal.notification.SystemNotificationChannels; import com.android.internal.notification.SystemNotificationChannels; import com.android.internal.util.ArrayUtils; import com.android.internal.util.ArrayUtils; import com.android.internal.util.DumpUtils; import com.android.internal.util.DumpUtils; import com.android.internal.util.FrameworkStatsLog; import com.android.internal.util.IndentingPrintWriter; import com.android.internal.util.IndentingPrintWriter; import com.android.internal.util.Preconditions; import com.android.internal.util.Preconditions; import com.android.modules.expresslog.Histogram; import com.android.modules.expresslog.Histogram; Loading Loading @@ -1226,7 +1227,17 @@ public class AccountManagerService // been re-enabled (after being updated for example), then we just overwrite the old // been re-enabled (after being updated for example), then we just overwrite the old // values. // values. for (Entry<String, Integer> entry : knownAuth.entrySet()) { for (Entry<String, Integer> entry : knownAuth.entrySet()) { accountsDb.insertOrReplaceMetaAuthTypeAndUid(entry.getKey(), entry.getValue()); String type = entry.getKey(); Integer newUid = entry.getValue(); if (!Objects.equals(metaAuthUid.get(type), newUid)) { FrameworkStatsLog.write( FrameworkStatsLog.ACCOUNT_MANAGER_EVENT, type, newUid, FrameworkStatsLog .ACCOUNT_MANAGER_EVENT__EVENT_TYPE__AUTHENTICATOR_ADDED); } accountsDb.insertOrReplaceMetaAuthTypeAndUid(type, newUid); } } final Map<Long, Account> accountsMap = accountsDb.findAllDeAccounts(); final Map<Long, Account> accountsMap = accountsDb.findAllDeAccounts(); Loading Loading @@ -1945,6 +1956,11 @@ public class AccountManagerService } } accounts.accountsDb.setTransactionSuccessful(); accounts.accountsDb.setTransactionSuccessful(); FrameworkStatsLog.write( FrameworkStatsLog.ACCOUNT_MANAGER_EVENT, account.type, callingUid, FrameworkStatsLog.ACCOUNT_MANAGER_EVENT__EVENT_TYPE__ACCOUNT_ADDED); logRecord(AccountsDb.DEBUG_ACTION_ACCOUNT_ADD, AccountsDb.TABLE_ACCOUNTS, logRecord(AccountsDb.DEBUG_ACTION_ACCOUNT_ADD, AccountsDb.TABLE_ACCOUNTS, accountId, accountId, accounts, callingUid); accounts, callingUid); Loading Loading @@ -2544,6 +2560,11 @@ public class AccountManagerService } } String action = userUnlocked ? AccountsDb.DEBUG_ACTION_ACCOUNT_REMOVE String action = userUnlocked ? AccountsDb.DEBUG_ACTION_ACCOUNT_REMOVE : AccountsDb.DEBUG_ACTION_ACCOUNT_REMOVE_DE; : AccountsDb.DEBUG_ACTION_ACCOUNT_REMOVE_DE; FrameworkStatsLog.write( FrameworkStatsLog.ACCOUNT_MANAGER_EVENT, account.type, callingUid, FrameworkStatsLog.ACCOUNT_MANAGER_EVENT__EVENT_TYPE__ACCOUNT_REMOVED); logRecord(action, AccountsDb.TABLE_ACCOUNTS, accountId, accounts); logRecord(action, AccountsDb.TABLE_ACCOUNTS, accountId, accounts); } } } } Loading