From a23f9a69e00435334c09aacd0877347fa856708e Mon Sep 17 00:00:00 2001 From: Nan Wu Date: Mon, 8 May 2023 18:00:14 +0000 Subject: [PATCH] Allow BAL for confirm device credential activity when work profile apps are protected by PIN prompt. Test: manual test Bug: 279889563 Change-Id: Ife319469cee908f54618986107b40bcc82886b06 --- .../settings/password/ConfirmDeviceCredentialUtils.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/com/android/settings/password/ConfirmDeviceCredentialUtils.java b/src/com/android/settings/password/ConfirmDeviceCredentialUtils.java index 26c877fb10b..4778c03f9f8 100644 --- a/src/com/android/settings/password/ConfirmDeviceCredentialUtils.java +++ b/src/com/android/settings/password/ConfirmDeviceCredentialUtils.java @@ -52,7 +52,12 @@ public class ConfirmDeviceCredentialUtils { IntentSender intentSender = activity.getIntent().getParcelableExtra(Intent.EXTRA_INTENT); if (intentSender != null) { try { - activity.startIntentSenderForResult(intentSender, -1, null, 0, 0, 0); + ActivityOptions activityOptions = + ActivityOptions.makeBasic() + .setPendingIntentBackgroundActivityStartMode( + ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED); + activity.startIntentSenderForResult(intentSender, -1, null, 0, 0, 0, + activityOptions.toBundle()); } catch (IntentSender.SendIntentException e) { /* ignore */ }