mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-27 11:12:15 -05:00
add apg's fix for Key id display
This commit is contained in:
parent
52838a50c1
commit
977e76e7e4
@ -477,7 +477,11 @@ public class PgpKeyHelper {
|
||||
* @return
|
||||
*/
|
||||
public static String convertKeyIdToHex(long keyId) {
|
||||
return "0x" + ((keyId >> 32) > 0 ? convertKeyIdToHex32bit(keyId >> 32) : "") + convertKeyIdToHex32bit(keyId);
|
||||
return "0x" + convertKeyIdToHex32bit(keyId >> 32) + convertKeyIdToHex32bit(keyId);
|
||||
}
|
||||
|
||||
public static String convertKeyIdToHexShort(long keyId) {
|
||||
return "0x" + convertKeyIdToHex32bit(keyId);
|
||||
}
|
||||
|
||||
private static String convertKeyIdToHex32bit(long keyId) {
|
||||
|
@ -199,7 +199,7 @@ public class CertifyKeyActivity extends ActionBarActivity implements
|
||||
// the first key here is our master key
|
||||
if (data.moveToFirst()) {
|
||||
long keyId = data.getLong(INDEX_MASTER_KEY_ID);
|
||||
String keyIdStr = PgpKeyHelper.convertKeyIdToHex(keyId);
|
||||
String keyIdStr = PgpKeyHelper.convertKeyIdToHexShort(keyId);
|
||||
((TextView) findViewById(R.id.key_id)).setText(keyIdStr);
|
||||
|
||||
String mainUserId = data.getString(INDEX_USER_ID);
|
||||
|
@ -71,7 +71,7 @@ public class SelectSecretKeyLayoutFragment extends Fragment {
|
||||
getActivity(), secretKeyId);
|
||||
if (keyRing != null) {
|
||||
PGPSecretKey key = PgpKeyHelper.getMasterKey(keyRing);
|
||||
String masterkeyIdHex = PgpKeyHelper.convertKeyIdToHex(secretKeyId);
|
||||
String masterkeyIdHex = PgpKeyHelper.convertKeyIdToHexShort(secretKeyId);
|
||||
|
||||
if (key != null) {
|
||||
String userId = PgpKeyHelper.getMainUserIdSafe(getActivity(), key);
|
||||
|
@ -115,7 +115,7 @@ public class SelectKeyCursorAdapter extends HighlightQueryCursorAdapter {
|
||||
// TODO: needed to key id to no?
|
||||
keyId.setText(R.string.no_key);
|
||||
long masterKeyId = cursor.getLong(mIndexMasterKeyId);
|
||||
keyId.setText(PgpKeyHelper.convertKeyIdToHex(masterKeyId));
|
||||
keyId.setText(PgpKeyHelper.convertKeyIdToHexShort(masterKeyId));
|
||||
|
||||
// TODO: needed to set unknown_status?
|
||||
status.setText(R.string.unknown_status);
|
||||
|
@ -86,7 +86,7 @@ public class ViewKeyKeysAdapter extends CursorAdapter {
|
||||
ImageView signIcon = (ImageView) view.findViewById(R.id.ic_signKey);
|
||||
ImageView revokedKeyIcon = (ImageView) view.findViewById(R.id.ic_revokedKey);
|
||||
|
||||
String keyIdStr = PgpKeyHelper.convertKeyIdToHex(cursor.getLong(mIndexKeyId));
|
||||
String keyIdStr = PgpKeyHelper.convertKeyIdToHexShort(cursor.getLong(mIndexKeyId));
|
||||
String algorithmStr = PgpKeyHelper.getAlgorithmInfo(cursor.getInt(mIndexAlgorithm),
|
||||
cursor.getInt(mIndexKeySize));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user