From 1406eec2dc0a1db72e7f69cd14642f4324eacf63 Mon Sep 17 00:00:00 2001 From: Vincent Breitmoser Date: Sat, 30 May 2015 00:16:27 +0200 Subject: [PATCH] make KeyItem serializble, for state in TokenTextCompleteView --- .../java/org/sufficientlysecure/keychain/pgp/KeyRing.java | 3 ++- .../sufficientlysecure/keychain/ui/adapter/KeyAdapter.java | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/KeyRing.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/KeyRing.java index 825795cc6..77977b691 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/KeyRing.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/KeyRing.java @@ -22,6 +22,7 @@ import android.text.TextUtils; import org.sufficientlysecure.keychain.pgp.exception.PgpKeyNotFoundException; +import java.io.Serializable; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -91,7 +92,7 @@ public abstract class KeyRing { return userIdString; } - public static class UserId { + public static class UserId implements Serializable { public final String name; public final String email; public final String comment; diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/KeyAdapter.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/KeyAdapter.java index eef44a94b..deaaee87a 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/KeyAdapter.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/KeyAdapter.java @@ -18,6 +18,7 @@ package org.sufficientlysecure.keychain.ui.adapter; +import java.io.Serializable; import java.util.Calendar; import java.util.Date; import java.util.TimeZone; @@ -240,7 +241,8 @@ public class KeyAdapter extends CursorAdapter { return super.getItemId(position); } - public static class KeyItem { + // must be serializable for TokenCompleTextView state + public static class KeyItem implements Serializable { public final String mUserIdFull; public final KeyRing.UserId mUserId;