Refactor Choose/Confirm Lock flow to take user id

This is a first step to allow this flow to be reused for setting
a work profile-specific lock, to be used with the work challenge.

Change-Id: Iaa65fdab9021cda5f0a1d3bc526a6b54f8a7dd16
This commit is contained in:
Clara Bayarri
2015-10-12 12:07:02 +01:00
parent 39b467482d
commit fe432e838e
9 changed files with 166 additions and 70 deletions

View File

@@ -120,7 +120,7 @@ public class SetupChooseLockGeneric extends ChooseLockGeneric {
@Override
protected Intent getLockPasswordIntent(Context context, int quality,
int minLength, final int maxLength,
boolean requirePasswordToDecrypt, boolean confirmCredentials) {
boolean requirePasswordToDecrypt, boolean confirmCredentials, int userId) {
final Intent intent = SetupChooseLockPassword.createIntent(context, quality, minLength,
maxLength, requirePasswordToDecrypt, confirmCredentials);
SetupWizardUtils.copySetupExtras(getActivity().getIntent(), intent);
@@ -130,7 +130,7 @@ public class SetupChooseLockGeneric extends ChooseLockGeneric {
@Override
protected Intent getLockPasswordIntent(Context context, int quality,
int minLength, final int maxLength,
boolean requirePasswordToDecrypt, long challenge) {
boolean requirePasswordToDecrypt, long challenge, int userId) {
final Intent intent = SetupChooseLockPassword.createIntent(context, quality, minLength,
maxLength, requirePasswordToDecrypt, challenge);
SetupWizardUtils.copySetupExtras(getActivity().getIntent(), intent);
@@ -139,7 +139,7 @@ public class SetupChooseLockGeneric extends ChooseLockGeneric {
@Override
protected Intent getLockPasswordIntent(Context context, int quality, int minLength,
final int maxLength, boolean requirePasswordToDecrypt, String password) {
int maxLength, boolean requirePasswordToDecrypt, String password, int userId) {
final Intent intent = SetupChooseLockPassword.createIntent(context, quality, minLength,
maxLength, requirePasswordToDecrypt, password);
SetupWizardUtils.copySetupExtras(getActivity().getIntent(), intent);
@@ -148,7 +148,7 @@ public class SetupChooseLockGeneric extends ChooseLockGeneric {
@Override
protected Intent getLockPatternIntent(Context context, final boolean requirePassword,
final boolean confirmCredentials) {
final boolean confirmCredentials, int userId) {
final Intent intent = SetupChooseLockPattern.createIntent(context, requirePassword,
confirmCredentials);
SetupWizardUtils.copySetupExtras(getActivity().getIntent(), intent);
@@ -157,7 +157,7 @@ public class SetupChooseLockGeneric extends ChooseLockGeneric {
@Override
protected Intent getLockPatternIntent(Context context, final boolean requirePassword,
long challenge) {
long challenge, int userId) {
final Intent intent = SetupChooseLockPattern.createIntent(context, requirePassword,
challenge);
SetupWizardUtils.copySetupExtras(getActivity().getIntent(), intent);
@@ -166,7 +166,7 @@ public class SetupChooseLockGeneric extends ChooseLockGeneric {
@Override
protected Intent getLockPatternIntent(Context context, final boolean requirePassword,
final String pattern) {
final String pattern, int userId) {
final Intent intent = SetupChooseLockPattern.createIntent(context, requirePassword,
pattern);
SetupWizardUtils.copySetupExtras(getActivity().getIntent(), intent);