Apply some CR suggestions
This commit is contained in:
@@ -56,6 +56,7 @@ public class SecurityTokenHelper {
|
||||
private static final int MAX_APDU_NE_EXT = 65536;
|
||||
|
||||
private static final int APDU_SW_SUCCESS = 0x9000;
|
||||
private static final int APDU_SW1_RESPONSE_AVAILABLE = 0x61;
|
||||
|
||||
private static final int MASK_CLA_CHAINING = 1 << 4;
|
||||
|
||||
@@ -530,7 +531,7 @@ public class SecurityTokenHelper {
|
||||
result.write(lastResponse.getData());
|
||||
|
||||
// Receive
|
||||
while (lastResponse.getSW1() == 0x61) {
|
||||
while (lastResponse.getSW1() == APDU_SW1_RESPONSE_AVAILABLE) {
|
||||
// GET RESPONSE ISO/IEC 7816-4 par.7.6.1
|
||||
CommandAPDU getResponse = new CommandAPDU(0x00, 0xC0, 0x00, 0x00, lastResponse.getSW2());
|
||||
lastResponse = mTransport.transceive(getResponse);
|
||||
|
||||
@@ -152,7 +152,7 @@ public class CcidTransceiver {
|
||||
}
|
||||
}
|
||||
|
||||
private byte getStatus(byte[] bytes) {
|
||||
private static byte getStatus(byte[] bytes) {
|
||||
return (byte) ((bytes[7] >> 6) & 0x03);
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ public class CcidTransceiver {
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isDataBlockNotReady(byte[] bytes) {
|
||||
private static boolean isDataBlockNotReady(byte[] bytes) {
|
||||
return getStatus(bytes) == 2;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user