aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain/src/main/java/org/sufficientlysecure
diff options
context:
space:
mode:
authorDominik Schürmann <dominik@dominikschuermann.de>2015-04-15 09:55:29 +0200
committerDominik Schürmann <dominik@dominikschuermann.de>2015-04-15 09:55:29 +0200
commitf41758261ffa51274267110d5b0d4dc1de44837e (patch)
treefe8c6991fc23faae07ea3fe8eb02eadaa3086a1c /OpenKeychain/src/main/java/org/sufficientlysecure
parent84deba98867607e139f761cd34665fb44f14069f (diff)
downloadopen-keychain-f41758261ffa51274267110d5b0d4dc1de44837e.tar.gz
open-keychain-f41758261ffa51274267110d5b0d4dc1de44837e.tar.bz2
open-keychain-f41758261ffa51274267110d5b0d4dc1de44837e.zip
Clean up NfcOperationActivity
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure')
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/NfcOperationActivity.java14
1 files changed, 6 insertions, 8 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/NfcOperationActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/NfcOperationActivity.java
index a0b38c2b2..25cc13fcb 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/NfcOperationActivity.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/NfcOperationActivity.java
@@ -27,10 +27,9 @@ import java.io.IOException;
/**
* This class provides a communication interface to OpenPGP applications on ISO SmartCard compliant
* NFC devices.
- *
+ * <p/>
* For the full specs, see http://g10code.com/docs/openpgp-card-2.0.pdf
*/
-@TargetApi(Build.VERSION_CODES.GINGERBREAD_MR1)
public class NfcOperationActivity extends BaseNfcActivity {
public static final String EXTRA_REQUIRED_INPUT = "required_input";
@@ -71,16 +70,15 @@ public class NfcOperationActivity extends BaseNfcActivity {
CryptoInputParcel inputParcel = new CryptoInputParcel(mRequiredInput.mSignatureTime);
switch (mRequiredInput.mType) {
-
- case NFC_DECRYPT:
+ case NFC_DECRYPT: {
for (int i = 0; i < mRequiredInput.mInputHashes.length; i++) {
byte[] hash = mRequiredInput.mInputHashes[i];
byte[] decryptedSessionKey = nfcDecryptSessionKey(hash);
inputParcel.addCryptoData(hash, decryptedSessionKey);
}
break;
-
- case NFC_SIGN:
+ }
+ case NFC_SIGN: {
for (int i = 0; i < mRequiredInput.mInputHashes.length; i++) {
byte[] hash = mRequiredInput.mInputHashes[i];
int algo = mRequiredInput.mSignAlgos[i];
@@ -88,6 +86,7 @@ public class NfcOperationActivity extends BaseNfcActivity {
inputParcel.addCryptoData(hash, signedHash);
}
break;
+ }
}
if (mServiceIntent != null) {
@@ -100,7 +99,6 @@ public class NfcOperationActivity extends BaseNfcActivity {
}
finish();
-
}
@Override
@@ -120,6 +118,6 @@ public class NfcOperationActivity extends BaseNfcActivity {
this, mRequiredInput.getMasterKeyId(), mRequiredInput.getSubKeyId());
obtainYubikeyPin(RequiredInputParcel.createRequiredPassphrase(mRequiredInput));
-
}
+
}