Merge "Correctly unlock storage for work profiles with unified challenge" into main
diff --git a/src/com/android/settings/password/ConfirmDeviceCredentialActivity.java b/src/com/android/settings/password/ConfirmDeviceCredentialActivity.java
index cf80513..6a30ee7 100644
--- a/src/com/android/settings/password/ConfirmDeviceCredentialActivity.java
+++ b/src/com/android/settings/password/ConfirmDeviceCredentialActivity.java
@@ -278,7 +278,8 @@
.setRequestWriteRepairModePassword(true)
.setForceVerifyPath(true)
.show();
- } else if (isEffectiveUserManagedProfile && isInternalActivity()) {
+ } else if (mLockPatternUtils.isManagedProfileWithUnifiedChallenge(mUserId)
+ && isInternalActivity()) {
// When the mForceVerifyPath is set to true, we launch the real confirm credential
// activity with an explicit but fake challenge value (0L). This will result in
// ConfirmLockPassword calling verifyTiedProfileChallenge() (if it's a profile with