Loading core/api/current.txt +1 −5 Original line number Diff line number Diff line Loading @@ -42284,7 +42284,7 @@ package android.telephony.euicc { method public boolean isSimPortAvailable(int); method public void startResolutionActivity(android.app.Activity, int, android.content.Intent, android.app.PendingIntent) throws android.content.IntentSender.SendIntentException; method @Deprecated @RequiresPermission("android.permission.WRITE_EMBEDDED_SUBSCRIPTIONS") public void switchToSubscription(int, android.app.PendingIntent); method @RequiresPermission("android.permission.WRITE_EMBEDDED_SUBSCRIPTIONS") public void switchToSubscription(int, int, @NonNull java.util.concurrent.Executor, @NonNull android.telephony.euicc.EuiccManager.ResultListener); method @RequiresPermission("android.permission.WRITE_EMBEDDED_SUBSCRIPTIONS") public void switchToSubscription(int, int, @NonNull android.app.PendingIntent); method @RequiresPermission("android.permission.WRITE_EMBEDDED_SUBSCRIPTIONS") public void updateSubscriptionNickname(int, @Nullable String, @NonNull android.app.PendingIntent); field public static final String ACTION_MANAGE_EMBEDDED_SUBSCRIPTIONS = "android.telephony.euicc.action.MANAGE_EMBEDDED_SUBSCRIPTIONS"; field public static final String ACTION_NOTIFY_CARRIER_SETUP_INCOMPLETE = "android.telephony.euicc.action.NOTIFY_CARRIER_SETUP_INCOMPLETE"; Loading Loading @@ -42330,10 +42330,6 @@ package android.telephony.euicc { field public static final int OPERATION_SYSTEM = 1; // 0x1 } public static interface EuiccManager.ResultListener { method public void onComplete(int, @Nullable android.content.Intent); } } package android.telephony.gsm { core/api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -9665,6 +9665,7 @@ package android.service.euicc { field public static final String EXTRA_RESOLUTION_CONFIRMATION_CODE_RETRIED = "android.service.euicc.extra.RESOLUTION_CONFIRMATION_CODE_RETRIED"; field public static final String EXTRA_RESOLUTION_CONSENT = "android.service.euicc.extra.RESOLUTION_CONSENT"; field public static final String EXTRA_RESOLUTION_PORT_INDEX = "android.service.euicc.extra.RESOLUTION_PORT_INDEX"; field public static final String EXTRA_RESOLUTION_USE_PORT_INDEX = "android.service.euicc.extra.RESOLUTION_USE_PORT_INDEX"; field public static final String EXTRA_RESOLVABLE_ERRORS = "android.service.euicc.extra.RESOLVABLE_ERRORS"; field public static final int RESOLVABLE_ERROR_CONFIRMATION_CODE = 1; // 0x1 field public static final int RESOLVABLE_ERROR_POLICY_RULES = 2; // 0x2 telephony/java/android/service/euicc/EuiccService.java +19 −4 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.SdkConstant; import android.annotation.SystemApi; import android.app.PendingIntent; import android.app.Service; import android.content.Intent; import android.os.Bundle; Loading Loading @@ -261,6 +262,14 @@ public abstract class EuiccService extends Service { public static final String EXTRA_RESOLUTION_PORT_INDEX = "android.service.euicc.extra.RESOLUTION_PORT_INDEX"; /** * Intent extra set for resolution requests containing a bool indicating whether to use the * given port index. For example, if {@link #switchToSubscription(int, PendingIntent)} is * called, then no portIndex has been provided by the caller, and this extra will be false. */ public static final String EXTRA_RESOLUTION_USE_PORT_INDEX = "android.service.euicc.extra.RESOLUTION_USE_PORT_INDEX"; /** @hide */ @Retention(RetentionPolicy.SOURCE) @IntDef(prefix = { "RESULT_" }, value = { Loading Loading @@ -852,13 +861,19 @@ public abstract class EuiccService extends Service { } @Override public void switchToSubscription(int slotId, int portIndex, String iccid, boolean forceDeactivateSim, ISwitchToSubscriptionCallback callback) { boolean forceDeactivateSim, ISwitchToSubscriptionCallback callback, boolean usePortIndex) { mExecutor.execute(new Runnable() { @Override public void run() { int result = EuiccService.this.onSwitchToSubscriptionWithPort( int result = 0; if (usePortIndex) { result = EuiccService.this.onSwitchToSubscriptionWithPort( slotId, portIndex, iccid, forceDeactivateSim); } else { result = EuiccService.this.onSwitchToSubscription( slotId, iccid, forceDeactivateSim); } try { callback.onComplete(result); } catch (RemoteException e) { Loading telephony/java/android/service/euicc/IEuiccService.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -49,7 +49,7 @@ oneway interface IEuiccService { void getEuiccInfo(int slotId, in IGetEuiccInfoCallback callback); void deleteSubscription(int slotId, String iccid, in IDeleteSubscriptionCallback callback); void switchToSubscription(int slotId, int portIndex, String iccid, boolean forceDeactivateSim, in ISwitchToSubscriptionCallback callback); in ISwitchToSubscriptionCallback callback, boolean useLegacyApi); void updateSubscriptionNickname(int slotId, String iccid, String nickname, in IUpdateSubscriptionNicknameCallback callback); void eraseSubscriptions(int slotId, in IEraseSubscriptionsCallback callback); Loading telephony/java/android/telephony/euicc/EuiccManager.java +6 −54 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package android.telephony.euicc; import android.Manifest; import android.annotation.CallbackExecutor; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; Loading @@ -29,7 +28,6 @@ import android.content.Context; import android.content.Intent; import android.content.IntentSender; import android.content.pm.PackageManager; import android.os.Binder; import android.os.Bundle; import android.os.RemoteException; import android.telephony.TelephonyFrameworkInitializer; Loading @@ -37,13 +35,11 @@ import android.telephony.TelephonyManager; import android.telephony.euicc.EuiccCardManager.ResetOption; import com.android.internal.telephony.euicc.IEuiccController; import com.android.internal.telephony.euicc.IResultCallback; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.util.Collections; import java.util.List; import java.util.concurrent.Executor; import java.util.stream.Collectors; /** Loading Loading @@ -218,20 +214,6 @@ public class EuiccManager { public static final String ACTION_START_EUICC_ACTIVATION = "android.telephony.euicc.action.START_EUICC_ACTIVATION"; /** * Result codes passed to the ResultListener by * {@link #switchToSubscription(int, int, Executor, ResultListener)} * * @hide */ @Retention(RetentionPolicy.SOURCE) @IntDef(prefix = {"EMBEDDED_SUBSCRIPTION_RESULT_"}, value = { EMBEDDED_SUBSCRIPTION_RESULT_OK, EMBEDDED_SUBSCRIPTION_RESULT_ERROR, EMBEDDED_SUBSCRIPTION_RESULT_RESOLVABLE_ERROR }) public @interface ResultCode{} /** * Result code for an operation indicating that the operation succeeded. */ Loading Loading @@ -1145,7 +1127,7 @@ public class EuiccManager { * @param callbackIntent a PendingIntent to launch when the operation completes. * * @deprecated From T, callers should use * {@link #switchToSubscription(int, int, Executor, ResultListener)} instead to specify a port * {@link #switchToSubscription(int, int, PendingIntent)} instead to specify a port * index on the card to switch to. */ @Deprecated Loading Loading @@ -1188,46 +1170,23 @@ public class EuiccManager { * permission, or the calling app must be authorized to manage the active subscription on * the target eUICC. * @param portIndex the index of the port to target for the enabled subscription * @param executor an Executor on which to run the callback * @param callback a {@link ResultListener} which will run when the operation completes * @param callbackIntent a PendingIntent to launch when the operation completes. */ @RequiresPermission(Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS) public void switchToSubscription(int subscriptionId, int portIndex, @NonNull @CallbackExecutor Executor executor, @NonNull ResultListener callback) { @NonNull PendingIntent callbackIntent) { if (!isEnabled()) { sendUnavailableErrorToCallback(executor, callback); sendUnavailableError(callbackIntent); return; } try { IResultCallback internalCallback = new IResultCallback.Stub() { @Override public void onComplete(int result, Intent resultIntent) { executor.execute(() -> Binder.withCleanCallingIdentity( () -> callback.onComplete(result, resultIntent))); } }; getIEuiccController().switchToSubscriptionWithPort(mCardId, portIndex, subscriptionId, mContext.getOpPackageName(), internalCallback); getIEuiccController().switchToSubscriptionWithPort(mCardId, subscriptionId, portIndex, mContext.getOpPackageName(), callbackIntent); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * Callback to receive the result of an EuiccManager API. */ public interface ResultListener { /** * Called on completion of some operation. * @param resultCode representing success or specific failure of the operation * (See {@link ResultCode}) * @param resultIntent an intent used to start a resolution activity when an error * occurs that can be resolved by the user */ void onComplete(@ResultCode int resultCode, @Nullable Intent resultIntent); } /** * Update the nickname for the given subscription. * Loading Loading @@ -1499,13 +1458,6 @@ public class EuiccManager { } } private static void sendUnavailableErrorToCallback(@NonNull Executor executor, ResultListener callback) { Integer result = EMBEDDED_SUBSCRIPTION_RESULT_ERROR; executor.execute(() -> Binder.withCleanCallingIdentity(() -> callback.onComplete(result, null))); } private static IEuiccController getIEuiccController() { return IEuiccController.Stub.asInterface( TelephonyFrameworkInitializer Loading Loading
core/api/current.txt +1 −5 Original line number Diff line number Diff line Loading @@ -42284,7 +42284,7 @@ package android.telephony.euicc { method public boolean isSimPortAvailable(int); method public void startResolutionActivity(android.app.Activity, int, android.content.Intent, android.app.PendingIntent) throws android.content.IntentSender.SendIntentException; method @Deprecated @RequiresPermission("android.permission.WRITE_EMBEDDED_SUBSCRIPTIONS") public void switchToSubscription(int, android.app.PendingIntent); method @RequiresPermission("android.permission.WRITE_EMBEDDED_SUBSCRIPTIONS") public void switchToSubscription(int, int, @NonNull java.util.concurrent.Executor, @NonNull android.telephony.euicc.EuiccManager.ResultListener); method @RequiresPermission("android.permission.WRITE_EMBEDDED_SUBSCRIPTIONS") public void switchToSubscription(int, int, @NonNull android.app.PendingIntent); method @RequiresPermission("android.permission.WRITE_EMBEDDED_SUBSCRIPTIONS") public void updateSubscriptionNickname(int, @Nullable String, @NonNull android.app.PendingIntent); field public static final String ACTION_MANAGE_EMBEDDED_SUBSCRIPTIONS = "android.telephony.euicc.action.MANAGE_EMBEDDED_SUBSCRIPTIONS"; field public static final String ACTION_NOTIFY_CARRIER_SETUP_INCOMPLETE = "android.telephony.euicc.action.NOTIFY_CARRIER_SETUP_INCOMPLETE"; Loading Loading @@ -42330,10 +42330,6 @@ package android.telephony.euicc { field public static final int OPERATION_SYSTEM = 1; // 0x1 } public static interface EuiccManager.ResultListener { method public void onComplete(int, @Nullable android.content.Intent); } } package android.telephony.gsm {
core/api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -9665,6 +9665,7 @@ package android.service.euicc { field public static final String EXTRA_RESOLUTION_CONFIRMATION_CODE_RETRIED = "android.service.euicc.extra.RESOLUTION_CONFIRMATION_CODE_RETRIED"; field public static final String EXTRA_RESOLUTION_CONSENT = "android.service.euicc.extra.RESOLUTION_CONSENT"; field public static final String EXTRA_RESOLUTION_PORT_INDEX = "android.service.euicc.extra.RESOLUTION_PORT_INDEX"; field public static final String EXTRA_RESOLUTION_USE_PORT_INDEX = "android.service.euicc.extra.RESOLUTION_USE_PORT_INDEX"; field public static final String EXTRA_RESOLVABLE_ERRORS = "android.service.euicc.extra.RESOLVABLE_ERRORS"; field public static final int RESOLVABLE_ERROR_CONFIRMATION_CODE = 1; // 0x1 field public static final int RESOLVABLE_ERROR_POLICY_RULES = 2; // 0x2
telephony/java/android/service/euicc/EuiccService.java +19 −4 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.SdkConstant; import android.annotation.SystemApi; import android.app.PendingIntent; import android.app.Service; import android.content.Intent; import android.os.Bundle; Loading Loading @@ -261,6 +262,14 @@ public abstract class EuiccService extends Service { public static final String EXTRA_RESOLUTION_PORT_INDEX = "android.service.euicc.extra.RESOLUTION_PORT_INDEX"; /** * Intent extra set for resolution requests containing a bool indicating whether to use the * given port index. For example, if {@link #switchToSubscription(int, PendingIntent)} is * called, then no portIndex has been provided by the caller, and this extra will be false. */ public static final String EXTRA_RESOLUTION_USE_PORT_INDEX = "android.service.euicc.extra.RESOLUTION_USE_PORT_INDEX"; /** @hide */ @Retention(RetentionPolicy.SOURCE) @IntDef(prefix = { "RESULT_" }, value = { Loading Loading @@ -852,13 +861,19 @@ public abstract class EuiccService extends Service { } @Override public void switchToSubscription(int slotId, int portIndex, String iccid, boolean forceDeactivateSim, ISwitchToSubscriptionCallback callback) { boolean forceDeactivateSim, ISwitchToSubscriptionCallback callback, boolean usePortIndex) { mExecutor.execute(new Runnable() { @Override public void run() { int result = EuiccService.this.onSwitchToSubscriptionWithPort( int result = 0; if (usePortIndex) { result = EuiccService.this.onSwitchToSubscriptionWithPort( slotId, portIndex, iccid, forceDeactivateSim); } else { result = EuiccService.this.onSwitchToSubscription( slotId, iccid, forceDeactivateSim); } try { callback.onComplete(result); } catch (RemoteException e) { Loading
telephony/java/android/service/euicc/IEuiccService.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -49,7 +49,7 @@ oneway interface IEuiccService { void getEuiccInfo(int slotId, in IGetEuiccInfoCallback callback); void deleteSubscription(int slotId, String iccid, in IDeleteSubscriptionCallback callback); void switchToSubscription(int slotId, int portIndex, String iccid, boolean forceDeactivateSim, in ISwitchToSubscriptionCallback callback); in ISwitchToSubscriptionCallback callback, boolean useLegacyApi); void updateSubscriptionNickname(int slotId, String iccid, String nickname, in IUpdateSubscriptionNicknameCallback callback); void eraseSubscriptions(int slotId, in IEraseSubscriptionsCallback callback); Loading
telephony/java/android/telephony/euicc/EuiccManager.java +6 −54 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package android.telephony.euicc; import android.Manifest; import android.annotation.CallbackExecutor; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; Loading @@ -29,7 +28,6 @@ import android.content.Context; import android.content.Intent; import android.content.IntentSender; import android.content.pm.PackageManager; import android.os.Binder; import android.os.Bundle; import android.os.RemoteException; import android.telephony.TelephonyFrameworkInitializer; Loading @@ -37,13 +35,11 @@ import android.telephony.TelephonyManager; import android.telephony.euicc.EuiccCardManager.ResetOption; import com.android.internal.telephony.euicc.IEuiccController; import com.android.internal.telephony.euicc.IResultCallback; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.util.Collections; import java.util.List; import java.util.concurrent.Executor; import java.util.stream.Collectors; /** Loading Loading @@ -218,20 +214,6 @@ public class EuiccManager { public static final String ACTION_START_EUICC_ACTIVATION = "android.telephony.euicc.action.START_EUICC_ACTIVATION"; /** * Result codes passed to the ResultListener by * {@link #switchToSubscription(int, int, Executor, ResultListener)} * * @hide */ @Retention(RetentionPolicy.SOURCE) @IntDef(prefix = {"EMBEDDED_SUBSCRIPTION_RESULT_"}, value = { EMBEDDED_SUBSCRIPTION_RESULT_OK, EMBEDDED_SUBSCRIPTION_RESULT_ERROR, EMBEDDED_SUBSCRIPTION_RESULT_RESOLVABLE_ERROR }) public @interface ResultCode{} /** * Result code for an operation indicating that the operation succeeded. */ Loading Loading @@ -1145,7 +1127,7 @@ public class EuiccManager { * @param callbackIntent a PendingIntent to launch when the operation completes. * * @deprecated From T, callers should use * {@link #switchToSubscription(int, int, Executor, ResultListener)} instead to specify a port * {@link #switchToSubscription(int, int, PendingIntent)} instead to specify a port * index on the card to switch to. */ @Deprecated Loading Loading @@ -1188,46 +1170,23 @@ public class EuiccManager { * permission, or the calling app must be authorized to manage the active subscription on * the target eUICC. * @param portIndex the index of the port to target for the enabled subscription * @param executor an Executor on which to run the callback * @param callback a {@link ResultListener} which will run when the operation completes * @param callbackIntent a PendingIntent to launch when the operation completes. */ @RequiresPermission(Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS) public void switchToSubscription(int subscriptionId, int portIndex, @NonNull @CallbackExecutor Executor executor, @NonNull ResultListener callback) { @NonNull PendingIntent callbackIntent) { if (!isEnabled()) { sendUnavailableErrorToCallback(executor, callback); sendUnavailableError(callbackIntent); return; } try { IResultCallback internalCallback = new IResultCallback.Stub() { @Override public void onComplete(int result, Intent resultIntent) { executor.execute(() -> Binder.withCleanCallingIdentity( () -> callback.onComplete(result, resultIntent))); } }; getIEuiccController().switchToSubscriptionWithPort(mCardId, portIndex, subscriptionId, mContext.getOpPackageName(), internalCallback); getIEuiccController().switchToSubscriptionWithPort(mCardId, subscriptionId, portIndex, mContext.getOpPackageName(), callbackIntent); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * Callback to receive the result of an EuiccManager API. */ public interface ResultListener { /** * Called on completion of some operation. * @param resultCode representing success or specific failure of the operation * (See {@link ResultCode}) * @param resultIntent an intent used to start a resolution activity when an error * occurs that can be resolved by the user */ void onComplete(@ResultCode int resultCode, @Nullable Intent resultIntent); } /** * Update the nickname for the given subscription. * Loading Loading @@ -1499,13 +1458,6 @@ public class EuiccManager { } } private static void sendUnavailableErrorToCallback(@NonNull Executor executor, ResultListener callback) { Integer result = EMBEDDED_SUBSCRIPTION_RESULT_ERROR; executor.execute(() -> Binder.withCleanCallingIdentity(() -> callback.onComplete(result, null))); } private static IEuiccController getIEuiccController() { return IEuiccController.Stub.asInterface( TelephonyFrameworkInitializer Loading