Merge pull request #311 from emdete/master

prevent null byte[] in case of encoding exc
This commit is contained in:
Dominik Schürmann 2014-02-28 16:40:23 +01:00
commit 31292bd057

View File

@ -112,11 +112,11 @@ public class IntentActivity extends PreferenceActivity {
byte[] pubkey = null;
try {
pubkey = TEST_PUBKEY.getBytes("UTF-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
intent.putExtra(OpenKeychainIntents.IMPORT_KEY_EXTRA_KEY_BYTES, pubkey);
startActivity(intent);
} catch (UnsupportedEncodingException e) {
Log.e(Constants.TAG, "UnsupportedEncodingException", e);
}
} catch (ActivityNotFoundException e) {
Toast.makeText(IntentActivity.this, "Activity not found!", Toast.LENGTH_LONG).show();
}