mirror of
https://github.com/moparisthebest/open-keychain
synced 2025-02-17 07:30:14 -05:00
Show revoked and expired for private keys
This commit is contained in:
parent
3451111edd
commit
55b764eb1d
@ -475,13 +475,7 @@ public class KeyListFragment extends LoaderFragment
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
{ // set edit button and revoked info, specific by key type
|
{ // set edit button and status, specific by key type
|
||||||
|
|
||||||
if (cursor.getInt(KeyListFragment.INDEX_HAS_ANY_SECRET) != 0) {
|
|
||||||
// this is a secret key
|
|
||||||
h.mStatus.setVisibility(View.GONE);
|
|
||||||
} else {
|
|
||||||
// this is a public key - show if it's revoked, expired, or verified
|
|
||||||
|
|
||||||
boolean isRevoked = cursor.getInt(INDEX_IS_REVOKED) > 0;
|
boolean isRevoked = cursor.getInt(INDEX_IS_REVOKED) > 0;
|
||||||
boolean isExpired = !cursor.isNull(INDEX_EXPIRY)
|
boolean isExpired = !cursor.isNull(INDEX_EXPIRY)
|
||||||
@ -502,16 +496,21 @@ public class KeyListFragment extends LoaderFragment
|
|||||||
PorterDuff.Mode.SRC_ATOP);
|
PorterDuff.Mode.SRC_ATOP);
|
||||||
h.mStatus.setVisibility(View.VISIBLE);
|
h.mStatus.setVisibility(View.VISIBLE);
|
||||||
} else if (isVerified) {
|
} else if (isVerified) {
|
||||||
|
if (cursor.getInt(KeyListFragment.INDEX_HAS_ANY_SECRET) != 0) {
|
||||||
|
// this is a secret key
|
||||||
|
h.mStatus.setVisibility(View.GONE);
|
||||||
|
} else {
|
||||||
|
// this is a public key - show if it's verified
|
||||||
h.mStatus.setImageDrawable(
|
h.mStatus.setImageDrawable(
|
||||||
getResources().getDrawable(R.drawable.status_signature_verified_cutout));
|
getResources().getDrawable(R.drawable.status_signature_verified_cutout));
|
||||||
h.mStatus.setColorFilter(getResources().getColor(R.color.android_green_light),
|
h.mStatus.setColorFilter(getResources().getColor(R.color.android_green_light),
|
||||||
PorterDuff.Mode.SRC_ATOP);
|
PorterDuff.Mode.SRC_ATOP);
|
||||||
h.mStatus.setVisibility(View.VISIBLE);
|
h.mStatus.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
h.mStatus.setVisibility(View.GONE);
|
h.mStatus.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user