diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2013-09-09 17:43:10 +0200 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2013-09-09 17:43:10 +0200 |
commit | b6d63f95cbf60d4030cc4688f941710472aeacbb (patch) | |
tree | 25ffea40aa04ad29c816319112754765a1626b3c /OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListSecretActivity.java | |
parent | 38e8733fd6952467ad59fc639ea1eb755d2b51df (diff) | |
download | open-keychain-b6d63f95cbf60d4030cc4688f941710472aeacbb.tar.gz open-keychain-b6d63f95cbf60d4030cc4688f941710472aeacbb.tar.bz2 open-keychain-b6d63f95cbf60d4030cc4688f941710472aeacbb.zip |
fix editactivity crash, default key creation, import from keyserver menu button
Diffstat (limited to 'OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListSecretActivity.java')
-rw-r--r-- | OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListSecretActivity.java | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListSecretActivity.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListSecretActivity.java index 52ce19f97..a1de4b0bc 100644 --- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListSecretActivity.java +++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/KeyListSecretActivity.java @@ -52,6 +52,8 @@ public class KeyListSecretActivity extends KeyListActivity { super.onCreateOptionsMenu(menu); menu.add(1, Id.menu.option.create, 1, R.string.menu_createKey).setShowAsAction( MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT); + menu.add(1, Id.menu.option.createExpert, 2, R.string.menu_createKeyExpert).setShowAsAction( + MenuItem.SHOW_AS_ACTION_NEVER); return true; } @@ -64,6 +66,11 @@ public class KeyListSecretActivity extends KeyListActivity { return true; } + case Id.menu.option.createExpert: { + createKeyExpert(); + return true; + } + default: { return super.onOptionsItemSelected(item); } @@ -112,12 +119,23 @@ public class KeyListSecretActivity extends KeyListActivity { private void createKey() { PgpMain.setEditPassPhrase(""); - Intent intent = new Intent(EditKeyActivity.ACTION_CREATE_KEY); + Intent intent = new Intent(this, EditKeyActivity.class); + intent.setAction(EditKeyActivity.ACTION_CREATE_KEY); + intent.putExtra(EditKeyActivity.EXTRA_GENERATE_DEFAULT_KEYS, true); + intent.putExtra(EditKeyActivity.EXTRA_USER_IDS, ""); // show user id view + startActivityForResult(intent, 0); + } + + private void createKeyExpert() { + PgpMain.setEditPassPhrase(""); + Intent intent = new Intent(this, EditKeyActivity.class); + intent.setAction(EditKeyActivity.ACTION_CREATE_KEY); startActivityForResult(intent, 0); } private void editKey(long masterKeyId, boolean masterCanSign) { - Intent intent = new Intent(EditKeyActivity.ACTION_EDIT_KEY); + Intent intent = new Intent(this, EditKeyActivity.class); + intent.setAction(EditKeyActivity.ACTION_EDIT_KEY); intent.putExtra(EditKeyActivity.EXTRA_MASTER_KEY_ID, masterKeyId); intent.putExtra(EditKeyActivity.EXTRA_MASTER_CAN_SIGN, masterCanSign); startActivityForResult(intent, 0); |