summaryrefslogtreecommitdiffstats
path: root/policy
diff options
context:
space:
mode:
authorRicardo Cerqueira <github@cerqueira.org>2012-05-25 12:04:07 +0100
committerRicardo Cerqueira <github@cerqueira.org>2012-05-27 17:26:58 +0100
commit5043585e171cc5d625f3538048c826531b2e4623 (patch)
tree81a6519a32fd7196c41f2436f33400cc8bc5f46a /policy
parentd86503d7525fc4115ba0e50d857eb53473571988 (diff)
downloadframeworks_base-5043585e171cc5d625f3538048c826531b2e4623.zip
frameworks_base-5043585e171cc5d625f3538048c826531b2e4623.tar.gz
frameworks_base-5043585e171cc5d625f3538048c826531b2e4623.tar.bz2
Keyguard: Turn lock-before-unlock into a user-configurable setting
Showing the unsecured lock screen (Slider/widget screen) before the security screen is now a secure Setting (still defaulting to off) Change-Id: I0a11f82ffe074d289129b2b972ffc0135eea81ed
Diffstat (limited to 'policy')
-rw-r--r--policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java b/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java
index 7377127..5fc45c5 100644
--- a/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java
+++ b/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java
@@ -59,6 +59,7 @@ import android.os.Parcelable;
import android.os.RemoteException;
import android.os.SystemClock;
import android.os.SystemProperties;
+import android.provider.Settings;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.util.Log;
@@ -740,7 +741,9 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler
protected void onConfigurationChanged(Configuration newConfig) {
Resources resources = getResources();
- mShowLockBeforeUnlock = resources.getBoolean(R.bool.config_enableLockBeforeUnlockScreen);
+ mShowLockBeforeUnlock = resources.getBoolean(R.bool.config_enableLockBeforeUnlockScreen) ||
+ (Settings.Secure.getInt(mContext.getContentResolver(),
+ Settings.Secure.LOCK_BEFORE_UNLOCK, 0) != 0);
mConfiguration = newConfig;
if (DEBUG_CONFIGURATION) Log.v(TAG, "**** re-creating lock screen since config changed");
saveWidgetState();
@@ -1032,6 +1035,11 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler
*/
private Mode getInitialMode() {
final IccCard.State simState = mUpdateMonitor.getSimState();
+
+ mShowLockBeforeUnlock = mContext.getResources().getBoolean(R.bool.config_enableLockBeforeUnlockScreen) ||
+ (Settings.Secure.getInt(mContext.getContentResolver(),
+ Settings.Secure.LOCK_BEFORE_UNLOCK, 0) != 0);
+
if (stuckOnLockScreenBecauseSimMissing() ||
(simState == IccCard.State.PUK_REQUIRED &&
!mLockPatternUtils.isPukUnlockScreenEnable())) {