mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-11 03:25:05 -05:00
Store origin with ImportKeysListEntry
This commit is contained in:
parent
3110122a85
commit
8e5767f967
@ -244,6 +244,7 @@ public class HkpKeyserver extends Keyserver {
|
|||||||
while (matcher.find()) {
|
while (matcher.find()) {
|
||||||
final ImportKeysListEntry entry = new ImportKeysListEntry();
|
final ImportKeysListEntry entry = new ImportKeysListEntry();
|
||||||
entry.setQuery(query);
|
entry.setQuery(query);
|
||||||
|
entry.setOrigin("hkp:"+mHost+":"+mPort);
|
||||||
|
|
||||||
entry.setBitStrength(Integer.parseInt(matcher.group(3)));
|
entry.setBitStrength(Integer.parseInt(matcher.group(3)));
|
||||||
|
|
||||||
|
@ -52,6 +52,7 @@ public class ImportKeysListEntry implements Serializable, Parcelable {
|
|||||||
public String mPrimaryUserId;
|
public String mPrimaryUserId;
|
||||||
private String mExtraData;
|
private String mExtraData;
|
||||||
private String mQuery;
|
private String mQuery;
|
||||||
|
private String mOrigin;
|
||||||
|
|
||||||
private boolean mSelected;
|
private boolean mSelected;
|
||||||
|
|
||||||
@ -77,6 +78,7 @@ public class ImportKeysListEntry implements Serializable, Parcelable {
|
|||||||
dest.writeInt(mBytes.length);
|
dest.writeInt(mBytes.length);
|
||||||
dest.writeByteArray(mBytes);
|
dest.writeByteArray(mBytes);
|
||||||
dest.writeString(mExtraData);
|
dest.writeString(mExtraData);
|
||||||
|
dest.writeString(mOrigin);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final Creator<ImportKeysListEntry> CREATOR = new Creator<ImportKeysListEntry>() {
|
public static final Creator<ImportKeysListEntry> CREATOR = new Creator<ImportKeysListEntry>() {
|
||||||
@ -97,6 +99,7 @@ public class ImportKeysListEntry implements Serializable, Parcelable {
|
|||||||
vr.mBytes = new byte[source.readInt()];
|
vr.mBytes = new byte[source.readInt()];
|
||||||
source.readByteArray(vr.mBytes);
|
source.readByteArray(vr.mBytes);
|
||||||
vr.mExtraData = source.readString();
|
vr.mExtraData = source.readString();
|
||||||
|
vr.mOrigin = source.readString();
|
||||||
|
|
||||||
return vr;
|
return vr;
|
||||||
}
|
}
|
||||||
@ -218,6 +221,14 @@ public class ImportKeysListEntry implements Serializable, Parcelable {
|
|||||||
mQuery = query;
|
mQuery = query;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getOrigin() {
|
||||||
|
return mOrigin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrigin(String origin) {
|
||||||
|
mOrigin = origin;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor for later querying from keyserver
|
* Constructor for later querying from keyserver
|
||||||
*/
|
*/
|
||||||
|
@ -87,6 +87,7 @@ public class KeybaseKeyserver extends Keyserver {
|
|||||||
|
|
||||||
final ImportKeysListEntry entry = new ImportKeysListEntry();
|
final ImportKeysListEntry entry = new ImportKeysListEntry();
|
||||||
entry.setQuery(mQuery);
|
entry.setQuery(mQuery);
|
||||||
|
entry.setOrigin("keybase.io");
|
||||||
|
|
||||||
String keybaseId = JWalk.getString(match, "components", "username", "val");
|
String keybaseId = JWalk.getString(match, "components", "username", "val");
|
||||||
String fullName = JWalk.getString(match, "components", "full_name", "val");
|
String fullName = JWalk.getString(match, "components", "full_name", "val");
|
||||||
|
Loading…
Reference in New Issue
Block a user