Fix 2673731: Added password history
Change-Id: I6198833e099ec1f33309dc26b28e0fd4a6edb288
This commit is contained in:
@@ -605,6 +605,9 @@
|
|||||||
<!-- Error shown when in PIN mode and user enters a non-digit -->
|
<!-- Error shown when in PIN mode and user enters a non-digit -->
|
||||||
<string name="lockpassword_pin_contains_non_digits">PIN must contain only digits 0-9</string>
|
<string name="lockpassword_pin_contains_non_digits">PIN must contain only digits 0-9</string>
|
||||||
|
|
||||||
|
<!-- Error shown when in PIN mode and PIN has been used recently -->
|
||||||
|
<string name="lockpassword_pin_recently_used">PIN has been used recently</string>
|
||||||
|
|
||||||
<!-- Error shown when in PASSWORD mode and user enters an invalid character -->
|
<!-- Error shown when in PASSWORD mode and user enters an invalid character -->
|
||||||
<string name="lockpassword_illegal_character">Password contains an illegal character</string>
|
<string name="lockpassword_illegal_character">Password contains an illegal character</string>
|
||||||
|
|
||||||
@@ -617,6 +620,9 @@
|
|||||||
<!-- Error shown when in PASSWORD mode and password doesn't contain any symbols -->
|
<!-- Error shown when in PASSWORD mode and password doesn't contain any symbols -->
|
||||||
<string name="lockpassword_password_requires_symbol">Password must contain at least one symbol</string>
|
<string name="lockpassword_password_requires_symbol">Password must contain at least one symbol</string>
|
||||||
|
|
||||||
|
<!-- Error shown when in PASSWORD mode and password has been used recently -->
|
||||||
|
<string name="lockpassword_password_recently_used">Password has been used recently</string>
|
||||||
|
|
||||||
<!-- Label for ChoosePassword/PIN OK button -->
|
<!-- Label for ChoosePassword/PIN OK button -->
|
||||||
<string name="lockpassword_ok_label">OK</string>
|
<string name="lockpassword_ok_label">OK</string>
|
||||||
|
|
||||||
|
@@ -249,6 +249,10 @@ public class ChooseLockPassword extends Activity implements OnClickListener, OnE
|
|||||||
return getString(R.string.lockpassword_password_requires_symbol);
|
return getString(R.string.lockpassword_password_requires_symbol);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(mLockPatternUtils.checkPasswordHistory(password)) {
|
||||||
|
return getString(mIsAlphaMode ? R.string.lockpassword_password_recently_used
|
||||||
|
: R.string.lockpassword_pin_recently_used);
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -306,7 +310,7 @@ public class ChooseLockPassword extends Activity implements OnClickListener, OnE
|
|||||||
|
|
||||||
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
||||||
// Check if this was the result of hitting the enter key
|
// Check if this was the result of hitting the enter key
|
||||||
if (actionId == EditorInfo.IME_NULL) {
|
if (actionId == EditorInfo.IME_NULL && event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||||
handleNext();
|
handleNext();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user