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

Commit 2e7929e4 authored by Pavel Grafov's avatar Pavel Grafov
Browse files

Provide convenience to check max password length.

Test: manual, applied password length restriction via TestDPC and
      set a new password via settings (see the other CL in the topic)
Bug: 30558331
Change-Id: I51302bad02604c8fc0def37dc33a5837f29ab858
parent dac3ddcf
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -276,6 +276,10 @@ public class LockPatternUtils {
        return getDevicePolicyManager().getPasswordMinimumLength(null, userId);
    }

    public int getMaximumPasswordLength(int quality) {
        return getDevicePolicyManager().getPasswordMaximumLength(quality);
    }

    /**
     * Gets the device policy password mode. If the mode is non-specific, returns
     * MODE_PATTERN which allows the user to choose anything.