本文整理汇总了Java中org.openintents.openpgp.OpenPgpSignatureResult.RESULT_KEY_MISSING属性的典型用法代码示例。如果您正苦于以下问题:Java OpenPgpSignatureResult.RESULT_KEY_MISSING属性的具体用法?Java OpenPgpSignatureResult.RESULT_KEY_MISSING怎么用?Java OpenPgpSignatureResult.RESULT_KEY_MISSING使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.openintents.openpgp.OpenPgpSignatureResult
的用法示例。
在下文中一共展示了OpenPgpSignatureResult.RESULT_KEY_MISSING属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: signatureResultToUiText
public static String signatureResultToUiText(Context ctx, OpenPgpSignatureResult sr) {
switch (sr.getResult()) {
case OpenPgpSignatureResult.RESULT_INVALID_INSECURE:
return ctx.getString(R.string.signature_result__invalid_insecure);
case OpenPgpSignatureResult.RESULT_INVALID_KEY_EXPIRED:
return ctx.getString(R.string.signature_result__invalid_key_expired);
case OpenPgpSignatureResult.RESULT_INVALID_KEY_REVOKED:
return ctx.getString(R.string.signature_result__invalid_key_revoked);
case OpenPgpSignatureResult.RESULT_INVALID_SIGNATURE:
return ctx.getString(R.string.signature_result__invalid);
case OpenPgpSignatureResult.RESULT_KEY_MISSING:
return ctx.getString(R.string.signature_result__key_missing);
case OpenPgpSignatureResult.RESULT_NO_SIGNATURE:
return ctx.getString(R.string.signature_result__no_signature);
case OpenPgpSignatureResult.RESULT_VALID_CONFIRMED:
return ctx.getString(R.string.signature_result__valid_confirmed);
case OpenPgpSignatureResult.RESULT_VALID_UNCONFIRMED:
return ctx.getString(R.string.signature_result__valid_unconfirmed);
default:
return null;
}
}
示例2: signatureResultToUiColorResId
public static int signatureResultToUiColorResId(OpenPgpSignatureResult sr) {
switch (sr.getResult()) {
case OpenPgpSignatureResult.RESULT_INVALID_INSECURE:
case OpenPgpSignatureResult.RESULT_INVALID_KEY_EXPIRED:
case OpenPgpSignatureResult.RESULT_INVALID_KEY_REVOKED:
return R.color.colorWarning;
case OpenPgpSignatureResult.RESULT_INVALID_SIGNATURE:
case OpenPgpSignatureResult.RESULT_KEY_MISSING:
case OpenPgpSignatureResult.RESULT_NO_SIGNATURE:
return R.color.colorError;
case OpenPgpSignatureResult.RESULT_VALID_UNCONFIRMED:
case OpenPgpSignatureResult.RESULT_VALID_CONFIRMED:
return R.color.colorOk;
default:
return 0;
}
}
示例3: signatureResultToUiIconRes
public static int signatureResultToUiIconRes(OpenPgpSignatureResult sr, boolean small) {
switch (sr.getResult()) {
case OpenPgpSignatureResult.RESULT_INVALID_INSECURE:
case OpenPgpSignatureResult.RESULT_INVALID_KEY_EXPIRED:
case OpenPgpSignatureResult.RESULT_INVALID_KEY_REVOKED:
case OpenPgpSignatureResult.RESULT_INVALID_SIGNATURE:
return small ? R.drawable.ic_error_red_18dp : R.drawable.ic_error_red_24dp;
case OpenPgpSignatureResult.RESULT_NO_SIGNATURE:
return small ? R.drawable.ic_warning_red_18dp : R.drawable.ic_warning_red_24dp;
case OpenPgpSignatureResult.RESULT_KEY_MISSING:
return small ? R.drawable.ic_warning_orange_18dp : R.drawable.ic_warning_orange_24dp;
case OpenPgpSignatureResult.RESULT_VALID_UNCONFIRMED:
return small ? R.drawable.ic_done_orange_18dp : R.drawable.ic_done_orange_24dp;
case OpenPgpSignatureResult.RESULT_VALID_CONFIRMED:
return small ? R.drawable.ic_done_all_green_a700_18dp : R.drawable.ic_done_all_green_a700_24dp;
default:
return 0;
}
}
示例4: signatureResultToUiColorResId_KeyOnly
public static int signatureResultToUiColorResId_KeyOnly(OpenPgpSignatureResult sr) {
switch (sr.getResult()) {
case OpenPgpSignatureResult.RESULT_INVALID_INSECURE:
case OpenPgpSignatureResult.RESULT_INVALID_KEY_EXPIRED:
case OpenPgpSignatureResult.RESULT_INVALID_KEY_REVOKED:
case OpenPgpSignatureResult.RESULT_INVALID_SIGNATURE:
case OpenPgpSignatureResult.RESULT_KEY_MISSING:
case OpenPgpSignatureResult.RESULT_NO_SIGNATURE:
case OpenPgpSignatureResult.RESULT_VALID_UNCONFIRMED:
return R.color.colorWarning;
case OpenPgpSignatureResult.RESULT_VALID_CONFIRMED:
return R.color.colorOk;
default:
return 0;
}
}
示例5: signatureResultToUiIconRes_KeyOnly
public static int signatureResultToUiIconRes_KeyOnly(OpenPgpSignatureResult sr, boolean small) {
switch (sr.getResult()) {
case OpenPgpSignatureResult.RESULT_INVALID_INSECURE:
case OpenPgpSignatureResult.RESULT_INVALID_KEY_EXPIRED:
case OpenPgpSignatureResult.RESULT_INVALID_KEY_REVOKED:
case OpenPgpSignatureResult.RESULT_INVALID_SIGNATURE:
case OpenPgpSignatureResult.RESULT_NO_SIGNATURE:
case OpenPgpSignatureResult.RESULT_KEY_MISSING:
case OpenPgpSignatureResult.RESULT_VALID_UNCONFIRMED:
return small ? R.drawable.ic_warning_red_18dp : R.drawable.ic_warning_red_24dp;
case OpenPgpSignatureResult.RESULT_VALID_CONFIRMED:
return small ? R.drawable.ic_done_green_a700_18dp : R.drawable.ic_done_green_a700_24dp;
default:
return 0;
}
}