summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/java/com/android/internal/widget/LockPatternUtils.java10
-rwxr-xr-xcore/res/res/values/strings.xml39
2 files changed, 44 insertions, 5 deletions
diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java
index e4322c6..804f28a 100644
--- a/core/java/com/android/internal/widget/LockPatternUtils.java
+++ b/core/java/com/android/internal/widget/LockPatternUtils.java
@@ -83,6 +83,13 @@ public class LockPatternUtils {
*/
public static final long FAILED_ATTEMPT_COUNTDOWN_INTERVAL_MS = 1000L;
+
+ /**
+ * This dictates when we start telling the user that continued failed attempts will wipe
+ * their device.
+ */
+ public static final int FAILED_ATTEMPTS_BEFORE_WIPE_GRACE = 5;
+
/**
* The minimum number of dots in a valid pattern.
*/
@@ -93,7 +100,7 @@ public class LockPatternUtils {
* attempt for it to be counted against the counts that affect
* {@link #FAILED_ATTEMPTS_BEFORE_TIMEOUT} and {@link #FAILED_ATTEMPTS_BEFORE_RESET}
*/
- public static final int MIN_PATTERN_REGISTER_FAIL = 3;
+ public static final int MIN_PATTERN_REGISTER_FAIL = MIN_LOCK_PATTERN_SIZE;
private final static String LOCKOUT_PERMANENT_KEY = "lockscreen.lockedoutpermanently";
private final static String LOCKOUT_ATTEMPT_DEADLINE = "lockscreen.lockoutattemptdeadline";
@@ -112,6 +119,7 @@ public class LockPatternUtils {
private static final AtomicBoolean sHaveNonZeroPatternFile = new AtomicBoolean(false);
private static final AtomicBoolean sHaveNonZeroPasswordFile = new AtomicBoolean(false);
+
private static FileObserver sPasswordObserver;
private static class PasswordFileObserver extends FileObserver {
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 2548eb5..27fa8d4 100755
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -1300,8 +1300,8 @@
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permlab_writeApnSettings">change/intercept network settings and traffic</string>
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
- <string name="permdesc_writeApnSettings">Allows an application to change network settings and to intercept and inspect all network traffic,
- for example to change the proxy and port of any APN. Malicious applications could monitor, redirect, or modify network
+ <string name="permdesc_writeApnSettings">Allows an application to change network settings and to intercept and inspect all network traffic,
+ for example to change the proxy and port of any APN. Malicious applications could monitor, redirect, or modify network
packets without your knowledge.</string>
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
@@ -1857,7 +1857,7 @@
\n\nPlease try again in <xliff:g id="number">%d</xliff:g> seconds.
</string>
- <!-- For the unlock screen, Information message shown in dialog when user is almost at the limit
+ <!-- For the unlock screen, informational message shown in dialog when user is almost at the limit
where they will be locked out and may have to enter an alternate username/password to unlock the phone -->
<string name="lockscreen_failed_attempts_almost_glogin" product="tablet">
You have incorrectly drawn your unlock pattern <xliff:g id="number">%d</xliff:g> times.
@@ -1865,7 +1865,8 @@
you will be asked to unlock your tablet using your Google sign-in.\n\n
Please try again in <xliff:g id="number">%d</xliff:g> seconds.
</string>
- <!-- For the unlock screen, Information message shown in dialog when user is almost at the limit
+
+ <!-- For the unlock screen, informational message shown in dialog when user is almost at the limit
where they will be locked out and may have to enter an alternate username/password to unlock the phone -->
<string name="lockscreen_failed_attempts_almost_glogin" product="default">
You have incorrectly drawn your unlock pattern <xliff:g id="number">%d</xliff:g> times.
@@ -1874,6 +1875,36 @@
Please try again in <xliff:g id="number">%d</xliff:g> seconds.
</string>
+ <!-- For the unlock screen, informational message shown in dialog when user is almost at the limit
+ where the device will be wiped. -->
+ <string name="lockscreen_failed_attempts_almost_at_wipe" product="tablet">
+ You have incorrectly attempted to unlock the tablet <xliff:g id="number">%d</xliff:g> times.
+ After <xliff:g id="number">%d</xliff:g> more unsuccessful attempts,
+ the tablet will be reset to factory default and all user data will be lost.
+ </string>
+
+ <!-- For the unlock screen, informational message shown in dialog when user is almost at the limit
+ where the device will be wiped. -->
+ <string name="lockscreen_failed_attempts_almost_at_wipe" product="default">
+ You have incorrectly attempted to unlock the phone <xliff:g id="number">%d</xliff:g> times.
+ After <xliff:g id="number">%d</xliff:g> more unsuccessful attempts,
+ the phone will be reset to factory default and all user data will be lost.
+ </string>
+
+ <!-- For the unlock screen, informational message shown in dialog when user has exceeded the
+ maximum attempts and the device will now be wiped -->
+ <string name="lockscreen_failed_attempts_now_wiping" product="tablet">
+ You have incorrectly attempted to unlock the tablet <xliff:g id="number">%d</xliff:g> times.
+ The tablet will now be reset to factory default.
+ </string>
+
+ <!-- For the unlock screen, informational message shown in dialog when user has exceeded the
+ maximum attempts and the device will now be wiped -->
+ <string name="lockscreen_failed_attempts_now_wiping" product="default">
+ You have incorrectly attempted to unlock the phone <xliff:g id="number">%d</xliff:g> times.
+ The phone will now be reset to factory default.
+ </string>
+
<!-- On the unlock screen, countdown message shown while user is waiting to try again after too many
failed attempts -->
<string name="lockscreen_too_many_failed_attempts_countdown">Try again in <xliff:g id="number">%d</xliff:g> seconds.</string>