Loading src/java/com/android/internal/telephony/euicc/EuiccController.java +5 −10 Original line number Original line Diff line number Diff line Loading @@ -404,9 +404,6 @@ public class EuiccController extends IEuiccController.Stub { break; break; default: default: resultCode = ERROR; resultCode = ERROR; extrasIntent.putExtra( EuiccManager.EXTRA_EMBEDDED_SUBSCRIPTION_DETAILED_CODE, result.getResult()); addExtrasToResultIntent(extrasIntent, result.getResult()); addExtrasToResultIntent(extrasIntent, result.getResult()); break; break; } } Loading Loading @@ -484,20 +481,19 @@ public class EuiccController extends IEuiccController.Stub { * b) {@link EuiccManager#EXTRA_EMBEDDED_SUBSCRIPTION_SMDX_REASON_CODE} -> * b) {@link EuiccManager#EXTRA_EMBEDDED_SUBSCRIPTION_SMDX_REASON_CODE} -> * ReasonCode[5.2.6.2] from GSMA (SGP.22 v2.2 * ReasonCode[5.2.6.2] from GSMA (SGP.22 v2.2 */ */ Intent addExtrasToResultIntent(Intent intent, int resultCode) { private void addExtrasToResultIntent(Intent intent, int resultCode) { final int firstByteBitOffset = 24; final int firstByteBitOffset = 24; int errorCodeMask = 0xFFFFFF; int errorCodeMask = 0xFFFFFF; int operationCodeMask = 0xFF << firstByteBitOffset; int operationCode = resultCode >>> firstByteBitOffset; intent.putExtra( intent.putExtra( EuiccManager.EXTRA_EMBEDDED_SUBSCRIPTION_DETAILED_CODE, resultCode); EuiccManager.EXTRA_EMBEDDED_SUBSCRIPTION_DETAILED_CODE, resultCode); intent.putExtra(EuiccManager.EXTRA_EMBEDDED_SUBSCRIPTION_OPERATION_CODE, intent.putExtra(EuiccManager.EXTRA_EMBEDDED_SUBSCRIPTION_OPERATION_CODE, operationCode); (resultCode & operationCodeMask) >> firstByteBitOffset); // check to see if the operation code is EuiccManager#OPERATION_SMDX_SUBJECT_REASON_CODE // check to see if the operation code is EuiccManager#OPERATION_SMDX_SUBJECT_REASON_CODE final boolean isSmdxSubjectReasonCode = (resultCode >> firstByteBitOffset) final boolean isSmdxSubjectReasonCode = == EuiccManager.OPERATION_SMDX_SUBJECT_REASON_CODE; (operationCode == EuiccManager.OPERATION_SMDX_SUBJECT_REASON_CODE); if (isSmdxSubjectReasonCode) { if (isSmdxSubjectReasonCode) { final Pair<String, String> subjectReasonCode = decodeSmdxSubjectAndReasonCode( final Pair<String, String> subjectReasonCode = decodeSmdxSubjectAndReasonCode( Loading @@ -511,7 +507,6 @@ public class EuiccController extends IEuiccController.Stub { final int errorCode = resultCode & errorCodeMask; final int errorCode = resultCode & errorCodeMask; intent.putExtra(EuiccManager.EXTRA_EMBEDDED_SUBSCRIPTION_ERROR_CODE, errorCode); intent.putExtra(EuiccManager.EXTRA_EMBEDDED_SUBSCRIPTION_ERROR_CODE, errorCode); } } return intent; } } void downloadSubscription(int cardId, DownloadableSubscription subscription, void downloadSubscription(int cardId, DownloadableSubscription subscription, Loading Loading
src/java/com/android/internal/telephony/euicc/EuiccController.java +5 −10 Original line number Original line Diff line number Diff line Loading @@ -404,9 +404,6 @@ public class EuiccController extends IEuiccController.Stub { break; break; default: default: resultCode = ERROR; resultCode = ERROR; extrasIntent.putExtra( EuiccManager.EXTRA_EMBEDDED_SUBSCRIPTION_DETAILED_CODE, result.getResult()); addExtrasToResultIntent(extrasIntent, result.getResult()); addExtrasToResultIntent(extrasIntent, result.getResult()); break; break; } } Loading Loading @@ -484,20 +481,19 @@ public class EuiccController extends IEuiccController.Stub { * b) {@link EuiccManager#EXTRA_EMBEDDED_SUBSCRIPTION_SMDX_REASON_CODE} -> * b) {@link EuiccManager#EXTRA_EMBEDDED_SUBSCRIPTION_SMDX_REASON_CODE} -> * ReasonCode[5.2.6.2] from GSMA (SGP.22 v2.2 * ReasonCode[5.2.6.2] from GSMA (SGP.22 v2.2 */ */ Intent addExtrasToResultIntent(Intent intent, int resultCode) { private void addExtrasToResultIntent(Intent intent, int resultCode) { final int firstByteBitOffset = 24; final int firstByteBitOffset = 24; int errorCodeMask = 0xFFFFFF; int errorCodeMask = 0xFFFFFF; int operationCodeMask = 0xFF << firstByteBitOffset; int operationCode = resultCode >>> firstByteBitOffset; intent.putExtra( intent.putExtra( EuiccManager.EXTRA_EMBEDDED_SUBSCRIPTION_DETAILED_CODE, resultCode); EuiccManager.EXTRA_EMBEDDED_SUBSCRIPTION_DETAILED_CODE, resultCode); intent.putExtra(EuiccManager.EXTRA_EMBEDDED_SUBSCRIPTION_OPERATION_CODE, intent.putExtra(EuiccManager.EXTRA_EMBEDDED_SUBSCRIPTION_OPERATION_CODE, operationCode); (resultCode & operationCodeMask) >> firstByteBitOffset); // check to see if the operation code is EuiccManager#OPERATION_SMDX_SUBJECT_REASON_CODE // check to see if the operation code is EuiccManager#OPERATION_SMDX_SUBJECT_REASON_CODE final boolean isSmdxSubjectReasonCode = (resultCode >> firstByteBitOffset) final boolean isSmdxSubjectReasonCode = == EuiccManager.OPERATION_SMDX_SUBJECT_REASON_CODE; (operationCode == EuiccManager.OPERATION_SMDX_SUBJECT_REASON_CODE); if (isSmdxSubjectReasonCode) { if (isSmdxSubjectReasonCode) { final Pair<String, String> subjectReasonCode = decodeSmdxSubjectAndReasonCode( final Pair<String, String> subjectReasonCode = decodeSmdxSubjectAndReasonCode( Loading @@ -511,7 +507,6 @@ public class EuiccController extends IEuiccController.Stub { final int errorCode = resultCode & errorCodeMask; final int errorCode = resultCode & errorCodeMask; intent.putExtra(EuiccManager.EXTRA_EMBEDDED_SUBSCRIPTION_ERROR_CODE, errorCode); intent.putExtra(EuiccManager.EXTRA_EMBEDDED_SUBSCRIPTION_ERROR_CODE, errorCode); } } return intent; } } void downloadSubscription(int cardId, DownloadableSubscription subscription, void downloadSubscription(int cardId, DownloadableSubscription subscription, Loading