Show revoked and expired for private keys

This commit is contained in:
Dominik Schürmann 2014-07-31 23:54:02 +02:00
parent 3451111edd
commit 55b764eb1d

View File

@ -475,13 +475,7 @@ public class KeyListFragment extends LoaderFragment
}
}
{ // set edit button and revoked info, 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
{ // set edit button and status, specific by key type
boolean isRevoked = cursor.getInt(INDEX_IS_REVOKED) > 0;
boolean isExpired = !cursor.isNull(INDEX_EXPIRY)
@ -502,16 +496,21 @@ public class KeyListFragment extends LoaderFragment
PorterDuff.Mode.SRC_ATOP);
h.mStatus.setVisibility(View.VISIBLE);
} 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(
getResources().getDrawable(R.drawable.status_signature_verified_cutout));
h.mStatus.setColorFilter(getResources().getColor(R.color.android_green_light),
PorterDuff.Mode.SRC_ATOP);
h.mStatus.setVisibility(View.VISIBLE);
}
} else {
h.mStatus.setVisibility(View.GONE);
}
}
}
}