Should check isDeviceSecure in shouldConfirmCredentials am: ae13e18c55

am: 4d4fe58a32

* commit '4d4fe58a329c73a9a97870577a145b0864203a64':
  Should check isDeviceSecure in shouldConfirmCredentials

Change-Id: I5ef98757b6aa411e4c2ab016cf22dd620f0fc3f1
This commit is contained in:
Tony Mak
2016-05-18 17:15:07 +00:00
committed by android-build-merger
2 changed files with 5 additions and 1 deletions

View File

@@ -620,6 +620,10 @@ class ActivityStarter {
.getSystemService(Context.KEYGUARD_SERVICE);
final Intent credential =
km.createConfirmDeviceCredentialIntent(null, null, userId);
// For safety, check null here in case users changed the setting after the checking.
if (credential == null) {
return;
}
final ActivityRecord activityRecord = targetStack.topRunningActivityLocked();
if (activityRecord != null) {
final IIntentSender target = mService.getIntentSenderLocked(

View File

@@ -1468,7 +1468,7 @@ final class UserController {
}
final KeyguardManager km = (KeyguardManager) mService.mContext
.getSystemService(KEYGUARD_SERVICE);
return km.isDeviceLocked(userId);
return km.isDeviceLocked(userId) && km.isDeviceSecure(userId);
}
boolean isLockScreenDisabled(@UserIdInt int userId) {