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

Commit 13f25d78 authored by BK Choi's avatar BK Choi Committed by Android (Google) Code Review
Browse files

Merge "Rename getDisplayAssignedToUser() to getMainDisplayAssignedToUser()." into udc-dev

parents b0bf15f9 7cbd661c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2251,7 +2251,7 @@ package android.os {
    method @Nullable @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_USERS, android.Manifest.permission.CREATE_USERS}) public android.content.pm.UserInfo createRestrictedProfile(@Nullable String);
    method @Nullable @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_USERS, android.Manifest.permission.CREATE_USERS}) public android.content.pm.UserInfo createUser(@Nullable String, @NonNull String, int);
    method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_USERS, android.Manifest.permission.CREATE_USERS}) public android.os.UserHandle getBootUser();
    method public int getDisplayIdAssignedToUser();
    method public int getMainDisplayIdAssignedToUser();
    method @Nullable @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_USERS, android.Manifest.permission.CREATE_USERS}) public java.util.Set<java.lang.String> getPreInstallableSystemPackages(@NonNull String);
    method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_USERS, android.Manifest.permission.CREATE_USERS, android.Manifest.permission.QUERY_USERS}) public String getUserType();
    method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_USERS, android.Manifest.permission.CREATE_USERS}) public java.util.List<android.content.pm.UserInfo> getUsers(boolean, boolean, boolean);
+1 −1
Original line number Diff line number Diff line
@@ -1151,7 +1151,7 @@ public class Instrumentation {
        }

        UserManager userManager = mInstrContext.getSystemService(UserManager.class);
        int userDisplayId = userManager.getDisplayIdAssignedToUser();
        int userDisplayId = userManager.getMainDisplayIdAssignedToUser();
        if (VERBOSE) {
            Log.v(TAG, "setDisplayIfNeeded(" + event + "): eventDisplayId=" + eventDisplayId
                    + ", user=" + mInstrContext.getUser() + ", userDisplayId=" + userDisplayId);
+1 −1
Original line number Diff line number Diff line
@@ -134,7 +134,7 @@ interface IUserManager {
    boolean isUserForeground(int userId);
    boolean isUserVisible(int userId);
    int[] getVisibleUsers();
    int getDisplayIdAssignedToUser();
    int getMainDisplayIdAssignedToUser();
    boolean isUserNameSet(int userId);
    boolean hasRestrictedProfiles(int userId);
    boolean requestQuietModeEnabled(String callingPackage, boolean enableQuietMode, int userId, in IntentSender target, int flags);
+3 −3
Original line number Diff line number Diff line
@@ -3056,14 +3056,14 @@ public class UserManager {
    }

    /**
     * See {@link com.android.server.pm.UserManagerInternal#getDisplayAssignedToUser(int)}.
     * See {@link com.android.server.pm.UserManagerInternal#getMainDisplayAssignedToUser(int)}.
     *
     * @hide
     */
    @TestApi
    public int getDisplayIdAssignedToUser() {
    public int getMainDisplayIdAssignedToUser() {
        try {
            return mService.getDisplayIdAssignedToUser();
            return mService.getMainDisplayIdAssignedToUser();
        } catch (RemoteException re) {
            throw re.rethrowFromSystemServer();
        }
+2 −3
Original line number Diff line number Diff line
@@ -506,15 +506,14 @@ public abstract class UserManagerInternal {
     *
     * <p>If the user is a profile and is running, it's assigned to its parent display.
     */
    // TODO(b/272366483) rename this method to avoid confusion with getDisplaysAssignedTOUser().
    public abstract int getDisplayAssignedToUser(@UserIdInt int userId);
    public abstract int getMainDisplayAssignedToUser(@UserIdInt int userId);

    /**
     * Returns all display ids assigned to the user including {@link
     * #assignUserToExtraDisplay(int, int) extra displays}, or {@code null} if there is no display
     * assigned to the specified user.
     *
     * <p>Note that this method is different from {@link #getDisplayAssignedToUser(int)}, which
     * <p>Note that this method is different from {@link #getMainDisplayAssignedToUser(int)}, which
     * returns a main display only.
     */
    public abstract @Nullable int[] getDisplaysAssignedToUser(@UserIdInt int userId);
Loading