diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-09-18 22:05:27 +0200 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-09-18 22:05:27 +0200 |
commit | a454bfd7012993fe85b7d0bc57fbe8fea94b45e8 (patch) | |
tree | 7891e5e30ff9e53d98ef8809e20bb4d171897c7b /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java | |
parent | a77c217b82a567a71ff22a419772fce861c9df95 (diff) | |
download | open-keychain-a454bfd7012993fe85b7d0bc57fbe8fea94b45e8.tar.gz open-keychain-a454bfd7012993fe85b7d0bc57fbe8fea94b45e8.tar.bz2 open-keychain-a454bfd7012993fe85b7d0bc57fbe8fea94b45e8.zip |
Use key icons in import, prettify items
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java index 31427cce2..55354cdec 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java @@ -30,6 +30,7 @@ import org.openintents.openpgp.OpenPgpMetadata; import org.openintents.openpgp.OpenPgpError; import org.openintents.openpgp.OpenPgpSignatureResult; import org.openintents.openpgp.util.OpenPgpApi; +import org.spongycastle.util.encoders.Hex; import org.sufficientlysecure.keychain.nfc.NfcActivity; import org.sufficientlysecure.keychain.Constants; import org.sufficientlysecure.keychain.pgp.PassphraseCacheInterface; @@ -244,10 +245,17 @@ public class OpenPgpService extends RemoteService { } byte[] nfcSignedHash = data.getByteArrayExtra(OpenPgpApi.EXTRA_NFC_SIGNED_HASH); + if (nfcSignedHash != null) { + Log.d(Constants.TAG, "nfcSignedHash:" + Hex.toHexString(nfcSignedHash)); + } else { + Log.d(Constants.TAG, "nfcSignedHash: null"); + } + // carefully: only set if timestamp exists Date nfcCreationDate = null; - long nfcCreationTimestamp = data.getLongExtra(OpenPgpApi.EXTRA_NFC_SIG_CREATION_TIMESTAMP, 0); - if (nfcCreationTimestamp != 0) { + long nfcCreationTimestamp = data.getLongExtra(OpenPgpApi.EXTRA_NFC_SIG_CREATION_TIMESTAMP, -1); + Log.d(Constants.TAG, "nfcCreationTimestamp: " + nfcCreationTimestamp); + if (nfcCreationTimestamp != -1) { nfcCreationDate = new Date(nfcCreationTimestamp); } @@ -406,8 +414,8 @@ public class OpenPgpService extends RemoteService { byte[] nfcSignedHash = data.getByteArrayExtra(OpenPgpApi.EXTRA_NFC_SIGNED_HASH); // carefully: only set if timestamp exists Date nfcCreationDate = null; - long nfcCreationTimestamp = data.getLongExtra(OpenPgpApi.EXTRA_NFC_SIG_CREATION_TIMESTAMP, 0); - if (nfcCreationTimestamp != 0) { + long nfcCreationTimestamp = data.getLongExtra(OpenPgpApi.EXTRA_NFC_SIG_CREATION_TIMESTAMP, -1); + if (nfcCreationTimestamp != -1) { nfcCreationDate = new Date(nfcCreationTimestamp); } |