blob: b3acc67900ae71f047f4bd46bf985b694da0ddc3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
package org.sufficientlysecure.keychain.pgp.linked;
import org.spongycastle.util.Strings;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.pgp.WrappedUserAttribute;
import java.net.URI;
import android.content.Context;
import android.support.annotation.DrawableRes;
/** The RawLinkedIdentity contains raw parsed data from a Linked Identity subpacket. */
public class RawLinkedIdentity {
public final URI mUri;
protected RawLinkedIdentity(URI uri) {
mUri = uri;
}
public byte[] getEncoded() {
return Strings.toUTF8ByteArray(mUri.toASCIIString());
}
public WrappedUserAttribute toUserAttribute () {
return WrappedUserAttribute.fromSubpacket(WrappedUserAttribute.UAT_LINKED_ID, getEncoded());
}
public @DrawableRes int getDisplayIcon() {
return R.drawable.ic_warning_grey_24dp;
}
public String getDisplayTitle(Context context) {
return "unknown";
}
public String getDisplayComment(Context context) {
return null;
}
}
|