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

Commit 704eb7e5 authored by Eric Biggers's avatar Eric Biggers Committed by Gerrit Code Review
Browse files

Merge "Remove unused support for "pattern ever chosen"" into main

parents d47274bc 4c591921
Loading
Loading
Loading
Loading
+0 −18
Original line number Diff line number Diff line
@@ -171,7 +171,6 @@ public class LockPatternUtils {
     */
    public static final int USER_FRP = UserHandle.USER_NULL + 1;

    public final static String PATTERN_EVER_CHOSEN_KEY = "lockscreen.patterneverchosen";
    public final static String PASSWORD_TYPE_KEY = "lockscreen.password_type";
    @Deprecated
    public final static String PASSWORD_TYPE_ALTERNATE_KEY = "lockscreen.password_type_alternate";
@@ -596,16 +595,6 @@ public class LockPatternUtils {
        return false;
    }

    /**
     * Return true if the user has ever chosen a pattern.  This is true even if the pattern is
     * currently cleared.
     *
     * @return True if the user has ever chosen a pattern.
     */
    public boolean isPatternEverChosen(int userId) {
        return getBoolean(PATTERN_EVER_CHOSEN_KEY, false, userId);
    }

    /**
     * Returns the length of the PIN set by a particular user.
     * @param userId user id of the user whose pin length we have to return
@@ -639,13 +628,6 @@ public class LockPatternUtils {
            return false;
        }
    }
    /**
     * Records that the user has chosen a pattern at some time, even if the pattern is
     * currently cleared.
     */
    public void reportPatternWasChosen(int userId) {
        setBoolean(PATTERN_EVER_CHOSEN_KEY, true, userId);
    }

    /**
     * Used by device policy manager to validate the current password
+0 −1
Original line number Diff line number Diff line
@@ -961,7 +961,6 @@ public class SettingsBackupAgent extends BackupAgentHelper {
                        lockPatternUtils.setOwnerInfo(value, userId);
                        break;
                    case KEY_LOCK_SETTINGS_VISIBLE_PATTERN_ENABLED:
                        lockPatternUtils.reportPatternWasChosen(userId);
                        lockPatternUtils.setVisiblePatternEnabled("1".equals(value), userId);
                        break;
                    case KEY_LOCK_SETTINGS_POWER_BUTTON_INSTANTLY_LOCKS:
+0 −4
Original line number Diff line number Diff line
@@ -1767,10 +1767,6 @@ public class LockSettingsService extends ILockSettings.Stub {
    }

    private void onPostPasswordChanged(LockscreenCredential newCredential, int userHandle) {
        if (newCredential.isPattern()) {
            setBoolean(LockPatternUtils.PATTERN_EVER_CHOSEN_KEY, true, userHandle);
        }

        updatePasswordHistory(newCredential, userHandle);
        mContext.getSystemService(TrustManager.class).reportEnabledTrustAgentsChanged(userHandle);
    }