Loading core/java/com/android/internal/widget/LockPatternUtils.java +6 −7 Original line number Diff line number Diff line Loading @@ -1174,7 +1174,7 @@ public class LockPatternUtils { * @param userId either an explicit user id or {@link android.os.UserHandle#USER_ALL} */ public void requireCredentialEntry(int userId) { requireStrongAuth(StrongAuthTracker.SOME_AUTH_REQUIRED_AFTER_USER_REQUEST, userId); requireStrongAuth(StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_USER_REQUEST, userId); } /** Loading Loading @@ -1251,7 +1251,7 @@ public class LockPatternUtils { value = { STRONG_AUTH_NOT_REQUIRED, STRONG_AUTH_REQUIRED_AFTER_BOOT, STRONG_AUTH_REQUIRED_AFTER_DPM_LOCK_NOW, SOME_AUTH_REQUIRED_AFTER_USER_REQUEST}) STRONG_AUTH_REQUIRED_AFTER_USER_REQUEST}) @Retention(RetentionPolicy.SOURCE) public @interface StrongAuthFlags {} Loading @@ -1266,14 +1266,14 @@ public class LockPatternUtils { public static final int STRONG_AUTH_REQUIRED_AFTER_BOOT = 0x1; /** * Strong authentication is required because a device admin has requested it. * Strong authentication is required because a device admin has temporarily requested it. */ public static final int STRONG_AUTH_REQUIRED_AFTER_DPM_LOCK_NOW = 0x2; /** * Some authentication is required because the user has temporarily disabled trust. * Strong authentication is required because the user has temporarily requested it. */ public static final int SOME_AUTH_REQUIRED_AFTER_USER_REQUEST = 0x4; public static final int STRONG_AUTH_REQUIRED_AFTER_USER_REQUEST = 0x4; /** * Strong authentication is required because the user has been locked out after too many Loading @@ -1282,7 +1282,6 @@ public class LockPatternUtils { public static final int STRONG_AUTH_REQUIRED_AFTER_LOCKOUT = 0x8; public static final int DEFAULT = STRONG_AUTH_REQUIRED_AFTER_BOOT; private static final int ALLOWING_FINGERPRINT = SOME_AUTH_REQUIRED_AFTER_USER_REQUEST; final SparseIntArray mStrongAuthRequiredForUser = new SparseIntArray(); Loading Loading @@ -1324,7 +1323,7 @@ public class LockPatternUtils { * current strong authentication requirements. */ public boolean isFingerprintAllowedForUser(int userId) { return (getStrongAuthForUser(userId) & ~ALLOWING_FINGERPRINT) == 0; return getStrongAuthForUser(userId) == STRONG_AUTH_NOT_REQUIRED; } /** Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java +5 −2 Original line number Diff line number Diff line Loading @@ -166,10 +166,13 @@ public class LockIcon extends KeyguardAffordanceView { if (mAccessibilityController == null) { return; } boolean trustManagedOrFingerprintAllowed = mUnlockMethodCache.isTrustManaged() || KeyguardUpdateMonitor.getInstance(mContext).isUnlockingWithFingerprintAllowed(); boolean clickToUnlock = mAccessibilityController.isTouchExplorationEnabled(); boolean clickToForceLock = mUnlockMethodCache.isTrustManaged() boolean clickToForceLock = trustManagedOrFingerprintAllowed && !mAccessibilityController.isAccessibilityEnabled(); boolean longClickToForceLock = mUnlockMethodCache.isTrustManaged() boolean longClickToForceLock = trustManagedOrFingerprintAllowed && !clickToForceLock; setClickable(clickToForceLock || clickToUnlock); setLongClickable(longClickToForceLock); Loading Loading
core/java/com/android/internal/widget/LockPatternUtils.java +6 −7 Original line number Diff line number Diff line Loading @@ -1174,7 +1174,7 @@ public class LockPatternUtils { * @param userId either an explicit user id or {@link android.os.UserHandle#USER_ALL} */ public void requireCredentialEntry(int userId) { requireStrongAuth(StrongAuthTracker.SOME_AUTH_REQUIRED_AFTER_USER_REQUEST, userId); requireStrongAuth(StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_USER_REQUEST, userId); } /** Loading Loading @@ -1251,7 +1251,7 @@ public class LockPatternUtils { value = { STRONG_AUTH_NOT_REQUIRED, STRONG_AUTH_REQUIRED_AFTER_BOOT, STRONG_AUTH_REQUIRED_AFTER_DPM_LOCK_NOW, SOME_AUTH_REQUIRED_AFTER_USER_REQUEST}) STRONG_AUTH_REQUIRED_AFTER_USER_REQUEST}) @Retention(RetentionPolicy.SOURCE) public @interface StrongAuthFlags {} Loading @@ -1266,14 +1266,14 @@ public class LockPatternUtils { public static final int STRONG_AUTH_REQUIRED_AFTER_BOOT = 0x1; /** * Strong authentication is required because a device admin has requested it. * Strong authentication is required because a device admin has temporarily requested it. */ public static final int STRONG_AUTH_REQUIRED_AFTER_DPM_LOCK_NOW = 0x2; /** * Some authentication is required because the user has temporarily disabled trust. * Strong authentication is required because the user has temporarily requested it. */ public static final int SOME_AUTH_REQUIRED_AFTER_USER_REQUEST = 0x4; public static final int STRONG_AUTH_REQUIRED_AFTER_USER_REQUEST = 0x4; /** * Strong authentication is required because the user has been locked out after too many Loading @@ -1282,7 +1282,6 @@ public class LockPatternUtils { public static final int STRONG_AUTH_REQUIRED_AFTER_LOCKOUT = 0x8; public static final int DEFAULT = STRONG_AUTH_REQUIRED_AFTER_BOOT; private static final int ALLOWING_FINGERPRINT = SOME_AUTH_REQUIRED_AFTER_USER_REQUEST; final SparseIntArray mStrongAuthRequiredForUser = new SparseIntArray(); Loading Loading @@ -1324,7 +1323,7 @@ public class LockPatternUtils { * current strong authentication requirements. */ public boolean isFingerprintAllowedForUser(int userId) { return (getStrongAuthForUser(userId) & ~ALLOWING_FINGERPRINT) == 0; return getStrongAuthForUser(userId) == STRONG_AUTH_NOT_REQUIRED; } /** Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java +5 −2 Original line number Diff line number Diff line Loading @@ -166,10 +166,13 @@ public class LockIcon extends KeyguardAffordanceView { if (mAccessibilityController == null) { return; } boolean trustManagedOrFingerprintAllowed = mUnlockMethodCache.isTrustManaged() || KeyguardUpdateMonitor.getInstance(mContext).isUnlockingWithFingerprintAllowed(); boolean clickToUnlock = mAccessibilityController.isTouchExplorationEnabled(); boolean clickToForceLock = mUnlockMethodCache.isTrustManaged() boolean clickToForceLock = trustManagedOrFingerprintAllowed && !mAccessibilityController.isAccessibilityEnabled(); boolean longClickToForceLock = mUnlockMethodCache.isTrustManaged() boolean longClickToForceLock = trustManagedOrFingerprintAllowed && !clickToForceLock; setClickable(clickToForceLock || clickToUnlock); setLongClickable(longClickToForceLock); Loading