Fail on unknown key ids on API, Key item design consistency for API

This commit is contained in:
Dominik Schürmann
2014-10-26 00:18:45 +02:00
parent e4391c282d
commit 94693efbe5
4 changed files with 19 additions and 3 deletions

View File

@@ -384,7 +384,8 @@ public class SelectPublicKeyFragment extends ListFragmentWorkaround implements T
KeyFormattingUtils.setStatusImage(mContext, h.statusIcon, KeyFormattingUtils.STATE_VERIFIED);
enabled = true;
} else {
h.statusIcon.setVisibility(View.GONE);
h.statusIcon.setVisibility(View.VISIBLE);
KeyFormattingUtils.setStatusImage(mContext, h.statusIcon, KeyFormattingUtils.STATE_UNVERIFIED);
enabled = true;
}
}

View File

@@ -133,11 +133,11 @@ abstract public class SelectKeyCursorAdapter extends CursorAdapter {
boolean enabled;
if (cursor.getInt(mIndexIsRevoked) != 0) {
h.statusIcon.setVisibility(View.VISIBLE);
KeyFormattingUtils.setStatusImage(mContext, h.statusIcon, KeyFormattingUtils.STATE_REVOKED);
KeyFormattingUtils.setStatusImage(mContext, h.statusIcon, null, KeyFormattingUtils.STATE_REVOKED, true);
enabled = false;
} else if (cursor.getInt(mIndexIsExpiry) != 0) {
h.statusIcon.setVisibility(View.VISIBLE);
KeyFormattingUtils.setStatusImage(mContext, h.statusIcon, KeyFormattingUtils.STATE_EXPIRED);
KeyFormattingUtils.setStatusImage(mContext, h.statusIcon, null, KeyFormattingUtils.STATE_EXPIRED, true);
enabled = false;
} else {
h.statusIcon.setVisibility(View.GONE);