Require explicit userId in LockPatternUtils

Bug: 18931518
Change-Id: Ie2faa18918aaadf17a84287898438549a693b0cc
This commit is contained in:
Adrian Roos
2015-04-16 17:11:22 -07:00
parent bc95630994
commit 5437588abd
18 changed files with 112 additions and 69 deletions

View File

@@ -21,6 +21,7 @@ import android.app.Activity;
import android.app.Fragment;
import android.app.admin.DevicePolicyManager;
import android.content.Intent;
import android.os.UserHandle;
import com.android.internal.widget.LockPatternUtils;
@@ -116,7 +117,7 @@ public final class ChooseLockSettingsHelper {
boolean returnCredentials, boolean external, boolean hasChallenge,
long challenge) {
boolean launched = false;
switch (mLockPatternUtils.getKeyguardStoredPasswordQuality()) {
switch (mLockPatternUtils.getKeyguardStoredPasswordQuality(UserHandle.myUserId())) {
case DevicePolicyManager.PASSWORD_QUALITY_SOMETHING:
launched = launchConfirmationActivity(request, title, header, description,
returnCredentials || hasChallenge