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

Commit 906a8ada authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Modify getUserAssignedToDisplay to handle the extra displays" into main

parents eb8bc2af fd60e4bc
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -572,7 +572,7 @@ public final class UserVisibilityMediator implements Dumpable {
                return false;
            }

            // First check if the user started on display
            // First check if the user is assigned to a display
            int userAssignedToDisplay = getUserStartedOnDisplay(displayId);
            if (userAssignedToDisplay != USER_NULL) {
                Slogf.w(TAG, "assignUserToExtraDisplay(%d, %d): failed because display was assigned"
@@ -918,9 +918,15 @@ public final class UserVisibilityMediator implements Dumpable {
                if (!isStartedVisibleProfileLocked(userId)) {
                    return userId;
                } else if (DBG) {
                    Slogf.d(TAG, "getUserAssignedToDisplay(%d): skipping user %d because it's "
                            + "a profile", displayId, userId);
                    Slogf.d(TAG,
                            "getUserAssignedToDisplay(%d): skipping user %d because it's a profile",
                            displayId, userId);
                }
            }
            int userAssignedToExtraDisplay = mExtraDisplaysAssignedToUsers.get(displayId,
                    USER_NULL);
            if (userAssignedToExtraDisplay != USER_NULL) {
                return userAssignedToExtraDisplay;
            }
        }
        if (!returnCurrentUserByDefault) {