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

Commit fa37b9ef authored by Eric Biggers's avatar Eric Biggers Committed by Automerger Merge Worker
Browse files

Merge "Remove unused support for "pattern ever chosen"" into main am:...

Merge "Remove unused support for "pattern ever chosen"" into main am: 704eb7e5 am: 6d9c68a6 am: 7a67a662

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2775372



Change-Id: Ibdb0c727e7f2149f673e00dbf806a137ec43533e
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 0c00bcf9 7a67a662
Loading
Loading
Loading
Loading
+0 −18
Original line number Original line Diff line number Diff line
@@ -171,7 +171,6 @@ public class LockPatternUtils {
     */
     */
    public static final int USER_FRP = UserHandle.USER_NULL + 1;
    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";
    public final static String PASSWORD_TYPE_KEY = "lockscreen.password_type";
    @Deprecated
    @Deprecated
    public final static String PASSWORD_TYPE_ALTERNATE_KEY = "lockscreen.password_type_alternate";
    public final static String PASSWORD_TYPE_ALTERNATE_KEY = "lockscreen.password_type_alternate";
@@ -596,16 +595,6 @@ public class LockPatternUtils {
        return false;
        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.
     * 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
     * @param userId user id of the user whose pin length we have to return
@@ -639,13 +628,6 @@ public class LockPatternUtils {
            return false;
            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
     * Used by device policy manager to validate the current password
+0 −1
Original line number Original line Diff line number Diff line
@@ -961,7 +961,6 @@ public class SettingsBackupAgent extends BackupAgentHelper {
                        lockPatternUtils.setOwnerInfo(value, userId);
                        lockPatternUtils.setOwnerInfo(value, userId);
                        break;
                        break;
                    case KEY_LOCK_SETTINGS_VISIBLE_PATTERN_ENABLED:
                    case KEY_LOCK_SETTINGS_VISIBLE_PATTERN_ENABLED:
                        lockPatternUtils.reportPatternWasChosen(userId);
                        lockPatternUtils.setVisiblePatternEnabled("1".equals(value), userId);
                        lockPatternUtils.setVisiblePatternEnabled("1".equals(value), userId);
                        break;
                        break;
                    case KEY_LOCK_SETTINGS_POWER_BUTTON_INSTANTLY_LOCKS:
                    case KEY_LOCK_SETTINGS_POWER_BUTTON_INSTANTLY_LOCKS:
+0 −4
Original line number Original line Diff line number Diff line
@@ -1767,10 +1767,6 @@ public class LockSettingsService extends ILockSettings.Stub {
    }
    }


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

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