if the timer is empty default to 45sec

This commit is contained in:
zeapo 2014-11-09 17:19:07 +01:00
parent 3417bdfb0b
commit 28ba83372c

View file

@ -149,9 +149,16 @@ public class PgpHandler extends ActionBarActivity implements OpenPgpServiceConne
ClipData clip = ClipData.newPlainText("pgp_handler_result_pm", ((TextView) findViewById(R.id.crypto_password_show)).getText()); ClipData clip = ClipData.newPlainText("pgp_handler_result_pm", ((TextView) findViewById(R.id.crypto_password_show)).getText());
clipboard.setPrimaryClip(clip); clipboard.setPrimaryClip(clip);
try {
showToast(this.getResources().getString(R.string.clipboard_beginning_toast_text) showToast(this.getResources().getString(R.string.clipboard_beginning_toast_text)
+ Integer.parseInt(settings.getString("general_show_time", "45")) + Integer.parseInt(settings.getString("general_show_time", "45"))
+ this.getResources().getString(R.string.clipboard_ending_toast_text)); + this.getResources().getString(R.string.clipboard_ending_toast_text));
} catch (NumberFormatException e)
{
showToast(this.getResources().getString(R.string.clipboard_beginning_toast_text)
+ "45"
+ this.getResources().getString(R.string.clipboard_ending_toast_text));
}
} }
public void handleClick(View view) { public void handleClick(View view) {