*/
protected void checkPINOperation(int pinID, int unblockPinID,
int action) {
if (pins == null) {
throw new SecurityException();
}
boolean found = false;
for (int i = 0; i < pins.length; i++) {
found |= (pins[i].id == pinID);
}
attr1 = parent.getPINAttributes(pinID);
if (! found || attr1 == null || ! attr1.check(action)) {
throw new SecurityException();
}
if (action == CMD_UNBLOCK) {
attr2 = parent.getPINAttributes(unblockPinID);
if (attr2 == null || ! attr2.isUnblockingPIN()) {
throw new SecurityException();
}
} else {
attr2 = null;
}
}