diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-02-28 16:40:23 +0100 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-02-28 16:40:23 +0100 |
commit | 31292bd057920f8b2fc4263d84ea8eabca6d4e7a (patch) | |
tree | f629f2346b8301815ad3ee71e6897b1a3d37b07c | |
parent | a2544fb2b0aa4ee47ab4f1c6a62b81892d789331 (diff) | |
parent | cec6c3ab5a884dc49b92055fb684ba66a612e195 (diff) | |
download | open-keychain-31292bd057920f8b2fc4263d84ea8eabca6d4e7a.tar.gz open-keychain-31292bd057920f8b2fc4263d84ea8eabca6d4e7a.tar.bz2 open-keychain-31292bd057920f8b2fc4263d84ea8eabca6d4e7a.zip |
Merge pull request #311 from emdete/master
prevent null byte[] in case of encoding exc
-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(); } |