get signature result only when not null

This commit is contained in:
Dominik Schürmann 2013-09-09 22:39:44 +02:00
parent 94a81dd8ae
commit 59c0948fa8

View File

@ -103,9 +103,11 @@ public class CryptoProviderDemoActivity extends Activity {
@Override
public void run() {
mMessage.setText(new String(outputBytes));
Toast.makeText(CryptoProviderDemoActivity.this,
"signature result:\n" + signatureResult.toString(), Toast.LENGTH_LONG)
.show();
if (signatureResult != null) {
Toast.makeText(CryptoProviderDemoActivity.this,
"signature result:\n" + signatureResult.toString(),
Toast.LENGTH_LONG).show();
}
}
});