Show confirm credential activity on parent when unpausing work.

This fixes an issue affecting HSUM where the credential activity
was shown on user 0 rather than on the parent of the profile.

Bug: 272704160
Test: manual, flash and test unpausing profile
Change-Id: I97f4ecea33933fe7c404330a056cb274cfc1ed0a
This commit is contained in:
Oli Lan
2023-03-13 17:21:05 +00:00
parent b736edc255
commit f3ad58a060

View File

@@ -1495,7 +1495,8 @@ public class UserManagerService extends IUserManager.Stub {
// intentSender
unlockIntent.putExtra(Intent.EXTRA_INTENT, pendingIntent.getIntentSender());
unlockIntent.setFlags(FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
mContext.startActivity(unlockIntent);
mContext.startActivityAsUser(
unlockIntent, UserHandle.of(getProfileParentIdUnchecked(userId)));
}
@Override