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

Commit 7a0b594e authored by Adam Bookatz's avatar Adam Bookatz Committed by Android (Google) Code Review
Browse files

Merge "UM.getUserHandle -> UM.getProcessUserId"

parents d4dfcb37 010d64fa
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1742,7 +1742,7 @@ public class CallLog {
            Uri result = null;

            final UserManager userManager = context.getSystemService(UserManager.class);
            final int currentUserId = userManager.getUserHandle();
            final int currentUserId = userManager.getProcessUserId();

            if (params.mAddForAllUsers) {
                if (userManager.isUserUnlocked(UserHandle.SYSTEM)) {
+1 −1
Original line number Diff line number Diff line
@@ -295,7 +295,7 @@ public class PipController implements PipTransitionController.PipTransitionCallb
            ShellExecutor mainExecutor
    ) {
        // Ensure that we are the primary user's SystemUI.
        final int processUser = UserManager.get(context).getUserHandle();
        final int processUser = UserManager.get(context).getProcessUserId();
        if (processUser != UserHandle.USER_SYSTEM) {
            throw new IllegalStateException("Non-primary Pip component not currently supported.");
        }
+1 −1
Original line number Diff line number Diff line
@@ -102,7 +102,7 @@ public abstract class ActionDisabledLearnMoreButtonLauncher {
    protected boolean isSameProfileGroup(Context context, int enforcementAdminUserId) {
        UserManager um = context.getSystemService(UserManager.class);

        return um.isSameProfileGroup(enforcementAdminUserId, um.getUserHandle());
        return um.isSameProfileGroup(enforcementAdminUserId, um.getProcessUserId());
    }

    private boolean isEnforcedByDeviceOwnerOnSystemUserMode(
+1 −1
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ public final class ActionDisabledLearnMoreButtonLauncherTest {
    @Before
    public void setUp() {
        when(mContext.getUserId()).thenReturn(CONTEXT_USER_ID);
        when(mUserManager.getUserHandle()).thenReturn(CONTEXT_USER_ID);
        when(mUserManager.getProcessUserId()).thenReturn(CONTEXT_USER_ID);
        when(mContext.getSystemService(DevicePolicyManager.class)).thenReturn(mDevicePolicyManager);
        when(mContext.getSystemService(UserManager.class)).thenReturn(mUserManager);
    }
+1 −1
Original line number Diff line number Diff line
@@ -91,7 +91,7 @@ class TaskSnapshotPersisterTestBase extends WindowTestsBase {
    @Before
    public void setUp() {
        final UserManager um = UserManager.get(getInstrumentation().getTargetContext());
        mTestUserId = um.getUserHandle();
        mTestUserId = um.getProcessUserId();

        final UserManagerInternal userManagerInternal =
                LocalServices.getService(UserManagerInternal.class);
Loading