Should check isDeviceSecure in shouldConfirmCredentials
am: ae13e18c55
* commit 'ae13e18c5561537e062f46ddda8e5dff30d1fe26':
Should check isDeviceSecure in shouldConfirmCredentials
Change-Id: I13eccf4447ba9eccc1e9be2e9e8d3b33a9df0ee2
This commit is contained in:
@@ -620,6 +620,10 @@ class ActivityStarter {
|
|||||||
.getSystemService(Context.KEYGUARD_SERVICE);
|
.getSystemService(Context.KEYGUARD_SERVICE);
|
||||||
final Intent credential =
|
final Intent credential =
|
||||||
km.createConfirmDeviceCredentialIntent(null, null, userId);
|
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();
|
final ActivityRecord activityRecord = targetStack.topRunningActivityLocked();
|
||||||
if (activityRecord != null) {
|
if (activityRecord != null) {
|
||||||
final IIntentSender target = mService.getIntentSenderLocked(
|
final IIntentSender target = mService.getIntentSenderLocked(
|
||||||
|
|||||||
@@ -1468,7 +1468,7 @@ final class UserController {
|
|||||||
}
|
}
|
||||||
final KeyguardManager km = (KeyguardManager) mService.mContext
|
final KeyguardManager km = (KeyguardManager) mService.mContext
|
||||||
.getSystemService(KEYGUARD_SERVICE);
|
.getSystemService(KEYGUARD_SERVICE);
|
||||||
return km.isDeviceLocked(userId);
|
return km.isDeviceLocked(userId) && km.isDeviceSecure(userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean isLockScreenDisabled(@UserIdInt int userId) {
|
boolean isLockScreenDisabled(@UserIdInt int userId) {
|
||||||
|
|||||||
Reference in New Issue
Block a user