Store expired state within ImportKeysListEntry

This commit is contained in:
mar-v-in 2014-06-04 17:05:57 +02:00
parent 34b97cb136
commit cc2ef0c17c
2 changed files with 12 additions and 0 deletions

View File

@ -308,6 +308,7 @@ public class HkpKeyserver extends Keyserver {
entry.setDate(tmpGreg.getTime()); entry.setDate(tmpGreg.getTime());
entry.setRevoked(matcher.group(6).contains("r")); entry.setRevoked(matcher.group(6).contains("r"));
entry.setExpired(matcher.group(6).contains("e"));
ArrayList<String> userIds = new ArrayList<String>(); ArrayList<String> userIds = new ArrayList<String>();
final String uidLines = matcher.group(7); final String uidLines = matcher.group(7);

View File

@ -44,6 +44,7 @@ public class ImportKeysListEntry implements Serializable, Parcelable {
public long keyId; public long keyId;
public String keyIdHex; public String keyIdHex;
public boolean revoked; public boolean revoked;
public boolean expired;
public Date date; // TODO: not displayed public Date date; // TODO: not displayed
public String fingerprintHex; public String fingerprintHex;
public int bitStrength; public int bitStrength;
@ -68,6 +69,7 @@ public class ImportKeysListEntry implements Serializable, Parcelable {
dest.writeStringList(userIds); dest.writeStringList(userIds);
dest.writeLong(keyId); dest.writeLong(keyId);
dest.writeByte((byte) (revoked ? 1 : 0)); dest.writeByte((byte) (revoked ? 1 : 0));
dest.writeByte((byte) (expired ? 1 : 0));
dest.writeSerializable(date); dest.writeSerializable(date);
dest.writeString(fingerprintHex); dest.writeString(fingerprintHex);
dest.writeString(keyIdHex); dest.writeString(keyIdHex);
@ -89,6 +91,7 @@ public class ImportKeysListEntry implements Serializable, Parcelable {
source.readStringList(vr.userIds); source.readStringList(vr.userIds);
vr.keyId = source.readLong(); vr.keyId = source.readLong();
vr.revoked = source.readByte() == 1; vr.revoked = source.readByte() == 1;
vr.expired = source.readByte() == 1;
vr.date = (Date) source.readSerializable(); vr.date = (Date) source.readSerializable();
vr.fingerprintHex = source.readString(); vr.fingerprintHex = source.readString();
vr.keyIdHex = source.readString(); vr.keyIdHex = source.readString();
@ -129,6 +132,14 @@ public class ImportKeysListEntry implements Serializable, Parcelable {
this.mSelected = selected; this.mSelected = selected;
} }
public boolean isExpired() {
return expired;
}
public void setExpired(boolean expired) {
this.expired = expired;
}
public long getKeyId() { public long getKeyId() {
return keyId; return keyId;
} }