Merge "Do not request confirmation by default for private space unlocks" into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
379a0af7b0
@@ -1262,6 +1262,8 @@
|
|||||||
<string name="private_space_face_settings_require_attention_details">To unlock private space, your eyes must be open. For best results, take off sunglasses.</string>
|
<string name="private_space_face_settings_require_attention_details">To unlock private space, your eyes must be open. For best results, take off sunglasses.</string>
|
||||||
<!-- Text shown in face settings in private space explaining what your face can be used for. [CHAR LIMIT=NONE] -->
|
<!-- Text shown in face settings in private space explaining what your face can be used for. [CHAR LIMIT=NONE] -->
|
||||||
<string name="private_space_face_settings_footer">Use your face to unlock your private space.\n\nKeep in mind:\nYou can only have one face set up at a time. To add another face, delete the current one.\n\nLooking at the phone can unlock it when you don\u2019t intend to.\n\nYour private space can be unlocked by someone else if your device is held up to your face.\n\nYour private space can be unlocked by someone who looks a lot like you, like an identical sibling.</string>
|
<string name="private_space_face_settings_footer">Use your face to unlock your private space.\n\nKeep in mind:\nYou can only have one face set up at a time. To add another face, delete the current one.\n\nLooking at the phone can unlock it when you don\u2019t intend to.\n\nYour private space can be unlocked by someone else if your device is held up to your face.\n\nYour private space can be unlocked by someone who looks a lot like you, like an identical sibling.</string>
|
||||||
|
<!-- Text shown on the details of a toggle which enables/disables confirmation (i.e. confirm button) each time face unlock is used for private space. [CHAR LIMIT=90] -->
|
||||||
|
<string name="private_space_face_settings_require_confirmation_details">When using Face Unlock, always require confirmation step</string>
|
||||||
<!-- Biometric category title - biometric options for unlocking the device. [CHAR LIMIT=50] -->
|
<!-- Biometric category title - biometric options for unlocking the device. [CHAR LIMIT=50] -->
|
||||||
<string name="private_space_category_ways_to_unlock">Ways to unlock</string>
|
<string name="private_space_category_ways_to_unlock">Ways to unlock</string>
|
||||||
<!-- Summary for one lock when device screen lock is used as private profile lock. [CHAR LIMIT=40] -->
|
<!-- Summary for one lock when device screen lock is used as private profile lock. [CHAR LIMIT=40] -->
|
||||||
|
@@ -26,6 +26,7 @@ import android.provider.Settings;
|
|||||||
|
|
||||||
import androidx.preference.Preference;
|
import androidx.preference.Preference;
|
||||||
|
|
||||||
|
import com.android.settings.R;
|
||||||
import com.android.settings.Utils;
|
import com.android.settings.Utils;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -76,6 +77,11 @@ public class FaceSettingsConfirmPreferenceController extends FaceSettingsPrefere
|
|||||||
preference.setEnabled(false);
|
preference.setEnabled(false);
|
||||||
} else {
|
} else {
|
||||||
preference.setEnabled(true);
|
preference.setEnabled(true);
|
||||||
|
// Update summary for private space face settings toggle
|
||||||
|
if (Utils.isPrivateProfile(getUserId(), mContext)) {
|
||||||
|
preference.setSummary(mContext.getString(
|
||||||
|
R.string.private_space_face_settings_require_confirmation_details));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -313,7 +313,7 @@ public class ConfirmDeviceCredentialActivity extends FragmentActivity {
|
|||||||
mForceVerifyPath = userProperties.isCredentialShareableWithParent();
|
mForceVerifyPath = userProperties.isCredentialShareableWithParent();
|
||||||
if (android.multiuser.Flags.enableBiometricsToUnlockPrivateSpace()
|
if (android.multiuser.Flags.enableBiometricsToUnlockPrivateSpace()
|
||||||
&& isBiometricAllowed(effectiveUserId, mUserId)) {
|
&& isBiometricAllowed(effectiveUserId, mUserId)) {
|
||||||
promptInfo.setUseParentProfileForDeviceCredential(true);
|
setBiometricPromptPropertiesForPrivateProfile(promptInfo);
|
||||||
showBiometricPrompt(promptInfo, effectiveUserId);
|
showBiometricPrompt(promptInfo, effectiveUserId);
|
||||||
launchedBiometric = true;
|
launchedBiometric = true;
|
||||||
} else {
|
} else {
|
||||||
@@ -344,6 +344,11 @@ public class ConfirmDeviceCredentialActivity extends FragmentActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void setBiometricPromptPropertiesForPrivateProfile(PromptInfo promptInfo) {
|
||||||
|
promptInfo.setUseParentProfileForDeviceCredential(true);
|
||||||
|
promptInfo.setConfirmationRequested(false);
|
||||||
|
}
|
||||||
|
|
||||||
private String getTitleFromCredentialType(@LockPatternUtils.CredentialType int credentialType,
|
private String getTitleFromCredentialType(@LockPatternUtils.CredentialType int credentialType,
|
||||||
boolean isEffectiveUserManagedProfile) {
|
boolean isEffectiveUserManagedProfile) {
|
||||||
switch (credentialType) {
|
switch (credentialType) {
|
||||||
|
Reference in New Issue
Block a user