Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9b3422a5 authored by Ying Zheng's avatar Ying Zheng
Browse files

Fix a calling loop for getAllUsers.

Bug: 109698349
Test: Manual
Change-Id: Id5def3c876ccfb390dd91f7cb24ebd43ebdeaef0
parent 843a0cab
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -164,7 +164,7 @@ public final class UserManagerHelper {
     * @return All users other than user with userId.
     * @return All users other than user with userId.
     */
     */
    public List<UserInfo> getAllUsersExceptUser(int 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(); ) {
        for (Iterator<UserInfo> iterator = others.iterator(); iterator.hasNext(); ) {
            UserInfo userInfo = iterator.next();
            UserInfo userInfo = iterator.next();
@@ -183,7 +183,7 @@ public final class UserManagerHelper {
        if (isHeadlessSystemUser()) {
        if (isHeadlessSystemUser()) {
            return getAllUsersExcludesSystemUser();
            return getAllUsersExcludesSystemUser();
        }
        }
        return mUserManager.getUsers(true /* excludeDying */);
        return mUserManager.getUsers(/* excludeDying= */true);
    }
    }


    // User information accessors
    // User information accessors