Make ChooseLockGeneric read the userId extra from the activitie's extras if there's no arguments

Some invocations of ChooseLockGeneric are done with arguments, but
when invoking it from FingerprintEnrollIntroduction we add the extra
to the activity intent so we need to support both.

Bug: 26901625
Change-Id: Iaabad18bf17160578f6b6d807dc6acfead1ba419
This commit is contained in:
Clara Bayarri
2016-02-05 17:37:02 +00:00
parent 719668508a
commit 7f2a013619

View File

@@ -180,7 +180,9 @@ public class ChooseLockGeneric extends SettingsActivity {
!mLockPatternUtils.isSeparateProfileChallengeAllowed(targetUser)) {
// Always use parent if explicitely requested or if profile challenge is not
// supported
mUserId = Utils.getUserIdFromBundle(getContext(), getArguments());
Bundle arguments = getArguments();
mUserId = Utils.getUserIdFromBundle(getContext(), arguments != null ? arguments
: getActivity().getIntent().getExtras());
} else {
mUserId = targetUser;
}