Loading src/java/com/android/internal/telephony/euicc/EuiccController.java +16 −1 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ import android.telephony.UiccAccessRule; import android.telephony.euicc.DownloadableSubscription; import android.telephony.euicc.EuiccInfo; import android.telephony.euicc.EuiccManager; import android.text.TextUtils; import android.util.Log; import com.android.internal.annotations.VisibleForTesting; Loading Loading @@ -226,6 +227,7 @@ public class EuiccController extends IEuiccController.Stub { addResolutionIntent(extrasIntent, EuiccService.ACTION_RESOLVE_DEACTIVATE_SIM, mCallingPackage, false /* confirmationCodeRetried */, getOperationForDeactivateSim()); break; default: Loading Loading @@ -306,6 +308,7 @@ public class EuiccController extends IEuiccController.Stub { Intent extrasIntent = new Intent(); addResolutionIntent(extrasIntent, EuiccService.ACTION_RESOLVE_NO_PRIVILEGES, mCallingPackage, false /* confirmationCodeRetried */, EuiccOperation.forDownloadNoPrivileges( mCallingToken, mSubscription, mSwitchAfterDownload, mCallingPackage)); Loading Loading @@ -354,6 +357,7 @@ public class EuiccController extends IEuiccController.Stub { Intent extrasIntent = new Intent(); addResolutionIntent(extrasIntent, EuiccService.ACTION_RESOLVE_NO_PRIVILEGES, mCallingPackage, false /* confirmationCodeRetried */, EuiccOperation.forDownloadNoPrivileges( mCallingToken, subscription, mSwitchAfterDownload, mCallingPackage)); Loading Loading @@ -407,15 +411,21 @@ public class EuiccController extends IEuiccController.Stub { addResolutionIntent(extrasIntent, EuiccService.ACTION_RESOLVE_DEACTIVATE_SIM, callingPackage, false /* confirmationCodeRetried */, EuiccOperation.forDownloadDeactivateSim( callingToken, subscription, switchAfterDownload, callingPackage)); break; case EuiccService.RESULT_NEED_CONFIRMATION_CODE: resultCode = RESOLVABLE_ERROR; boolean retried = false; if (!TextUtils.isEmpty(subscription.getConfirmationCode())) { retried = true; } addResolutionIntent(extrasIntent, EuiccService.ACTION_RESOLVE_CONFIRMATION_CODE, callingPackage, retried /* confirmationCodeRetried */, EuiccOperation.forDownloadConfirmationCode( callingToken, subscription, switchAfterDownload, callingPackage)); Loading Loading @@ -520,6 +530,7 @@ public class EuiccController extends IEuiccController.Stub { addResolutionIntent(extrasIntent, EuiccService.ACTION_RESOLVE_DEACTIVATE_SIM, mCallingPackage, false /* confirmationCodeRetried */, EuiccOperation.forGetDefaultListDeactivateSim( mCallingToken, mCallingPackage)); break; Loading Loading @@ -671,6 +682,7 @@ public class EuiccController extends IEuiccController.Stub { addResolutionIntent(extrasIntent, EuiccService.ACTION_RESOLVE_NO_PRIVILEGES, callingPackage, false /* confirmationCodeRetried */, EuiccOperation.forSwitchNoPrivileges( token, subscriptionId, callingPackage)); sendResult(callbackIntent, RESOLVABLE_ERROR, extrasIntent); Loading Loading @@ -716,6 +728,7 @@ public class EuiccController extends IEuiccController.Stub { addResolutionIntent(extrasIntent, EuiccService.ACTION_RESOLVE_DEACTIVATE_SIM, callingPackage, false /* confirmationCodeRetried */, EuiccOperation.forSwitchDeactivateSim( callingToken, subscriptionId, callingPackage)); break; Loading Loading @@ -883,11 +896,13 @@ public class EuiccController extends IEuiccController.Stub { /** Add a resolution intent to the given extras intent. */ @VisibleForTesting(visibility = VisibleForTesting.Visibility.PRIVATE) public void addResolutionIntent(Intent extrasIntent, String resolutionAction, String callingPackage, EuiccOperation op) { String callingPackage, boolean confirmationCodeRetried, EuiccOperation op) { Intent intent = new Intent(EuiccManager.ACTION_RESOLVE_ERROR); intent.putExtra(EuiccManager.EXTRA_EMBEDDED_SUBSCRIPTION_RESOLUTION_ACTION, resolutionAction); intent.putExtra(EuiccService.EXTRA_RESOLUTION_CALLING_PACKAGE, callingPackage); intent.putExtra(EuiccService.EXTRA_RESOLUTION_CONFIRMATION_CODE_RETRIED, confirmationCodeRetried); intent.putExtra(EXTRA_OPERATION, op); PendingIntent resolutionIntent = PendingIntent.getActivity( mContext, 0 /* requestCode */, intent, PendingIntent.FLAG_ONE_SHOT); Loading tests/telephonytests/src/com/android/internal/telephony/euicc/EuiccControllerTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -129,7 +129,7 @@ public class EuiccControllerTest extends TelephonyTest { @Override public void addResolutionIntent( Intent extrasIntent, String resolutionAction, String callingPackage, EuiccOperation op) { boolean retried, EuiccOperation op) { mResolutionAction = resolutionAction; mOp = op; } Loading Loading
src/java/com/android/internal/telephony/euicc/EuiccController.java +16 −1 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ import android.telephony.UiccAccessRule; import android.telephony.euicc.DownloadableSubscription; import android.telephony.euicc.EuiccInfo; import android.telephony.euicc.EuiccManager; import android.text.TextUtils; import android.util.Log; import com.android.internal.annotations.VisibleForTesting; Loading Loading @@ -226,6 +227,7 @@ public class EuiccController extends IEuiccController.Stub { addResolutionIntent(extrasIntent, EuiccService.ACTION_RESOLVE_DEACTIVATE_SIM, mCallingPackage, false /* confirmationCodeRetried */, getOperationForDeactivateSim()); break; default: Loading Loading @@ -306,6 +308,7 @@ public class EuiccController extends IEuiccController.Stub { Intent extrasIntent = new Intent(); addResolutionIntent(extrasIntent, EuiccService.ACTION_RESOLVE_NO_PRIVILEGES, mCallingPackage, false /* confirmationCodeRetried */, EuiccOperation.forDownloadNoPrivileges( mCallingToken, mSubscription, mSwitchAfterDownload, mCallingPackage)); Loading Loading @@ -354,6 +357,7 @@ public class EuiccController extends IEuiccController.Stub { Intent extrasIntent = new Intent(); addResolutionIntent(extrasIntent, EuiccService.ACTION_RESOLVE_NO_PRIVILEGES, mCallingPackage, false /* confirmationCodeRetried */, EuiccOperation.forDownloadNoPrivileges( mCallingToken, subscription, mSwitchAfterDownload, mCallingPackage)); Loading Loading @@ -407,15 +411,21 @@ public class EuiccController extends IEuiccController.Stub { addResolutionIntent(extrasIntent, EuiccService.ACTION_RESOLVE_DEACTIVATE_SIM, callingPackage, false /* confirmationCodeRetried */, EuiccOperation.forDownloadDeactivateSim( callingToken, subscription, switchAfterDownload, callingPackage)); break; case EuiccService.RESULT_NEED_CONFIRMATION_CODE: resultCode = RESOLVABLE_ERROR; boolean retried = false; if (!TextUtils.isEmpty(subscription.getConfirmationCode())) { retried = true; } addResolutionIntent(extrasIntent, EuiccService.ACTION_RESOLVE_CONFIRMATION_CODE, callingPackage, retried /* confirmationCodeRetried */, EuiccOperation.forDownloadConfirmationCode( callingToken, subscription, switchAfterDownload, callingPackage)); Loading Loading @@ -520,6 +530,7 @@ public class EuiccController extends IEuiccController.Stub { addResolutionIntent(extrasIntent, EuiccService.ACTION_RESOLVE_DEACTIVATE_SIM, mCallingPackage, false /* confirmationCodeRetried */, EuiccOperation.forGetDefaultListDeactivateSim( mCallingToken, mCallingPackage)); break; Loading Loading @@ -671,6 +682,7 @@ public class EuiccController extends IEuiccController.Stub { addResolutionIntent(extrasIntent, EuiccService.ACTION_RESOLVE_NO_PRIVILEGES, callingPackage, false /* confirmationCodeRetried */, EuiccOperation.forSwitchNoPrivileges( token, subscriptionId, callingPackage)); sendResult(callbackIntent, RESOLVABLE_ERROR, extrasIntent); Loading Loading @@ -716,6 +728,7 @@ public class EuiccController extends IEuiccController.Stub { addResolutionIntent(extrasIntent, EuiccService.ACTION_RESOLVE_DEACTIVATE_SIM, callingPackage, false /* confirmationCodeRetried */, EuiccOperation.forSwitchDeactivateSim( callingToken, subscriptionId, callingPackage)); break; Loading Loading @@ -883,11 +896,13 @@ public class EuiccController extends IEuiccController.Stub { /** Add a resolution intent to the given extras intent. */ @VisibleForTesting(visibility = VisibleForTesting.Visibility.PRIVATE) public void addResolutionIntent(Intent extrasIntent, String resolutionAction, String callingPackage, EuiccOperation op) { String callingPackage, boolean confirmationCodeRetried, EuiccOperation op) { Intent intent = new Intent(EuiccManager.ACTION_RESOLVE_ERROR); intent.putExtra(EuiccManager.EXTRA_EMBEDDED_SUBSCRIPTION_RESOLUTION_ACTION, resolutionAction); intent.putExtra(EuiccService.EXTRA_RESOLUTION_CALLING_PACKAGE, callingPackage); intent.putExtra(EuiccService.EXTRA_RESOLUTION_CONFIRMATION_CODE_RETRIED, confirmationCodeRetried); intent.putExtra(EXTRA_OPERATION, op); PendingIntent resolutionIntent = PendingIntent.getActivity( mContext, 0 /* requestCode */, intent, PendingIntent.FLAG_ONE_SHOT); Loading
tests/telephonytests/src/com/android/internal/telephony/euicc/EuiccControllerTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -129,7 +129,7 @@ public class EuiccControllerTest extends TelephonyTest { @Override public void addResolutionIntent( Intent extrasIntent, String resolutionAction, String callingPackage, EuiccOperation op) { boolean retried, EuiccOperation op) { mResolutionAction = resolutionAction; mOp = op; } Loading