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

Commit 6888dfde authored by Jordan Liu's avatar Jordan Liu
Browse files

Add status word codes for EAP-AKA

These codes can be returned by the modem when responding to calls to
TelephonyManager#getIccSimChallengeResponse(authType=EAP_AKA).
See the spec at TS 31.102 section 7.3.1.

Bug: 74392381
Test: manual
Change-Id: Iebb9611b21335e641a364ffa92d43a305b92ac8e
parent c09a6a7d
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.internal.telephony.uicc;

import android.os.Build;

/**
 * {@hide}
@@ -154,6 +155,12 @@ IccIoResult {
                            + "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
                    case 0x62: return "authentication error, application specific";
                    case 0x64: return "authentication error, security context not supported";
                    case 0x65: return "key freshness failure";
                    case 0x66: return "authentication error, no memory space available";
                    case 0x67: return "authentication error, no memory space available in EF_MUK";
                }
                break;
            case 0x9E: return null; // success
@@ -181,7 +188,9 @@ IccIoResult {
    @Override
    public String toString() {
        return "IccIoResult sw1:0x" + Integer.toHexString(sw1) + " sw2:0x"
                + Integer.toHexString(sw2) + ((!success()) ? " Error: " + getErrorString() : "");
                + Integer.toHexString(sw2) + " Payload: "
                + ((Build.IS_DEBUGGABLE && Build.IS_ENG) ? payload : "*******")
                + ((!success()) ? " Error: " + getErrorString() : "");
    }

    /**