summaryrefslogtreecommitdiffstats
path: root/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java
diff options
context:
space:
mode:
authorAdrian Roos <roosa@google.com>2014-05-19 17:11:18 +0200
committerAdrian Roos <roosa@google.com>2014-05-19 17:11:18 +0200
commit336be7f7a499eec1acd90ab04d3e47d2789c8168 (patch)
tree631d73a55a616d119f25a35f283a312769f8f0cc /packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java
parenta76a150ff18c84db7736769b0476d90c9126a40a (diff)
downloadframeworks_base-336be7f7a499eec1acd90ab04d3e47d2789c8168.zip
frameworks_base-336be7f7a499eec1acd90ab04d3e47d2789c8168.tar.gz
frameworks_base-336be7f7a499eec1acd90ab04d3e47d2789c8168.tar.bz2
Improve trust handling on dimsissing keyguard
The check for whether the device is in trusted mode happened at the wrong time previously. Now it is checked when trying to dismiss the keyguard. Bug: 15072996 Change-Id: I81a3793ba1cf25468d3c923b2075f4c987b79e53
Diffstat (limited to 'packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java')
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java
index 8425c48..94edc07 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java
@@ -42,6 +42,8 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe
private boolean mIsBouncing;
private SecurityCallback mSecurityCallback;
+ private final KeyguardUpdateMonitor mUpdateMonitor;
+
// Used to notify the container when something interesting happens.
public interface SecurityCallback {
public boolean dismiss(boolean authenticated);
@@ -62,6 +64,7 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe
super(context, attrs, defStyle);
mSecurityModel = new KeyguardSecurityModel(context);
mLockPatternUtils = new LockPatternUtils(context);
+ mUpdateMonitor = KeyguardUpdateMonitor.getInstance(mContext);
}
public void setSecurityCallback(SecurityCallback callback) {
@@ -303,7 +306,9 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe
boolean showNextSecurityScreenOrFinish(boolean authenticated) {
if (DEBUG) Log.d(TAG, "showNextSecurityScreenOrFinish(" + authenticated + ")");
boolean finish = false;
- if (SecurityMode.None == mCurrentSecuritySelection) {
+ if (mUpdateMonitor.getUserHasTrust(mLockPatternUtils.getCurrentUser())) {
+ finish = true;
+ } else if (SecurityMode.None == mCurrentSecuritySelection) {
SecurityMode securityMode = mSecurityModel.getSecurityMode();
// Allow an alternate, such as biometric unlock
securityMode = mSecurityModel.getAlternateFor(securityMode);