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

Commit e46d3522 authored by Eric Biggers's avatar Eric Biggers Committed by Chun-Wei Wang
Browse files

Enable visual feedback when entering FRP pattern

When the original lock pattern is verified for Factory Reset Protection
(FRP), the original setting of LOCK_PATTERN_VISIBLE is unknown.
However, it's likely to be true, since that is the value that gets set
automatically when a pattern is first set.  It would only be false if
the user went into Settings and disabled "Make pattern visible".  So, to
be consistent with this, fix the low-level default to be true instead of
false.  This enables visual feedback when entering the FRP pattern.

Bug: 270013005
Change-Id: If295999da34510c17ebfb323dd5215418eaa0852
Merged-In: If295999da34510c17ebfb323dd5215418eaa0852
(cherry picked from commit 5162566c)
parent 17bb645a
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1082,7 +1082,10 @@ public class LockPatternUtils {
     */
    @UnsupportedAppUsage
    public boolean isVisiblePatternEnabled(int userId) {
        return getBoolean(Settings.Secure.LOCK_PATTERN_VISIBLE, false, userId);
        // Default to true, since this gets explicitly set to true when a pattern is first set
        // anyway, which makes true the user-visible default.  The low-level default should be the
        // same, in order for FRP credential verification to get the same default.
        return getBoolean(Settings.Secure.LOCK_PATTERN_VISIBLE, true, userId);
    }

    /**