diff options
Diffstat (limited to 'OpenKeychain/src')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/SaveKeyringParcel.java | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/SaveKeyringParcel.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/SaveKeyringParcel.java index a56095767..9f29c15dc 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/SaveKeyringParcel.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/SaveKeyringParcel.java @@ -39,11 +39,7 @@ public class SaveKeyringParcel implements Parcelable { public ArrayList<Long> revokeSubKeys; public SaveKeyringParcel() { - addUserIds = new ArrayList<String>(); - addSubKeys = new ArrayList<SubkeyAdd>(); - changeSubKeys = new ArrayList<SubkeyChange>(); - revokeUserIds = new ArrayList<String>(); - revokeSubKeys = new ArrayList<Long>(); + reset(); } public SaveKeyringParcel(long masterKeyId, byte[] fingerprint) { @@ -52,6 +48,16 @@ public class SaveKeyringParcel implements Parcelable { mFingerprint = fingerprint; } + public void reset() { + newPassphrase = null; + addUserIds = new ArrayList<String>(); + addSubKeys = new ArrayList<SubkeyAdd>(); + changePrimaryUserId = null; + changeSubKeys = new ArrayList<SubkeyChange>(); + revokeUserIds = new ArrayList<String>(); + revokeSubKeys = new ArrayList<Long>(); + } + // performance gain for using Parcelable here would probably be negligible, // use Serializable instead. public static class SubkeyAdd implements Serializable { |