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:
@@ -18,6 +18,8 @@ package com.android.settings.password;
|
||||
|
||||
import static android.content.res.Configuration.ORIENTATION_LANDSCAPE;
|
||||
|
||||
import static com.android.internal.widget.LockPatternUtils.CREDENTIAL_TYPE_PATTERN;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
@@ -32,6 +34,8 @@ import androidx.fragment.app.Fragment;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.SetupRedactionInterstitial;
|
||||
|
||||
import com.google.android.setupcompat.util.WizardManagerHelper;
|
||||
|
||||
/**
|
||||
* Setup Wizard's version of ChooseLockPattern screen. It inherits the logic and basic structure
|
||||
* from ChooseLockPattern class, and should remain similar to that behaviorally. This class should
|
||||
@@ -101,14 +105,13 @@ public class SetupChooseLockPattern extends ChooseLockPattern {
|
||||
.getBooleanExtra(ChooseLockSettingsHelper.EXTRA_KEY_FOR_FACE, false);
|
||||
final boolean forBiometrics = intent
|
||||
.getBooleanExtra(ChooseLockSettingsHelper.EXTRA_KEY_FOR_BIOMETRICS, false);
|
||||
|
||||
final SetupSkipDialog dialog = SetupSkipDialog.newInstance(
|
||||
CREDENTIAL_TYPE_PATTERN,
|
||||
frpSupported,
|
||||
/* isPatternMode= */ true,
|
||||
/* isAlphaMode= */ false,
|
||||
forFingerprint,
|
||||
forFace,
|
||||
forBiometrics);
|
||||
forBiometrics,
|
||||
WizardManagerHelper.isAnySetupWizard(intent));
|
||||
dialog.show(getFragmentManager());
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user