Add show emergency button call to biometric prompt
useDefaultSubtitle has to be set explicitly from promptInfo rather than being assumed true remove subtext for managed profile challenge screen to create space for emergency call button Test: manually tested Bug: 286391641 Bug: 286422726 Change-Id: I848e00dcd0013124e59ef711c3615e6773c3d210
This commit is contained in:
@@ -16,9 +16,6 @@
|
||||
|
||||
package com.android.settings;
|
||||
|
||||
import static android.app.admin.DevicePolicyResources.Strings.Settings.WORK_PROFILE_CONFIRM_PASSWORD;
|
||||
import static android.app.admin.DevicePolicyResources.Strings.Settings.WORK_PROFILE_CONFIRM_PATTERN;
|
||||
import static android.app.admin.DevicePolicyResources.Strings.Settings.WORK_PROFILE_CONFIRM_PIN;
|
||||
import static android.content.Intent.EXTRA_USER;
|
||||
import static android.content.Intent.EXTRA_USER_ID;
|
||||
import static android.text.format.DateUtils.FORMAT_ABBREV_MONTH;
|
||||
@@ -791,36 +788,15 @@ public final class Utils extends com.android.settingslib.Utils {
|
||||
@Nullable public static String getConfirmCredentialStringForUser(@NonNull Context context,
|
||||
int userId, @LockPatternUtils.CredentialType int credentialType) {
|
||||
final int effectiveUserId = UserManager.get(context).getCredentialOwnerProfile(userId);
|
||||
final boolean isEffectiveUserManagedProfile = UserManager.get(context)
|
||||
.isManagedProfile(effectiveUserId);
|
||||
final DevicePolicyManager devicePolicyManager = context
|
||||
.getSystemService(DevicePolicyManager.class);
|
||||
if (UserManager.get(context).isManagedProfile(effectiveUserId)) {
|
||||
return null;
|
||||
}
|
||||
switch (credentialType) {
|
||||
case LockPatternUtils.CREDENTIAL_TYPE_PIN:
|
||||
if (isEffectiveUserManagedProfile) {
|
||||
return devicePolicyManager.getResources().getString(WORK_PROFILE_CONFIRM_PIN,
|
||||
() -> context.getString(
|
||||
R.string.lockpassword_confirm_your_pin_generic_profile));
|
||||
}
|
||||
|
||||
return context.getString(R.string.lockpassword_confirm_your_pin_generic);
|
||||
case LockPatternUtils.CREDENTIAL_TYPE_PATTERN:
|
||||
if (isEffectiveUserManagedProfile) {
|
||||
return devicePolicyManager.getResources().getString(
|
||||
WORK_PROFILE_CONFIRM_PATTERN,
|
||||
() -> context.getString(
|
||||
R.string.lockpassword_confirm_your_pattern_generic_profile));
|
||||
}
|
||||
|
||||
return context.getString(R.string.lockpassword_confirm_your_pattern_generic);
|
||||
case LockPatternUtils.CREDENTIAL_TYPE_PASSWORD:
|
||||
if (isEffectiveUserManagedProfile) {
|
||||
return devicePolicyManager.getResources().getString(
|
||||
WORK_PROFILE_CONFIRM_PASSWORD,
|
||||
() -> context.getString(
|
||||
R.string.lockpassword_confirm_your_password_generic_profile));
|
||||
}
|
||||
|
||||
return context.getString(R.string.lockpassword_confirm_your_password_generic);
|
||||
}
|
||||
return null;
|
||||
|
Reference in New Issue
Block a user