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

Commit 0a96db46 authored by Tyler Saunders's avatar Tyler Saunders
Browse files

Ensure Current user is always included

* 0b878a59 added a change that ensured
  users were added in a predictable order, but introduced an issue where
  the current user was not getting added.

Bug: b/408084746
Test: manual & presubmits
Flag: EXEMPT bug_fix
Change-Id: I6316bf63adada4c4a8e5e327c26c923e7efcd3a4
parent 308ab18b
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -322,8 +322,13 @@ public interface UserManagerState {
                        continue;
                    }
                } else {
                    // Only allow managed profiles + the parent user on lower than V.
                    if (currentUserIsManaged
                    // On Android U and below, ensure the following profiles are included:
                    //  - The currently active profile
                    //  - The currently active profile's parent
                    //  - All managed profiles
                    if (mCurrentUser.getIdentifier() == handle.getIdentifier()) {
                        // Intentionally empty so that this profile gets added.
                    } else if (currentUserIsManaged
                            && mUserManager.getProfileParent(mCurrentUser.getUserHandle())
                                    == handle) {
                        // Intentionally empty so that this profile gets added.