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
This commit is contained in:
Eric Biggers
2023-04-27 18:46:20 +00:00
parent 6e7d5b4397
commit 5162566c0f

View File

@@ -1058,7 +1058,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);
}
/**