From 4888d9aca2094a8c482b3d35179b54215a9e6f86 Mon Sep 17 00:00:00 2001 From: Alex Lin Date: Thu, 23 Jan 2020 12:55:40 -0800 Subject: [PATCH] Rename ErrorCode Renamed ErrorCode from ERROR_EUICC_GSMA_INSTALL_ERROR to ERROR_INSTALL_PROFILE, and updated javadocs Bug: 143107744 Test: atest EuiccManagerTest Change-Id: I3c2dcd2ff4d3d037997c6fee6278ffd706671d3f Merged-In: I3c2dcd2ff4d3d037997c6fee6278ffd706671d3f --- api/current.txt | 2 +- .../android/telephony/euicc/EuiccManager.java | 25 ++++++++++++++----- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/api/current.txt b/api/current.txt index fc73d2568d7a6..2a6b03614ebb8 100644 --- a/api/current.txt +++ b/api/current.txt @@ -46356,10 +46356,10 @@ package android.telephony.euicc { field public static final int ERROR_CERTIFICATE_ERROR = 10012; // 0x271c field public static final int ERROR_CONNECTION_ERROR = 10014; // 0x271e field public static final int ERROR_DISALLOWED_BY_PPR = 10010; // 0x271a - field public static final int ERROR_EUICC_GSMA_INSTALL_ERROR = 10009; // 0x2719 field public static final int ERROR_EUICC_INSUFFICIENT_MEMORY = 10004; // 0x2714 field public static final int ERROR_EUICC_MISSING = 10006; // 0x2716 field public static final int ERROR_INCOMPATIBLE_CARRIER = 10003; // 0x2713 + field public static final int ERROR_INSTALL_PROFILE = 10009; // 0x2719 field public static final int ERROR_INVALID_ACTIVATION_CODE = 10001; // 0x2711 field public static final int ERROR_INVALID_CONFIRMATION_CODE = 10002; // 0x2712 field public static final int ERROR_INVALID_RESPONSE = 10015; // 0x271f diff --git a/telephony/java/android/telephony/euicc/EuiccManager.java b/telephony/java/android/telephony/euicc/EuiccManager.java index 10b4db0b206aa..44b0968eaa90c 100644 --- a/telephony/java/android/telephony/euicc/EuiccManager.java +++ b/telephony/java/android/telephony/euicc/EuiccManager.java @@ -257,27 +257,38 @@ public class EuiccManager { * the error is related to download.Since the OperationCode only uses at most one byte, the * maximum allowed quantity is 255(0xFF). * - * ErrorCode is the remaing three bytes of the result code, and it denotes what happened. + * ErrorCode is the remaining three bytes of the result code, and it denotes what happened. * e.g a combination of {@link #OPERATION_DOWNLOAD} and {@link #ERROR_TIME_OUT} will suggest the * download operation has timed out. The only exception here is * {@link #OPERATION_SMDX_SUBJECT_REASON_CODE}, where instead of ErrorCode, SubjectCode[5.2.6.1 * from GSMA (SGP.22 v2.2) and ReasonCode[5.2.6.2] from GSMA (SGP.22 v2.2) are encoded. @see * {@link #EXTRA_EMBEDDED_SUBSCRIPTION_SMDX_SUBJECT_CODE} and * {@link #EXTRA_EMBEDDED_SUBSCRIPTION_SMDX_REASON_CODE} + * + * In the case where ErrorCode contains a value of 0, it means it's an unknown error. E.g Intent + * only contains {@link #OPERATION_DOWNLOAD} and ErrorCode is 0 implies this is an unknown + * Download error. + * + * @see {@link #EXTRA_EMBEDDED_SUBSCRIPTION_OPERATION_CODE} + * @see {@link #EXTRA_EMBEDDED_SUBSCRIPTION_ERROR_CODE} + * @see {@link #EXTRA_EMBEDDED_SUBSCRIPTION_SMDX_SUBJECT_CODE} + * @see {@link #EXTRA_EMBEDDED_SUBSCRIPTION_SMDX_REASON_CODE} */ public static final String EXTRA_EMBEDDED_SUBSCRIPTION_DETAILED_CODE = "android.telephony.euicc.extra.EMBEDDED_SUBSCRIPTION_DETAILED_CODE"; /** * Key for an extra set on {@link PendingIntent} result callbacks providing a - * OperationCode of {@link #EXTRA_EMBEDDED_SUBSCRIPTION_DETAILED_CODE}. + * OperationCode of {@link #EXTRA_EMBEDDED_SUBSCRIPTION_DETAILED_CODE}, + * value will be an int. */ public static final String EXTRA_EMBEDDED_SUBSCRIPTION_OPERATION_CODE = "android.telephony.euicc.extra.EMBEDDED_SUBSCRIPTION_OPERATION_CODE"; /** * Key for an extra set on {@link PendingIntent} result callbacks providing a - * ErrorCode of {@link #EXTRA_EMBEDDED_SUBSCRIPTION_DETAILED_CODE}. + * ErrorCode of {@link #EXTRA_EMBEDDED_SUBSCRIPTION_DETAILED_CODE}, + * value will be an int. */ public static final String EXTRA_EMBEDDED_SUBSCRIPTION_ERROR_CODE = "android.telephony.euicc.extra.EMBEDDED_SUBSCRIPTION_ERROR_CODE"; @@ -286,6 +297,7 @@ public class EuiccManager { * Key for an extra set on {@link PendingIntent} result callbacks providing a * SubjectCode[5.2.6.1] from GSMA (SGP.22 v2.2) decoded from * {@link #EXTRA_EMBEDDED_SUBSCRIPTION_DETAILED_CODE}. + * The value of this extra will be a String. */ public static final String EXTRA_EMBEDDED_SUBSCRIPTION_SMDX_SUBJECT_CODE = "android.telephony.euicc.extra.EMBEDDED_SUBSCRIPTION_SMDX_SUBJECT_CODE"; @@ -294,6 +306,7 @@ public class EuiccManager { * Key for an extra set on {@link PendingIntent} result callbacks providing a * ReasonCode[5.2.6.2] from GSMA (SGP.22 v2.2) decoded from * {@link #EXTRA_EMBEDDED_SUBSCRIPTION_DETAILED_CODE}. + * The value of this extra will be a String. */ public static final String EXTRA_EMBEDDED_SUBSCRIPTION_SMDX_REASON_CODE = "android.telephony.euicc.extra.EMBEDDED_SUBSCRIPTION_SMDX_REASON_CODE"; @@ -668,7 +681,7 @@ public class EuiccManager { ERROR_EUICC_MISSING, ERROR_UNSUPPORTED_VERSION, ERROR_SIM_MISSING, - ERROR_EUICC_GSMA_INSTALL_ERROR, + ERROR_INSTALL_PROFILE, ERROR_DISALLOWED_BY_PPR, ERROR_ADDRESS_MISSING, ERROR_CERTIFICATE_ERROR, @@ -736,14 +749,14 @@ public class EuiccManager { public static final int ERROR_SIM_MISSING = 10008; /** - * Failure to load the profile onto the eUICC card. i.e + * Failure to load the profile onto the eUICC card. e.g * 1. iccid of the profile already exists on the eUICC. * 2. GSMA(.22 v2.2) Profile Install Result - installFailedDueToDataMismatch * 3. operation was interrupted * 4. SIMalliance error in PEStatus(SGP.22 v2.2 section 2.5.6.1) * @see {@link #EXTRA_EMBEDDED_SUBSCRIPTION_DETAILED_CODE} for details */ - public static final int ERROR_EUICC_GSMA_INSTALL_ERROR = 10009; + public static final int ERROR_INSTALL_PROFILE = 10009; /** * Failed to load profile onto eUICC due to Profile Poicly Rules.