From 8662ca2928ac0b007d4ee5d00f6de3211f5d3d2c Mon Sep 17 00:00:00 2001 From: Ashley Hughes Date: Thu, 6 Mar 2014 12:25:35 +0000 Subject: [PATCH] a method, if not the best one, for each property --- .../keychain/service/SaveKeyringParcel.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/service/SaveKeyringParcel.java b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/service/SaveKeyringParcel.java index bdabc70a2..9e290c1b6 100644 --- a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/service/SaveKeyringParcel.java +++ b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/service/SaveKeyringParcel.java @@ -53,12 +53,16 @@ public class SaveKeyringParcel implements Parcelable { deletedKeys = PgpConversionHelper.BytesToPGPSecretKeyList(source.createByteArray()); keysExpiryDates = (ArrayList)source.readSerializable(); keysUsages = source.readArrayList(Integer.class.getClassLoader()); + newPassPhrase = source.readString(); + oldPassPhrase = source.readString(); + source.readBooleanArray(newKeys); + keys = PgpConversionHelper.BytesToPGPSecretKeyList(source.createByteArray()); } @Override public void writeToParcel(Parcel destination, int flags) { - destination.writeSerializable(userIDs); + destination.writeSerializable(userIDs); //might not be the best method to store. destination.writeSerializable(originalIDs); destination.writeSerializable(deletedIDs); destination.writeByte((byte) (primaryIDChanged ? 1 : 0)); @@ -69,7 +73,7 @@ public class SaveKeyringParcel implements Parcelable { destination.writeString(newPassPhrase); destination.writeString(oldPassPhrase); destination.writeBooleanArray(newKeys); - destination.writeByteArray(); + destination.writeByteArray(PgpConversionHelper.PGPSecretKeyArrayListToBytes(keys)); } public static final Creator CREATOR = new Creator() {