diff options
| author | 2023-04-27 18:46:20 +0000 | |
|---|---|---|
| committer | 2023-08-09 04:06:06 +0000 | |
| commit | 7a6cfcc3af84ec10766d764c853dba7a3daaf266 (patch) | |
| tree | 2ef797d9db468bfb2765bb4ecf1a62f2663dcb8a | |
| parent | 7d4a9fd5022ee7829cd8fc4f598b4507d0a4239b (diff) | |
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 5162566c0fae79d7e6afd7348100a39296d3ec37)
| -rw-r--r-- | core/java/com/android/internal/widget/LockPatternUtils.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java index c8c3fada61c3..98652c2e1c44 100644 --- a/core/java/com/android/internal/widget/LockPatternUtils.java +++ b/core/java/com/android/internal/widget/LockPatternUtils.java @@ -986,7 +986,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); } /** |