CMSettings : Add option to pass swipe-up-to-unlock (3/3)

CYNGNOS-1873

Change-Id: Icdd2505dbc56a77f49a76ea61daf75c5d8a24fd6
This commit is contained in:
Danesh M 2016-02-08 14:57:31 -08:00 committed by Gerrit Code Review
parent c63a4b7d7d
commit 2d1d7239a5
2 changed files with 16 additions and 0 deletions

View File

@ -2606,6 +2606,12 @@ public final class CMSettings {
*/
public static final String LIVE_LOCK_SCREEN_ENABLED = "live_lock_screen_enabled";
/**
* Whether keyguard will direct show security view (0 = false, 1 = true)
* @hide
*/
public static final String LOCK_PASS_TO_SECURITY_VIEW = "lock_screen_pass_to_security_view";
// endregion
/**
@ -2652,6 +2658,7 @@ public final class CMSettings {
CMSettings.Secure.APP_PERFORMANCE_PROFILES_ENABLED,
CMSettings.Secure.QS_LOCATION_ADVANCED,
CMSettings.Secure.LOCKSCREEN_VISUALIZER_ENABLED,
CMSettings.Secure.LOCK_PASS_TO_SECURITY_VIEW
};
/**

View File

@ -25,6 +25,7 @@ import android.text.TextUtils;
import com.android.internal.widget.LockPatternUtils;
import cyanogenmod.platform.Manifest;
import cyanogenmod.providers.CMSettings;
public class CmLockPatternUtils extends LockPatternUtils {
@ -94,4 +95,12 @@ public class CmLockPatternUtils extends LockPatternUtils {
private int getCurrentUser() {
return UserHandle.USER_CURRENT;
}
public boolean shouldPassToSecurityView(int userId) {
return getBoolean(CMSettings.Secure.LOCK_PASS_TO_SECURITY_VIEW, false, userId);
}
public void setPassToSecurityView(boolean enabled, int userId) {
setBoolean(CMSettings.Secure.LOCK_PASS_TO_SECURITY_VIEW, enabled, userId);
}
}