if the timer is empty default to 45sec
This commit is contained in:
parent
3417bdfb0b
commit
28ba83372c
1 changed files with 10 additions and 3 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue