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

Commit 4e19ce21 authored by Felipe Leme's avatar Felipe Leme
Browse files

Adds UserManagerInternal.isUserVisible(userId, displayId).

Test: m
Fixes: 242900000

Change-Id: I85a2d5236be75a4cdecff0b6ea0afcebe65c8717
parent eb9edb4b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -308,4 +308,10 @@ public abstract class UserManagerInternal {

    /** TODO(b/239982558): add javadoc / mention invalid_id is used to unassing */
    public abstract void assignUserToDisplay(@UserIdInt int userId, int displayId);

    /**
     * Returns {@code true} if the user is visible (as defined by
     * {@link UserManager#isUserVisible()} in the given display.
     */
    public abstract boolean isUserVisible(@UserIdInt int userId, int displayId);
}
+6 −1
Original line number Diff line number Diff line
@@ -6875,7 +6875,12 @@ public class UserManagerService extends IUserManager.Stub {
                mUsersOnSecondaryDisplays.put(userId, displayId);
            }
        }

        @Override
        public boolean isUserVisible(int userId, int displayId) {
            return isUserVisibleOnDisplay(userId, displayId);
        }
    } // class LocalService

    /**
     * Check if user has restrictions