Merge "Use userHandle not credentialOwnerUserId to check if it needs to show lock" into nyc-dev

This commit is contained in:
Ricky Wai
2016-05-11 17:50:32 +00:00
committed by Android (Google) Code Review

View File

@@ -694,9 +694,8 @@ public class UserManagerService extends IUserManager.Stub {
@Override @Override
public boolean trySetQuietModeDisabled(int userHandle, IntentSender target) { public boolean trySetQuietModeDisabled(int userHandle, IntentSender target) {
final int credentialOwnerUserId = getCredentialOwnerProfile(userHandle);
if (StorageManager.isUserKeyUnlocked(userHandle) if (StorageManager.isUserKeyUnlocked(userHandle)
|| !mLockPatternUtils.isSecure(credentialOwnerUserId)) { || !mLockPatternUtils.isSecure(userHandle)) {
// if the user is already unlocked, no need to show a profile challenge // if the user is already unlocked, no need to show a profile challenge
setQuietModeEnabled(userHandle, false); setQuietModeEnabled(userHandle, false);
return true; return true;