Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7f6513bd authored by Wysie's avatar Wysie
Browse files

Added code to allow hiding of unlock pattern instructions and error messages.

parent ae140ed9
Loading
Loading
Loading
Loading
+20 −2
Original line number Diff line number Diff line
@@ -86,9 +86,11 @@ public class LockPatternUtils {
    private final static String LOCK_CUSTOM_MSG = "lockscreen.custommsg";
    private final static String LOCK_SHOW_SLIDERS = "lockscreen.showsliders";
    private final static String LOCK_INCORRECT_DELAY = "lockscreen.incorrectdelay";
    private final static String SHOW_UNLOCK_TEXT = "lockscreen.show_unlock_text";
    private final static String SHOW_UNLOCK_ERR_TEXT = "lockscreen.show_unlock_err_text";

    private static final int PIN_CHECK_TIMEOUT_MIN = 500;
    private static final int PIN_CHECK_TIMEOUT_DEFAULT = 1500;
    private final static int PIN_CHECK_TIMEOUT_MIN = 500;
    private final static int PIN_CHECK_TIMEOUT_DEFAULT = 1500;
    
    private final ContentResolver mContentResolver;

@@ -345,6 +347,22 @@ public class LockPatternUtils {
        setInt(LOCK_INCORRECT_DELAY, delay);
    }
    
    public void setShowUnlockMsg(boolean enabled) {
        setBoolean(SHOW_UNLOCK_TEXT, enabled);
    }
    
    public boolean isShowUnlockMsg() {
        return getBoolean(SHOW_UNLOCK_TEXT, true);
    }
    
    public void setShowUnlockErrMsg(boolean enabled) {
        setBoolean(SHOW_UNLOCK_ERR_TEXT, enabled);
    }
    
    public boolean isShowUnlockErrMsg() {
        return getBoolean(SHOW_UNLOCK_ERR_TEXT, true);
    }

    /**
     * Set whether tactile feedback for the pattern is enabled.
     */