diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-07-02 15:42:38 +0200 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-07-02 15:42:38 +0200 |
commit | 3d34eb8ca44c03b74577158b82460b7e1842e35b (patch) | |
tree | 04b63e51bb7d225cbc99981be808dece27a9830a /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EditKeyFragment.java | |
parent | a66c6b5b7ab55d7da2bdebdc4526b4293b507d40 (diff) | |
download | open-keychain-3d34eb8ca44c03b74577158b82460b7e1842e35b.tar.gz open-keychain-3d34eb8ca44c03b74577158b82460b7e1842e35b.tar.bz2 open-keychain-3d34eb8ca44c03b74577158b82460b7e1842e35b.zip |
edit key: work on saving
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EditKeyFragment.java')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EditKeyFragment.java | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EditKeyFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EditKeyFragment.java index ccb525c05..1defa4034 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EditKeyFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EditKeyFragment.java @@ -328,8 +328,6 @@ public class EditKeyFragment extends LoaderFragment implements } private void save() { - Log.d(Constants.TAG, "data: " + mUserIdsAddedAdapter.getDataAsStringList()); - String passphrase = PassphraseCacheService.getCachedPassphrase(getActivity(), mSaveKeyringParcel.mMasterKeyId); if (passphrase == null) { @@ -338,17 +336,23 @@ public class EditKeyFragment extends LoaderFragment implements @Override public void handleMessage(Message message) { if (message.what == PassphraseDialogFragment.MESSAGE_OKAY) { - saveFinal(); + String passphrase = + message.getData().getString(PassphraseDialogFragment.MESSAGE_DATA_PASSPHRASE); + Log.d(Constants.TAG, "after caching passphrase"); + saveFinal(passphrase); } } } ); - + } else { + saveFinal(passphrase); } - } - private void saveFinal() { + private void saveFinal(String passphrase) { + Log.d(Constants.TAG, "add userids to parcel: " + mUserIdsAddedAdapter.getDataAsStringList()); + mSaveKeyringParcel.addUserIds = mUserIdsAddedAdapter.getDataAsStringList(); + // Message is received after importing is done in KeychainIntentService KeychainIntentServiceHandler saveHandler = new KeychainIntentServiceHandler( getActivity(), @@ -386,6 +390,7 @@ public class EditKeyFragment extends LoaderFragment implements // fill values for this action Bundle data = new Bundle(); + data.putString(KeychainIntentService.SAVE_KEYRING_PASSPHRASE, passphrase); data.putParcelable(KeychainIntentService.SAVE_KEYRING_PARCEL, mSaveKeyringParcel); intent.putExtra(KeychainIntentService.EXTRA_DATA, data); |