From f23581da3bceb499ed0f1aa83c921c0d137fa3e6 Mon Sep 17 00:00:00 2001 From: sandeepjs Date: Mon, 3 Oct 2022 10:54:18 +0000 Subject: [PATCH] Defining EuiccCardManager.RESULT_PROFILE_DOES_NOT_EXIST constant some of the ES10x procedures are returning the error code same as the one defined for EuiccCardManager.RESULT_PROFILE_NOT_FOUND(#1) in the platform(eUICC always returns positive integers as error code), Hence deprecating it and defining new constant with -4 as value to avoid confusion. Test: build and manual Bug: 242288148 Change-Id: Ib7629042202ec709d02d59e57c64ea525ba02cfc --- core/api/system-current.txt | 3 ++- .../java/android/telephony/euicc/EuiccCardManager.java | 10 ++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/core/api/system-current.txt b/core/api/system-current.txt index f09244ad7859d..dcf40a0266dbb 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -14091,7 +14091,8 @@ package android.telephony.euicc { field public static final int RESULT_CALLER_NOT_ALLOWED = -3; // 0xfffffffd field public static final int RESULT_EUICC_NOT_FOUND = -2; // 0xfffffffe field public static final int RESULT_OK = 0; // 0x0 - field public static final int RESULT_PROFILE_NOT_FOUND = 1; // 0x1 + field public static final int RESULT_PROFILE_DOES_NOT_EXIST = -4; // 0xfffffffc + field @Deprecated public static final int RESULT_PROFILE_NOT_FOUND = 1; // 0x1 field public static final int RESULT_UNKNOWN_ERROR = -1; // 0xffffffff } diff --git a/telephony/java/android/telephony/euicc/EuiccCardManager.java b/telephony/java/android/telephony/euicc/EuiccCardManager.java index 0a2bb3d16f249..e61d1e6842a70 100644 --- a/telephony/java/android/telephony/euicc/EuiccCardManager.java +++ b/telephony/java/android/telephony/euicc/EuiccCardManager.java @@ -118,7 +118,10 @@ public class EuiccCardManager { /** Resets the default SM-DP+ address. */ public static final int RESET_OPTION_RESET_DEFAULT_SMDP_ADDRESS = 1 << 2; - /** Result code when the requested profile is not found */ + /** Result code when the requested profile is not found + * @deprecated use {@link #RESULT_PROFILE_DOES_NOT_EXIST} + **/ + @Deprecated public static final int RESULT_PROFILE_NOT_FOUND = 1; /** Result code of execution with no error. */ @@ -133,6 +136,9 @@ public class EuiccCardManager { /** Result code indicating the caller is not the active LPA. */ public static final int RESULT_CALLER_NOT_ALLOWED = -3; + /** Result code when the requested profile does not exist */ + public static final int RESULT_PROFILE_DOES_NOT_EXIST = -4; + /** * Callback to receive the result of an eUICC card API. * @@ -224,7 +230,7 @@ public class EuiccCardManager { /** * Requests the enabled profile for a given port on an eUicc. Callback with result code - * {@link RESULT_PROFILE_NOT_FOUND} and {@code NULL} EuiccProfile if there is no enabled + * {@link RESULT_PROFILE_DOES_NOT_EXIST} and {@code NULL} EuiccProfile if there is no enabled * profile on the target port. * * @param cardId The Id of the eUICC.