Merge changes from topic "presubmit-am-69008cfea6c94780a0c9a9e956ead727" into tm-mainline-prod am: 485bfa10b7
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17539524 Change-Id: I23cd19c7ba63a21a9530aceb5082d93a821ea675 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -74,15 +74,11 @@ public class AvailableVirtualKeyboardFragment extends DashboardFragment
|
|||||||
final Context newUserAwareContext;
|
final Context newUserAwareContext;
|
||||||
switch (profileType) {
|
switch (profileType) {
|
||||||
case ProfileSelectFragment.ProfileType.WORK: {
|
case ProfileSelectFragment.ProfileType.WORK: {
|
||||||
final UserHandle workUser;
|
// If the user is a managed profile user, use currentUserId directly. Or get the
|
||||||
if (currentUserId == UserHandle.MIN_SECONDARY_USER_ID) {
|
// managed profile userId instead.
|
||||||
newUserId = currentUserId;
|
newUserId = userManager.isManagedProfile()
|
||||||
workUser = UserHandle.of(currentUserId);
|
? currentUserId : Utils.getManagedProfileId(userManager, currentUserId);
|
||||||
} else {
|
newUserAwareContext = context.createContextAsUser(UserHandle.of(newUserId), 0);
|
||||||
newUserId = Utils.getManagedProfileId(userManager, currentUserId);
|
|
||||||
workUser = Utils.getManagedProfile(userManager);
|
|
||||||
}
|
|
||||||
newUserAwareContext = context.createContextAsUser(workUser, 0);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ProfileSelectFragment.ProfileType.PERSONAL: {
|
case ProfileSelectFragment.ProfileType.PERSONAL: {
|
||||||
|
Reference in New Issue
Block a user