Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f297834e authored by Hunter Knepshield's avatar Hunter Knepshield Committed by android-build-merger
Browse files

Merge "Update IccIoResult#getErrorString."

am: de40346f

Change-Id: I95986db27d90a84a7fa39074fe5f059f6fb27c2c
parents 1b175806 de40346f
Loading
Loading
Loading
Loading
+53 −50
Original line number Diff line number Diff line
@@ -34,88 +34,92 @@ IccIoResult {
        // All error codes below are copied directly from their respective specification
        // without modification except in cases where necessary string formatting has been omitted.
        switch(sw1) {
            case 0x61: return sw2 + " more response bytes available";
            case 0x62:
                switch(sw2) {
                    case 0x00: return "No information given,"
                    case 0x00: return "no information given,"
                            + " state of non volatile memory unchanged";
                    case 0x81: return "Part of returned data may be corrupted";
                    case 0x82: return "End of file/record reached before reading Le bytes";
                    case 0x83: return "Selected file invalidated";
                    case 0x84: return "Selected file in termination state";
                    case 0xF1: return "More data available";
                    case 0xF2: return "More data available and proactive command pending";
                    case 0xF3: return "Response data available";
                    case 0x81: return "part of returned data may be corrupted";
                    case 0x82: return "end of file/record reached before reading Le bytes";
                    case 0x83: return "selected file invalidated";
                    case 0x84: return "selected file in termination state";
                    case 0xF1: return "more data available";
                    case 0xF2: return "more data available and proactive command pending";
                    case 0xF3: return "response data available";
                }
                break;
            case 0x63:
                if (sw2 >> 4 == 0x0C) {
                    return "Command successful but after using an internal"
                        + "update retry routine but Verification failed";
                    int retries = sw2 & 0x0F;
                    return "command successful but after using an internal update retry routine "
                            + retries + " times,"
                            + " or verification failed, " + retries + " retries remaining";
                }
                switch(sw2) {
                    case 0xF1: return "More data expected";
                    case 0xF2: return "More data expected and proactive command pending";
                    case 0xF1: return "more data expected";
                    case 0xF2: return "more data expected and proactive command pending";
                }
                break;
            case 0x64:
                switch(sw2) {
                    case 0x00: return "No information given,"
                    case 0x00: return "no information given,"
                               + " state of non-volatile memory unchanged";
                }
                break;
            case 0x65:
                switch(sw2) {
                    case 0x00: return "No information given, state of non-volatile memory changed";
                    case 0x81: return "Memory problem";
                    case 0x00: return "no information given, state of non-volatile memory changed";
                    case 0x81: return "memory problem";
                }
                break;
            case 0x67:
                switch(sw2) {
                    case 0x00: return "incorrect parameter P3";
                    default: return "The interpretation of this status word is command dependent";
                }
                // break;
            case 0x6B: return "incorrect parameter P1 or P2";
            case 0x6D: return "unknown instruction code given in the command";
            case 0x6E: return "wrong instruction class given in the command";
            case 0x6F:
                switch(sw2) {
                    case 0x00: return "technical problem with no diagnostic given";
                    default: return "The interpretation of this status word is command dependent";
                    default: return "the interpretation of this status word is command dependent";
                }
                // break;
            case 0x68:
                switch(sw2) {
                    case 0x00: return "No information given";
                    case 0x81: return "Logical channel not supported";
                    case 0x82: return "Secure messaging not supported";
                    case 0x00: return "no information given";
                    case 0x81: return "logical channel not supported";
                    case 0x82: return "secure messaging not supported";
                }
                break;
            case 0x69:
                switch(sw2) {
                    case 0x00: return "No information given";
                    case 0x81: return "Command incompatible with file structure";
                    case 0x82: return "Security status not satisfied";
                    case 0x83: return "Authentication/PIN method blocked";
                    case 0x84: return "Referenced data invalidated";
                    case 0x85: return "Conditions of use not satisfied";
                    case 0x86: return "Command not allowed (no EF selected)";
                    case 0x89: return "Command not allowed - secure channel -"
                    case 0x00: return "no information given";
                    case 0x81: return "command incompatible with file structure";
                    case 0x82: return "security status not satisfied";
                    case 0x83: return "authentication/PIN method blocked";
                    case 0x84: return "referenced data invalidated";
                    case 0x85: return "conditions of use not satisfied";
                    case 0x86: return "command not allowed (no EF selected)";
                    case 0x89: return "command not allowed - secure channel -"
                            + " security not satisfied";
                }
                break;
            case 0x6A:
                switch(sw2) {
                    case 0x80: return "Incorrect parameters in the data field";
                    case 0x81: return "Function not supported";
                    case 0x82: return "File not found";
                    case 0x83: return "Record not found";
                    case 0x84: return "Not enough memory space";
                    case 0x86: return "Incorrect parameters P1 to P2";
                    case 0x87: return "Lc inconsistent with P1 to P2";
                    case 0x88: return "Referenced data not found";
                    case 0x80: return "incorrect parameters in the data field";
                    case 0x81: return "function not supported";
                    case 0x82: return "file not found";
                    case 0x83: return "record not found";
                    case 0x84: return "not enough memory space";
                    case 0x86: return "incorrect parameters P1 to P2";
                    case 0x87: return "lc inconsistent with P1 to P2";
                    case 0x88: return "referenced data not found";
                }
                break;
            case 0x6B: return "incorrect parameter P1 or P2";
            case 0x6C: return "wrong length, retry with " + sw2;
            case 0x6D: return "unknown instruction code given in the command";
            case 0x6E: return "wrong instruction class given in the command";
            case 0x6F:
                switch(sw2) {
                    case 0x00: return "technical problem with no diagnostic given";
                    default: return "the interpretation of this status word is command dependent";
                }
                // break;
            case 0x90: return null; // success
            case 0x91: return null; // success
            //Status Code 0x92 has contradictory meanings from 11.11 and 102.221 10.2.1.1
@@ -129,9 +133,8 @@ IccIoResult {
                break;
            case 0x93:
                switch(sw2) {
                    case 0x00:
                        return "SIM Application Toolkit is busy. Command cannot be executed"
                            + " at present, further normal commands are allowed.";
                    case 0x00: return "SIM Application Toolkit is busy. Command cannot be executed"
                            + " at present, further normal commands are allowed";
                }
                break;
            case 0x94:
@@ -153,7 +156,7 @@ IccIoResult {
                    case 0x10: return "in contradiction with invalidation status";
                    case 0x40: return "unsuccessful CHV verification, no attempt left/"
                            + "unsuccessful UNBLOCK CHV verification, no attempt left/"
                            + "CHV blocked"
                            + "CHV blocked/"
                            + "UNBLOCK CHV blocked";
                    case 0x50: return "increase cannot be performed, Max value reached";
                    // The definition for these status codes can be found in TS 31.102 7.3.1