Refine SkipDialog title and desc by device configs

1. Wrap isFaceSupportedInSUW() in Settings Utils
2. Wrap getCombinedScreenLockOptions in Settings Utils
3. Add EXTRA_KEY_FOR_SUW to judge if in SUW flow
4. Refactor SetupSkipDialog by hasFace, hasFingerprint,
   isSuw, isFaceSupported conditions
5. Clean up the mapping logic of SetupSkipDialog
6. Replace bools with @LockPatternUtils.CredentialType
7. Refine the logic for isFaceSupported
   ---------------------------------------
   Config |SuwSupportFace|!SuwSupportFace|
    isSuw |    true      |      false    |
   !isSuw |   hasFace    |     hasFace   |

Bug: 263070591
Bug: 279389803
Bug: 279195215
Test: adb shell am start -a android.settings.BIOMETRIC_ENROLL
Test: SUW(workprofile), post-SUW
Test: m RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.password
Test: m RunSettingsRoboTests ROBOTEST_FILTER=SetupSkipDialogTest
Change-Id: Ie7af4299695dc3983b4190929b4dd659c301c082
This commit is contained in:
lbill
2023-04-21 10:21:07 +00:00
parent 5801e98d7f
commit 67d6dff7cc
13 changed files with 359 additions and 201 deletions

View File

@@ -64,6 +64,8 @@ public final class ChooseLockSettingsHelper {
public static final String EXTRA_KEY_FOR_FACE = "for_face";
// For the paths where multiple biometric sensors exist
public static final String EXTRA_KEY_FOR_BIOMETRICS = "for_biometrics";
// For the paths where setup biometrics in suw flow
public static final String EXTRA_KEY_IS_SUW = "is_suw";
public static final String EXTRA_KEY_FOREGROUND_ONLY = "foreground_only";
public static final String EXTRA_KEY_REQUEST_GK_PW_HANDLE = "request_gk_pw_handle";
// Gatekeeper password handle, which can subsequently be used to generate Gatekeeper