// Factory reset the device.
sendBroadcast(new Intent("android.intent.action.MASTER_CLEAR"));
} else if ((failedAttempts % COOL_DOWN_ATTEMPTS) == 0) {
+ if (mLockPatternView != null) {
+ mLockPatternView.clearPattern();
+ }
mCooldown = COOL_DOWN_INTERVAL;
cooldown();
} else {
if (mPasswordEntry != null) {
mPasswordEntry.setEnabled(true);
}
+ if (mLockPatternView != null) {
+ mLockPatternView.setEnabled(true);
+ }
}
}
}
setContentView(R.layout.crypt_keeper_pin_entry);
} else if (type == StorageManager.CRYPT_TYPE_PATTERN) {
setContentView(R.layout.crypt_keeper_pattern_entry);
+ setBackFunctionality(false);
} else {
setContentView(R.layout.crypt_keeper_password_entry);
}
if (mCooldown <= 0) {
// Re-enable the password entry and back presses.
- mPasswordEntry.setEnabled(true);
- setBackFunctionality(true);
+ if (mPasswordEntry != null) {
+ mPasswordEntry.setEnabled(true);
+ setBackFunctionality(true);
+ }
+ if (mLockPatternView != null) {
+ mLockPatternView.setEnabled(true);
+ }
status.setText(R.string.enter_password);
} else {
CharSequence template = getText(R.string.crypt_keeper_cooldown);
@Override
public void onPatternDetected(List<LockPatternView.Cell> pattern) {
+ mLockPatternView.setEnabled(false);
new DecryptTask().execute(LockPatternUtils.patternToString(pattern));
}