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

Commit c9fa1a01 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge changes from topic "presubmit-am-69008cfea6c94780a0c9a9e956ead727" into...

Merge changes from topic "presubmit-am-69008cfea6c94780a0c9a9e956ead727" into tm-mainline-prod am: 485bfa10

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17539524



Change-Id: I23cd19c7ba63a21a9530aceb5082d93a821ea675
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents ebed69a5 485bfa10
Loading
Loading
Loading
Loading
+5 −9
Original line number Diff line number Diff line
@@ -74,15 +74,11 @@ public class AvailableVirtualKeyboardFragment extends DashboardFragment
        final Context newUserAwareContext;
        switch (profileType) {
            case ProfileSelectFragment.ProfileType.WORK: {
                final UserHandle workUser;
                if (currentUserId == UserHandle.MIN_SECONDARY_USER_ID) {
                    newUserId = currentUserId;
                    workUser = UserHandle.of(currentUserId);
                } else {
                    newUserId = Utils.getManagedProfileId(userManager, currentUserId);
                    workUser = Utils.getManagedProfile(userManager);
                }
                newUserAwareContext = context.createContextAsUser(workUser, 0);
                // If the user is a managed profile user, use currentUserId directly. Or get the
                // managed profile userId instead.
                newUserId = userManager.isManagedProfile()
                        ? currentUserId : Utils.getManagedProfileId(userManager, currentUserId);
                newUserAwareContext = context.createContextAsUser(UserHandle.of(newUserId), 0);
                break;
            }
            case ProfileSelectFragment.ProfileType.PERSONAL: {