diff options
author | Vincent Breitmoser <valodim@mugenguild.com> | 2015-03-18 18:25:44 +0100 |
---|---|---|
committer | Vincent Breitmoser <valodim@mugenguild.com> | 2015-03-18 18:25:44 +0100 |
commit | aca54e31eae450e7deec54cca6654ee202c7a90f (patch) | |
tree | 19832f3076bc13b65eca38b2a4862e0bf39c4776 /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/CertifyActionsParcel.java | |
parent | 4499caef1e64d2e1afec37d360958f516da4dd40 (diff) | |
download | open-keychain-aca54e31eae450e7deec54cca6654ee202c7a90f.tar.gz open-keychain-aca54e31eae450e7deec54cca6654ee202c7a90f.tar.bz2 open-keychain-aca54e31eae450e7deec54cca6654ee202c7a90f.zip |
generalize nfc crypto input structure
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/CertifyActionsParcel.java')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/CertifyActionsParcel.java | 13 |
1 files changed, 6 insertions, 7 deletions
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<CertifyAction> 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); |