Fix a calling loop for getAllUsers.
Bug: 109698349
Test: Manual
Change-Id: Id5def3c876ccfb390dd91f7cb24ebd43ebdeaef0
diff --git a/packages/SettingsLib/src/com/android/settingslib/users/UserManagerHelper.java b/packages/SettingsLib/src/com/android/settingslib/users/UserManagerHelper.java
index 3eb7913..4c45a75 100644
--- a/packages/SettingsLib/src/com/android/settingslib/users/UserManagerHelper.java
+++ b/packages/SettingsLib/src/com/android/settingslib/users/UserManagerHelper.java
@@ -164,7 +164,7 @@
* @return All users other than user with userId.
*/
public List<UserInfo> getAllUsersExceptUser(int userId) {
- List<UserInfo> others = getAllUsers();
+ List<UserInfo> others = mUserManager.getUsers(/* excludeDying= */true);
for (Iterator<UserInfo> iterator = others.iterator(); iterator.hasNext(); ) {
UserInfo userInfo = iterator.next();
@@ -183,7 +183,7 @@
if (isHeadlessSystemUser()) {
return getAllUsersExcludesSystemUser();
}
- return mUserManager.getUsers(true /* excludeDying */);
+ return mUserManager.getUsers(/* excludeDying= */true);
}
// User information accessors