Default setup wizard to use PIN
- Added "Screen lock options" button in PIN screen, controlled by extra EXTRA_SHOW_OPTIONS_BUTTON, which will create a dialog to ask the user to choose another screen lock type. - Extracted ScreenLockType enum and ChooseLockGenericController that can be shared by ChooseLockGeneric and the dialog ChooseLockTypeDialogFragment. - The intent extra EXTRA_SHOW_OPTIONS_BUTTON will be set if ChooseLockGeneric screen starts ChooseLockPassword / ChooseLockPattern without asking the user. (Although the extra is ignored by ChooseLockPattern currently) - Fix layout alignment for the password entry field to remove the extra 4dp padding on the sides. Test: cd tests/robotests && mma Bug: 35442933 Bug: 38002299 Change-Id: I877fbe08a0c05bb97175e1cbf0260ea6dbda22e2
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
package com.android.settings.fingerprint;
|
||||
|
||||
import android.app.KeyguardManager;
|
||||
import android.app.admin.DevicePolicyManager;
|
||||
import android.content.Intent;
|
||||
import android.content.res.Resources;
|
||||
import android.os.UserHandle;
|
||||
@@ -27,13 +28,19 @@ import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
|
||||
import com.android.internal.widget.LockPatternUtils;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.SetupWizardUtils;
|
||||
import com.android.settings.password.ChooseLockGeneric;
|
||||
import com.android.settings.password.ChooseLockGeneric.ChooseLockGenericFragment;
|
||||
import com.android.settings.password.SetupChooseLockGeneric;
|
||||
|
||||
public class SetupFingerprintEnrollIntroduction extends FingerprintEnrollIntroduction {
|
||||
|
||||
@Override
|
||||
protected Intent getChooseLockIntent() {
|
||||
Intent intent = new Intent(this, SetupChooseLockGeneric.class);
|
||||
Intent intent = new Intent(this, SetupChooseLockGeneric.class)
|
||||
.putExtra(
|
||||
LockPatternUtils.PASSWORD_TYPE_KEY,
|
||||
DevicePolicyManager.PASSWORD_QUALITY_NUMERIC);
|
||||
intent.putExtra(ChooseLockGenericFragment.EXTRA_SHOW_OPTIONS_BUTTON, true);
|
||||
SetupWizardUtils.copySetupExtras(getIntent(), intent);
|
||||
return intent;
|
||||
}
|
||||
|
Reference in New Issue
Block a user