From b8462de6e53a0e6a54e124ddc5da68abcae4d8bf Mon Sep 17 00:00:00 2001 From: Thialfihar Date: Wed, 14 May 2014 17:18:46 +0200 Subject: [PATCH] Rename fingerPrint to fingerprint --- .../keychain/keyimport/HkpKeyServer.java | 2 +- .../keychain/keyimport/ImportKeysListEntry.java | 16 ++++++++-------- .../keychain/service/KeychainIntentService.java | 8 ++++---- .../keychain/ui/adapter/ImportKeysAdapter.java | 4 ++-- .../ui/adapter/ImportKeysListServerLoader.java | 2 +- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/keyimport/HkpKeyServer.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/keyimport/HkpKeyServer.java index 85ce6bfcc..8d1e1f460 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/keyimport/HkpKeyServer.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/keyimport/HkpKeyServer.java @@ -247,7 +247,7 @@ public class HkpKeyServer extends KeyServer { // see http://bit.ly/1d4bxbk and http://bit.ly/1gD1wwr String fingerprintOrKeyId = matcher.group(1); if (fingerprintOrKeyId.length() > 16) { - entry.setFingerPrintHex(fingerprintOrKeyId.toLowerCase(Locale.US)); + entry.setFingerprintHex(fingerprintOrKeyId.toLowerCase(Locale.US)); entry.setKeyIdHex("0x" + fingerprintOrKeyId.substring(fingerprintOrKeyId.length() - 16, fingerprintOrKeyId.length())); } else { diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/keyimport/ImportKeysListEntry.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/keyimport/ImportKeysListEntry.java index 60416c3d0..4a8d58e56 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/keyimport/ImportKeysListEntry.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/keyimport/ImportKeysListEntry.java @@ -45,7 +45,7 @@ public class ImportKeysListEntry implements Serializable, Parcelable { public String keyIdHex; public boolean revoked; public Date date; // TODO: not displayed - public String fingerPrintHex; + public String fingerprintHex; public int bitStrength; public String algorithm; public boolean secretKey; @@ -67,7 +67,7 @@ public class ImportKeysListEntry implements Serializable, Parcelable { dest.writeLong(keyId); dest.writeByte((byte) (revoked ? 1 : 0)); dest.writeSerializable(date); - dest.writeString(fingerPrintHex); + dest.writeString(fingerprintHex); dest.writeString(keyIdHex); dest.writeInt(bitStrength); dest.writeString(algorithm); @@ -87,7 +87,7 @@ public class ImportKeysListEntry implements Serializable, Parcelable { vr.keyId = source.readLong(); vr.revoked = source.readByte() == 1; vr.date = (Date) source.readSerializable(); - vr.fingerPrintHex = source.readString(); + vr.fingerprintHex = source.readString(); vr.keyIdHex = source.readString(); vr.bitStrength = source.readInt(); vr.algorithm = source.readString(); @@ -153,12 +153,12 @@ public class ImportKeysListEntry implements Serializable, Parcelable { this.date = date; } - public String getFingerPrintHex() { - return fingerPrintHex; + public String getFingerprintHex() { + return fingerprintHex; } - public void setFingerPrintHex(String fingerPrintHex) { - this.fingerPrintHex = fingerPrintHex; + public void setFingerprintHex(String fingerprintHex) { + this.fingerprintHex = fingerprintHex; } public int getBitStrength() { @@ -271,7 +271,7 @@ public class ImportKeysListEntry implements Serializable, Parcelable { this.keyIdHex = PgpKeyHelper.convertKeyIdToHex(keyId); this.revoked = key.isRevoked(); - this.fingerPrintHex = PgpKeyHelper.convertFingerprintToHex(key.getFingerprint()); + this.fingerprintHex = PgpKeyHelper.convertFingerprintToHex(key.getFingerprint()); this.bitStrength = key.getBitStrength(); final int algorithm = key.getAlgorithm(); this.algorithm = PgpKeyHelper.getAlgorithmInfo(context, algorithm); diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java index ca4f5869b..805bb9dad 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java @@ -802,8 +802,8 @@ public class KeychainIntentService extends IntentService for (ImportKeysListEntry entry : entries) { // if available use complete fingerprint for get request byte[] downloadedKeyBytes; - if (entry.getFingerPrintHex() != null) { - downloadedKeyBytes = server.get("0x" + entry.getFingerPrintHex()).getBytes(); + if (entry.getFingerprintHex() != null) { + downloadedKeyBytes = server.get("0x" + entry.getFingerprintHex()).getBytes(); } else { downloadedKeyBytes = server.get(entry.getKeyIdHex()).getBytes(); } @@ -829,10 +829,10 @@ public class KeychainIntentService extends IntentService } // verify downloaded key by comparing fingerprints - if (entry.getFingerPrintHex() != null) { + if (entry.getFingerprintHex() != null) { String downloadedKeyFp = PgpKeyHelper.convertFingerprintToHex( downloadedKey.getPublicKey().getFingerprint()); - if (downloadedKeyFp.equals(entry.getFingerPrintHex())) { + if (downloadedKeyFp.equals(entry.getFingerprintHex())) { Log.d(Constants.TAG, "fingerprint of downloaded key is the same as " + "the requested fingerprint!"); } else { diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ImportKeysAdapter.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ImportKeysAdapter.java index 70b9f3f7e..c1fb9ae94 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ImportKeysAdapter.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ImportKeysAdapter.java @@ -146,9 +146,9 @@ public class ImportKeysAdapter extends ArrayAdapter { holder.keyId.setText(entry.keyIdHex); - if (entry.fingerPrintHex != null) { + if (entry.fingerprintHex != null) { holder.fingerprint.setVisibility(View.VISIBLE); - holder.fingerprint.setText(PgpKeyHelper.colorizeFingerprint(entry.fingerPrintHex)); + holder.fingerprint.setText(PgpKeyHelper.colorizeFingerprint(entry.fingerprintHex)); } else { holder.fingerprint.setVisibility(View.GONE); } diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ImportKeysListServerLoader.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ImportKeysListServerLoader.java index 4175592d6..d5329e6f6 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ImportKeysListServerLoader.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ImportKeysListServerLoader.java @@ -108,7 +108,7 @@ public class ImportKeysListServerLoader * set fingerprint explicitly after query * to enforce a check when the key is imported by KeychainIntentService */ - uniqueEntry.setFingerPrintHex(fingerprint); + uniqueEntry.setFingerprintHex(fingerprint); uniqueEntry.setSelected(true); mEntryList.add(uniqueEntry); }