Merge "Adds UserManagerInternal.isUserVisible(userId, displayId)."

This commit is contained in:
Felipe Leme
2022-08-23 16:35:56 +00:00
committed by Android (Google) Code Review
2 changed files with 12 additions and 1 deletions

View File

@@ -315,4 +315,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);
}

View File

@@ -7005,7 +7005,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