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());
clipboard.setPrimaryClip(clip);
showToast(this.getResources().getString(R.string.clipboard_beginning_toast_text)
+ Integer.parseInt(settings.getString("general_show_time", "45"))
+ this.getResources().getString(R.string.clipboard_ending_toast_text));
try {
showToast(this.getResources().getString(R.string.clipboard_beginning_toast_text)
+ Integer.parseInt(settings.getString("general_show_time", "45"))
+ 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) {