work on LinkedIdViewFragment
This commit is contained in:
@@ -13,6 +13,7 @@ import java.nio.ByteBuffer;
|
||||
import java.util.Arrays;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.support.annotation.DrawableRes;
|
||||
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ import java.util.Set;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.support.annotation.DrawableRes;
|
||||
|
||||
public abstract class LinkedResource {
|
||||
@@ -105,5 +106,11 @@ public abstract class LinkedResource {
|
||||
public abstract @DrawableRes int getDisplayIcon();
|
||||
public abstract String getDisplayTitle(Context context);
|
||||
public abstract String getDisplayComment(Context context);
|
||||
public boolean isViewable() {
|
||||
return false;
|
||||
}
|
||||
public Intent getViewIntent() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import java.net.URI;
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.support.annotation.DrawableRes;
|
||||
|
||||
/** The RawLinkedIdentity contains raw parsed data from a Linked Identity subpacket. */
|
||||
|
||||
@@ -110,11 +110,11 @@ public class DnsResource extends LinkedCookieResource {
|
||||
|
||||
@Override
|
||||
public String getDisplayTitle(Context context) {
|
||||
return "dns";
|
||||
return "Domain Name";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDisplayComment(Context context) {
|
||||
return null;
|
||||
return mFqdn;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package org.sufficientlysecure.keychain.pgp.linked.resources;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.support.annotation.DrawableRes;
|
||||
|
||||
import com.textuality.keybase.lib.Search;
|
||||
@@ -109,12 +111,23 @@ public class GenericHttpsResource extends LinkedCookieResource {
|
||||
|
||||
@Override
|
||||
public String getDisplayTitle(Context context) {
|
||||
return "https";
|
||||
return "Website (HTTPS)";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDisplayComment(Context context) {
|
||||
return null;
|
||||
return mSubUri.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isViewable() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Intent getViewIntent() {
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
intent.setData(Uri.parse(mSubUri.toString()));
|
||||
return intent;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user