mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-08-30 13:57:47 +00:00
should not happen but a user got a NPE due non-existing view
This commit is contained in:
@@ -143,6 +143,10 @@ public class PgpHandler extends ActionBarActivity implements OpenPgpServiceConne
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void copyToClipBoard() {
|
public void copyToClipBoard() {
|
||||||
|
|
||||||
|
if (findViewById(R.id.crypto_password_show) == null)
|
||||||
|
return;
|
||||||
|
|
||||||
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);
|
||||||
showToast(this.getResources().getString(R.string.clipboard_beginning_toast_text)
|
showToast(this.getResources().getString(R.string.clipboard_beginning_toast_text)
|
||||||
|
Reference in New Issue
Block a user