diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-12-29 23:17:01 +0100 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-12-29 23:17:01 +0100 |
commit | ccde6add70ea9b5c559910d42dfb2e0bf79f5989 (patch) | |
tree | b2178874da7f9f36597097959de135a808e1e7a5 /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui | |
parent | 610c4780f13cbfb0f85eb74ee8c6bed4f18eb70a (diff) | |
parent | 576e6fd0cca41691a52db8e1325508f00a6e9bc6 (diff) | |
download | open-keychain-ccde6add70ea9b5c559910d42dfb2e0bf79f5989.tar.gz open-keychain-ccde6add70ea9b5c559910d42dfb2e0bf79f5989.tar.bz2 open-keychain-ccde6add70ea9b5c559910d42dfb2e0bf79f5989.zip |
Merge branch 'development' of github.com:open-keychain/open-keychain into development
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CreateKeyFinalFragment.java | 5 | ||||
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EditKeyFragment.java | 11 |
2 files changed, 12 insertions, 4 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CreateKeyFinalFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CreateKeyFinalFragment.java index bcc98a5d7..b48f10bbf 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CreateKeyFinalFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CreateKeyFinalFragment.java @@ -34,6 +34,7 @@ import android.widget.TextView; import org.spongycastle.bcpg.sig.KeyFlags; import org.sufficientlysecure.keychain.Constants; import org.sufficientlysecure.keychain.R; +import org.sufficientlysecure.keychain.service.SaveKeyringParcel.ChangeUnlockParcel; import org.sufficientlysecure.keychain.util.Preferences; import org.sufficientlysecure.keychain.pgp.KeyRing; import org.sufficientlysecure.keychain.provider.KeychainContract; @@ -165,7 +166,9 @@ public class CreateKeyFinalFragment extends Fragment { String userId = KeyRing.createUserId(mName, mEmail, null); mSaveKeyringParcel.mAddUserIds.add(userId); mSaveKeyringParcel.mChangePrimaryUserId = userId; - mSaveKeyringParcel.mNewPassphrase = mPassphrase; + mSaveKeyringParcel.mNewUnlock = mPassphrase != null + ? new ChangeUnlockParcel(mPassphrase, null) + : null; } } 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 a18eb76d1..7acd62c72 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EditKeyFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EditKeyFragment.java @@ -53,6 +53,7 @@ import org.sufficientlysecure.keychain.service.KeychainIntentService; import org.sufficientlysecure.keychain.service.KeychainIntentServiceHandler; import org.sufficientlysecure.keychain.service.PassphraseCacheService; import org.sufficientlysecure.keychain.service.SaveKeyringParcel; +import org.sufficientlysecure.keychain.service.SaveKeyringParcel.ChangeUnlockParcel; import org.sufficientlysecure.keychain.ui.adapter.SubkeysAdapter; import org.sufficientlysecure.keychain.ui.adapter.SubkeysAddedAdapter; import org.sufficientlysecure.keychain.ui.adapter.UserIdsAdapter; @@ -189,7 +190,9 @@ public class EditKeyFragment extends LoaderFragment implements private void loadSaveKeyringParcel(SaveKeyringParcel saveKeyringParcel) { mSaveKeyringParcel = saveKeyringParcel; mPrimaryUserId = saveKeyringParcel.mChangePrimaryUserId; - mCurrentPassphrase = saveKeyringParcel.mNewPassphrase; + if (saveKeyringParcel.mNewUnlock != null) { + mCurrentPassphrase = saveKeyringParcel.mNewUnlock.mNewPassphrase; + } mUserIdsAddedAdapter = new UserIdsAddedAdapter(getActivity(), mSaveKeyringParcel.mAddUserIds, true); mUserIdsAddedList.setAdapter(mUserIdsAddedAdapter); @@ -387,8 +390,10 @@ public class EditKeyFragment extends LoaderFragment implements Bundle data = message.getData(); // cache new returned passphrase! - mSaveKeyringParcel.mNewPassphrase = data - .getString(SetPassphraseDialogFragment.MESSAGE_NEW_PASSPHRASE); + mSaveKeyringParcel.mNewUnlock = new ChangeUnlockParcel( + data.getString(SetPassphraseDialogFragment.MESSAGE_NEW_PASSPHRASE), + null + ); } } }; |