mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-27 11:12:15 -05:00
prevent null byte[] in case of encoding exc
This commit is contained in:
parent
e97630b75e
commit
cec6c3ab5a
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user