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

@@ -113,7 +113,9 @@ public class ConfirmLockPattern extends ConfirmDeviceCredentialBaseActivity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mLockPatternUtils = new LockPatternUtils(getActivity());
mEffectiveUserId = Utils.getEffectiveUserId(getActivity());
Intent intent = getActivity().getIntent();
// Only take this argument into account if it belongs to the current profile.
mEffectiveUserId = Utils.getSameOwnerUserId(getActivity(), intent.getExtras());
}
@Override