Merge changes from topics "MEP_addPortIndex", "mep_switchToSubscription" am: 2773d2034f am: 268dccdb7a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2046490 Change-Id: I22263d5c2bc6c11c241dfab15a0a91331e20054d Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -42283,7 +42283,7 @@ package android.telephony.euicc {
|
|||||||
method public boolean isEnabled();
|
method public boolean isEnabled();
|
||||||
method public boolean isSimPortAvailable(int);
|
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 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, android.app.PendingIntent);
|
||||||
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 switchToSubscription(int, int, @NonNull android.app.PendingIntent);
|
||||||
method @RequiresPermission("android.permission.WRITE_EMBEDDED_SUBSCRIPTIONS") public void updateSubscriptionNickname(int, @Nullable String, @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_MANAGE_EMBEDDED_SUBSCRIPTIONS = "android.telephony.euicc.action.MANAGE_EMBEDDED_SUBSCRIPTIONS";
|
||||||
@@ -42303,6 +42303,7 @@ package android.telephony.euicc {
|
|||||||
field public static final int ERROR_INSTALL_PROFILE = 10009; // 0x2719
|
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_ACTIVATION_CODE = 10001; // 0x2711
|
||||||
field public static final int ERROR_INVALID_CONFIRMATION_CODE = 10002; // 0x2712
|
field public static final int ERROR_INVALID_CONFIRMATION_CODE = 10002; // 0x2712
|
||||||
|
field public static final int ERROR_INVALID_PORT = 10017; // 0x2721
|
||||||
field public static final int ERROR_INVALID_RESPONSE = 10015; // 0x271f
|
field public static final int ERROR_INVALID_RESPONSE = 10015; // 0x271f
|
||||||
field public static final int ERROR_NO_PROFILES_AVAILABLE = 10013; // 0x271d
|
field public static final int ERROR_NO_PROFILES_AVAILABLE = 10013; // 0x271d
|
||||||
field public static final int ERROR_OPERATION_BUSY = 10016; // 0x2720
|
field public static final int ERROR_OPERATION_BUSY = 10016; // 0x2720
|
||||||
|
|||||||
@@ -803,6 +803,13 @@ public class EuiccManager {
|
|||||||
*/
|
*/
|
||||||
public static final int ERROR_OPERATION_BUSY = 10016;
|
public static final int ERROR_OPERATION_BUSY = 10016;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Failure due to target port is not supported.
|
||||||
|
* @see #switchToSubscription(int, int, PendingIntent)
|
||||||
|
*/
|
||||||
|
public static final int ERROR_INVALID_PORT = 10017;
|
||||||
|
|
||||||
|
|
||||||
private final Context mContext;
|
private final Context mContext;
|
||||||
private int mCardId;
|
private int mCardId;
|
||||||
|
|
||||||
@@ -1118,6 +1125,15 @@ public class EuiccManager {
|
|||||||
* intent to prompt the user to accept the download. The caller should also be authorized to
|
* intent to prompt the user to accept the download. The caller should also be authorized to
|
||||||
* manage the subscription to be enabled.
|
* manage the subscription to be enabled.
|
||||||
*
|
*
|
||||||
|
* <p> From Android T, devices might support MEP(Multiple Enabled Profile), the subscription
|
||||||
|
* can be installed on different port from the eUICC. Calling apps with carrier privilege
|
||||||
|
* (see {@link TelephonyManager#hasCarrierPrivileges}) over the currently active subscriptions
|
||||||
|
* can use {@link #switchToSubscription(int, int, PendingIntent)} to specify which port to
|
||||||
|
* enable the subscription. Otherwise, use this API to enable the subscription on the eUICC
|
||||||
|
* and the platform will internally resolve a port. If there is no available port,
|
||||||
|
* an {@link #EMBEDDED_SUBSCRIPTION_RESULT_RESOLVABLE_ERROR} might be returned in the callback
|
||||||
|
* intent to prompt the user to disable an already-active subscription.
|
||||||
|
*
|
||||||
* @param subscriptionId the ID of the subscription to enable. May be
|
* @param subscriptionId the ID of the subscription to enable. May be
|
||||||
* {@link android.telephony.SubscriptionManager#INVALID_SUBSCRIPTION_ID} to deactivate the
|
* {@link android.telephony.SubscriptionManager#INVALID_SUBSCRIPTION_ID} to deactivate the
|
||||||
* current profile without activating another profile to replace it. If it's a disable
|
* current profile without activating another profile to replace it. If it's a disable
|
||||||
@@ -1125,12 +1141,7 @@ public class EuiccManager {
|
|||||||
* permission, or the calling app must be authorized to manage the active subscription on
|
* permission, or the calling app must be authorized to manage the active subscription on
|
||||||
* the target eUICC.
|
* the target eUICC.
|
||||||
* @param callbackIntent a PendingIntent to launch when the operation completes.
|
* @param callbackIntent a PendingIntent to launch when the operation completes.
|
||||||
*
|
|
||||||
* @deprecated From T, callers should use
|
|
||||||
* {@link #switchToSubscription(int, int, PendingIntent)} instead to specify a port
|
|
||||||
* index on the card to switch to.
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
@RequiresPermission(Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS)
|
@RequiresPermission(Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS)
|
||||||
public void switchToSubscription(int subscriptionId, PendingIntent callbackIntent) {
|
public void switchToSubscription(int subscriptionId, PendingIntent callbackIntent) {
|
||||||
if (!isEnabled()) {
|
if (!isEnabled()) {
|
||||||
@@ -1149,19 +1160,18 @@ public class EuiccManager {
|
|||||||
* Switch to (enable) the given subscription.
|
* Switch to (enable) the given subscription.
|
||||||
*
|
*
|
||||||
* <p> Requires the {@code android.Manifest.permission#WRITE_EMBEDDED_SUBSCRIPTIONS} permission,
|
* <p> Requires the {@code android.Manifest.permission#WRITE_EMBEDDED_SUBSCRIPTIONS} permission,
|
||||||
* or the calling app must be authorized to manage both the currently-active subscription and
|
* or the caller must be having both the carrier privileges
|
||||||
* the subscription to be enabled according to the subscription metadata. Without the former,
|
* (see {@link TelephonyManager#hasCarrierPrivileges}) over any currently active subscriptions
|
||||||
* an {@link #EMBEDDED_SUBSCRIPTION_RESULT_RESOLVABLE_ERROR} will be returned in the callback
|
* and the subscription to be enabled according to the subscription metadata.
|
||||||
* intent to prompt the user to accept the download.
|
* Without the former permissions, an SecurityException is thrown.
|
||||||
*
|
*
|
||||||
* <p>On a multi-active SIM device, requires the
|
* <p> If the caller is passing invalid port index,
|
||||||
* {@code android.Manifest.permission#WRITE_EMBEDDED_SUBSCRIPTIONS} permission, or a calling app
|
* an {@link #EMBEDDED_SUBSCRIPTION_RESULT_ERROR} with detailed error code
|
||||||
* only if the targeted eUICC does not currently have an active subscription or the calling app
|
* {@link #ERROR_INVALID_PORT} will be returned.
|
||||||
* is authorized to manage the active subscription on the target eUICC, and the calling app is
|
*
|
||||||
* authorized to manage any active subscription on any SIM. Without it, an
|
* <p> Depending on the target port and permission check,
|
||||||
* {@link #EMBEDDED_SUBSCRIPTION_RESULT_RESOLVABLE_ERROR} will be returned in the callback
|
* an {@link #EMBEDDED_SUBSCRIPTION_RESULT_RESOLVABLE_ERROR} might be returned to the callback
|
||||||
* intent to prompt the user to accept the download. The caller should also be authorized to
|
* intent to prompt the user to authorize before the switch.
|
||||||
* manage the subscription to be enabled.
|
|
||||||
*
|
*
|
||||||
* @param subscriptionId the ID of the subscription to enable. May be
|
* @param subscriptionId the ID of the subscription to enable. May be
|
||||||
* {@link android.telephony.SubscriptionManager#INVALID_SUBSCRIPTION_ID} to deactivate the
|
* {@link android.telephony.SubscriptionManager#INVALID_SUBSCRIPTION_ID} to deactivate the
|
||||||
|
|||||||
Reference in New Issue
Block a user