Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ebe5cf22 authored by Tony Mak's avatar Tony Mak Committed by android-build-merger
Browse files

Should check isDeviceSecure in shouldConfirmCredentials am: ae13e18c am: d918a778

am: b008d581

* commit 'b008d581':
  Should check isDeviceSecure in shouldConfirmCredentials

Change-Id: Id3b0c0d4b1af8a63fb042f8106dc6b2d3926016c
parents 5f231e4d b008d581
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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(
+1 −1
Original line number Diff line number Diff line
@@ -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) {