private void cooldown(){
  final TextView status=(TextView)findViewById(R.id.status);
  if (mCooldown <= 0) {
    mPasswordEntry.setEnabled(true);
    setBackFunctionality(true);
    status.setText(R.string.enter_password);
  }
 else {
    CharSequence template=getText(R.string.crypt_keeper_cooldown);
    status.setText(TextUtils.expandTemplate(template,Integer.toString(mCooldown)));
    mCooldown--;
    mHandler.removeMessages(MESSAGE_COOLDOWN);
    mHandler.sendEmptyMessageDelayed(MESSAGE_COOLDOWN,1000);
  }
}

private void cooldown ( ) { final TextView status = ( TextView ) findViewById ( R . id . status ) ; if ( mCooldown <= 0 ) { mPasswordEntry . setEnabled ( true ) ; setBackFunctionality ( true ) ; status . setText ( R . string . enter_password ) ; } else { CharSequence template = getText ( R . string . crypt_keeper_cooldown ) ; status . setText ( TextUtils . expandTemplate ( template , Integer . toString ( mCooldown ) ) ) ; mCooldown -- ; mHandler . removeMessages ( MESSAGE_COOLDOWN ) ; mHandler . sendEmptyMessageDelayed ( MESSAGE_COOLDOWN , 1000 ) ; } }
disable password input for a while to force the user to waste time between retries
