diff options
author | M. Dietrich <mdt@emdete.de> | 2014-02-28 15:18:54 +0100 |
---|---|---|
committer | M. Dietrich <mdt@emdete.de> | 2014-02-28 15:18:54 +0100 |
commit | cec6c3ab5a884dc49b92055fb684ba66a612e195 (patch) | |
tree | 79d5e0c0638dd20862f3ae747b61c76eceb69003 /OpenPGP-Keychain-API/example-app | |
parent | e97630b75e018e09414b93442f2fb224ebc7bd09 (diff) | |
download | open-keychain-cec6c3ab5a884dc49b92055fb684ba66a612e195.tar.gz open-keychain-cec6c3ab5a884dc49b92055fb684ba66a612e195.tar.bz2 open-keychain-cec6c3ab5a884dc49b92055fb684ba66a612e195.zip |
prevent null byte[] in case of encoding exc
Diffstat (limited to 'OpenPGP-Keychain-API/example-app')
-rw-r--r-- | OpenPGP-Keychain-API/example-app/src/main/java/org/sufficientlysecure/keychain/demo/IntentActivity.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/OpenPGP-Keychain-API/example-app/src/main/java/org/sufficientlysecure/keychain/demo/IntentActivity.java b/OpenPGP-Keychain-API/example-app/src/main/java/org/sufficientlysecure/keychain/demo/IntentActivity.java index fdcabaf7c..e8aa2a2e7 100644 --- a/OpenPGP-Keychain-API/example-app/src/main/java/org/sufficientlysecure/keychain/demo/IntentActivity.java +++ b/OpenPGP-Keychain-API/example-app/src/main/java/org/sufficientlysecure/keychain/demo/IntentActivity.java @@ -112,11 +112,11 @@ public class IntentActivity extends PreferenceActivity { byte[] pubkey = null; try { pubkey = TEST_PUBKEY.getBytes("UTF-8"); + intent.putExtra(OpenKeychainIntents.IMPORT_KEY_EXTRA_KEY_BYTES, pubkey); + startActivity(intent); } catch (UnsupportedEncodingException e) { - e.printStackTrace(); + Log.e(Constants.TAG, "UnsupportedEncodingException", e); } - intent.putExtra(OpenKeychainIntents.IMPORT_KEY_EXTRA_KEY_BYTES, pubkey); - startActivity(intent); } catch (ActivityNotFoundException e) { Toast.makeText(IntentActivity.this, "Activity not found!", Toast.LENGTH_LONG).show(); } |