Merge "Pass CDC text as credential-only to BiometricPrompt"
This commit is contained in:
committed by
Android (Google) Code Review
commit
0802552947
@@ -130,8 +130,12 @@ public class BiometricFragment extends InstrumentedFragment {
|
|||||||
.setDeviceCredentialAllowed(true)
|
.setDeviceCredentialAllowed(true)
|
||||||
.setSubtitle(mBundle.getString(BiometricPrompt.KEY_SUBTITLE))
|
.setSubtitle(mBundle.getString(BiometricPrompt.KEY_SUBTITLE))
|
||||||
.setDescription(mBundle.getString(BiometricPrompt.KEY_DESCRIPTION))
|
.setDescription(mBundle.getString(BiometricPrompt.KEY_DESCRIPTION))
|
||||||
.setConfirmationRequired(
|
.setTextForDeviceCredential(
|
||||||
mBundle.getBoolean(BiometricPrompt.KEY_REQUIRE_CONFIRMATION, true))
|
mBundle.getCharSequence(BiometricPrompt.KEY_DEVICE_CREDENTIAL_TITLE),
|
||||||
|
mBundle.getCharSequence(BiometricPrompt.KEY_DEVICE_CREDENTIAL_SUBTITLE),
|
||||||
|
mBundle.getCharSequence(BiometricPrompt.KEY_DEVICE_CREDENTIAL_DESCRIPTION))
|
||||||
|
.setConfirmationRequired(mBundle.getBoolean(
|
||||||
|
BiometricPrompt.KEY_REQUIRE_CONFIRMATION, true))
|
||||||
.setDisallowBiometricsIfPolicyExists(mBundle.getBoolean(
|
.setDisallowBiometricsIfPolicyExists(mBundle.getBoolean(
|
||||||
BiometricPrompt.EXTRA_DISALLOW_BIOMETRICS_IF_POLICY_EXISTS, false));
|
BiometricPrompt.EXTRA_DISALLOW_BIOMETRICS_IF_POLICY_EXISTS, false));
|
||||||
|
|
||||||
|
@@ -182,14 +182,7 @@ public class ConfirmDeviceCredentialActivity extends FragmentActivity {
|
|||||||
if ((mTitle == null) && isManagedProfile) {
|
if ((mTitle == null) && isManagedProfile) {
|
||||||
mTitle = getTitleFromOrganizationName(mUserId);
|
mTitle = getTitleFromOrganizationName(mUserId);
|
||||||
}
|
}
|
||||||
final @LockPatternUtils.CredentialType int credentialType = Utils.getCredentialType(
|
|
||||||
mContext, effectiveUserId);
|
|
||||||
if (mTitle == null) {
|
|
||||||
mTitle = getTitleFromCredentialType(credentialType, isManagedProfile);
|
|
||||||
}
|
|
||||||
if (mDetails == null) {
|
|
||||||
mDetails = getDetailsFromCredentialType(credentialType, isManagedProfile);
|
|
||||||
}
|
|
||||||
|
|
||||||
mChooseLockSettingsHelper = new ChooseLockSettingsHelper(this);
|
mChooseLockSettingsHelper = new ChooseLockSettingsHelper(this);
|
||||||
final LockPatternUtils lockPatternUtils = new LockPatternUtils(this);
|
final LockPatternUtils lockPatternUtils = new LockPatternUtils(this);
|
||||||
@@ -200,6 +193,17 @@ public class ConfirmDeviceCredentialActivity extends FragmentActivity {
|
|||||||
bpBundle.putBoolean(BiometricPrompt.EXTRA_DISALLOW_BIOMETRICS_IF_POLICY_EXISTS,
|
bpBundle.putBoolean(BiometricPrompt.EXTRA_DISALLOW_BIOMETRICS_IF_POLICY_EXISTS,
|
||||||
mCheckDevicePolicyManager);
|
mCheckDevicePolicyManager);
|
||||||
|
|
||||||
|
final @LockPatternUtils.CredentialType int credentialType = Utils.getCredentialType(
|
||||||
|
mContext, effectiveUserId);
|
||||||
|
if (mTitle == null) {
|
||||||
|
bpBundle.putString(BiometricPrompt.KEY_DEVICE_CREDENTIAL_TITLE,
|
||||||
|
getTitleFromCredentialType(credentialType, isManagedProfile));
|
||||||
|
}
|
||||||
|
if (mDetails == null) {
|
||||||
|
bpBundle.putString(BiometricPrompt.KEY_DEVICE_CREDENTIAL_DESCRIPTION,
|
||||||
|
getDetailsFromCredentialType(credentialType, isManagedProfile));
|
||||||
|
}
|
||||||
|
|
||||||
boolean launchedBiometric = false;
|
boolean launchedBiometric = false;
|
||||||
boolean launchedCDC = false;
|
boolean launchedCDC = false;
|
||||||
// If the target is a managed user and user key not unlocked yet, we will force unlock
|
// If the target is a managed user and user key not unlocked yet, we will force unlock
|
||||||
|
Reference in New Issue
Block a user