From aca54e31eae450e7deec54cca6654ee202c7a90f Mon Sep 17 00:00:00 2001 From: Vincent Breitmoser Date: Wed, 18 Mar 2015 18:25:44 +0100 Subject: generalize nfc crypto input structure --- .../keychain/service/CertifyActionsParcel.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/CertifyActionsParcel.java') diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/CertifyActionsParcel.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/CertifyActionsParcel.java index d6da18e6e..485d5de72 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/CertifyActionsParcel.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/CertifyActionsParcel.java @@ -26,31 +26,31 @@ import java.util.ArrayList; import java.util.Date; import org.sufficientlysecure.keychain.pgp.WrappedUserAttribute; -import org.sufficientlysecure.keychain.service.input.CryptoOperationParcel; +import org.sufficientlysecure.keychain.service.input.CryptoInputParcel; /** * This class is a a transferable representation for a number of keyrings to * be certified. */ -public class CertifyActionsParcel extends CryptoOperationParcel { +public class CertifyActionsParcel implements Parcelable { // the master key id to certify with final public long mMasterKeyId; public CertifyLevel mLevel; public ArrayList mCertifyActions = new ArrayList<>(); + public CryptoInputParcel mCryptoInput; public CertifyActionsParcel(Date operationTime, long masterKeyId) { - super(operationTime); mMasterKeyId = masterKeyId; + mCryptoInput = new CryptoInputParcel(operationTime); mLevel = CertifyLevel.DEFAULT; } public CertifyActionsParcel(Parcel source) { - super(source); - mMasterKeyId = source.readLong(); + mCryptoInput = source.readParcelable(CertifyActionsParcel.class.getClassLoader()); // just like parcelables, this is meant for ad-hoc IPC only and is NOT portable! mLevel = CertifyLevel.values()[source.readInt()]; @@ -63,9 +63,8 @@ public class CertifyActionsParcel extends CryptoOperationParcel { @Override public void writeToParcel(Parcel destination, int flags) { - super.writeToParcel(destination, flags); - destination.writeLong(mMasterKeyId); + destination.writeParcelable(mCryptoInput, 0); destination.writeInt(mLevel.ordinal()); destination.writeSerializable(mCertifyActions); -- cgit v1.2.3