Merge "Add public APIs for carrier apps"
This commit is contained in:
@@ -45500,11 +45500,13 @@ package android.telephony.euicc {
|
||||
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";
|
||||
field public static final String ACTION_START_EUICC_ACTIVATION = "android.telephony.euicc.action.START_EUICC_ACTIVATION";
|
||||
field public static final int EMBEDDED_SUBSCRIPTION_RESULT_ERROR = 2; // 0x2
|
||||
field public static final int EMBEDDED_SUBSCRIPTION_RESULT_OK = 0; // 0x0
|
||||
field public static final int EMBEDDED_SUBSCRIPTION_RESULT_RESOLVABLE_ERROR = 1; // 0x1
|
||||
field public static final String EXTRA_EMBEDDED_SUBSCRIPTION_DETAILED_CODE = "android.telephony.euicc.extra.EMBEDDED_SUBSCRIPTION_DETAILED_CODE";
|
||||
field public static final String EXTRA_EMBEDDED_SUBSCRIPTION_DOWNLOADABLE_SUBSCRIPTION = "android.telephony.euicc.extra.EMBEDDED_SUBSCRIPTION_DOWNLOADABLE_SUBSCRIPTION";
|
||||
field public static final String EXTRA_USE_QR_SCANNER = "android.telephony.euicc.extra.USE_QR_SCANNER";
|
||||
field public static final String META_DATA_CARRIER_ICON = "android.telephony.euicc.carriericon";
|
||||
}
|
||||
|
||||
|
||||
@@ -6576,6 +6576,8 @@ package android.service.euicc {
|
||||
field public static final String ACTION_RESOLVE_DEACTIVATE_SIM = "android.service.euicc.action.RESOLVE_DEACTIVATE_SIM";
|
||||
field public static final String ACTION_RESOLVE_NO_PRIVILEGES = "android.service.euicc.action.RESOLVE_NO_PRIVILEGES";
|
||||
field public static final String ACTION_RESOLVE_RESOLVABLE_ERRORS = "android.service.euicc.action.RESOLVE_RESOLVABLE_ERRORS";
|
||||
field public static final String ACTION_START_CARRIER_ACTIVATION = "android.service.euicc.action.START_CARRIER_ACTIVATION";
|
||||
field public static final String ACTION_START_EUICC_ACTIVATION = "android.service.euicc.action.START_EUICC_ACTIVATION";
|
||||
field public static final String ACTION_TOGGLE_SUBSCRIPTION_PRIVILEGED = "android.service.euicc.action.TOGGLE_SUBSCRIPTION_PRIVILEGED";
|
||||
field public static final String CATEGORY_EUICC_UI = "android.service.euicc.category.EUICC_UI";
|
||||
field public static final String EUICC_SERVICE_INTERFACE = "android.service.euicc.EuiccService";
|
||||
@@ -8627,6 +8629,7 @@ package android.telephony.euicc {
|
||||
field public static final String EXTRA_ENABLE_SUBSCRIPTION = "android.telephony.euicc.extra.ENABLE_SUBSCRIPTION";
|
||||
field public static final String EXTRA_FORCE_PROVISION = "android.telephony.euicc.extra.FORCE_PROVISION";
|
||||
field public static final String EXTRA_FROM_SUBSCRIPTION_ID = "android.telephony.euicc.extra.FROM_SUBSCRIPTION_ID";
|
||||
field public static final String EXTRA_PHYSICAL_SLOT_ID = "android.telephony.euicc.extra.PHYSICAL_SLOT_ID";
|
||||
field public static final String EXTRA_SUBSCRIPTION_ID = "android.telephony.euicc.extra.SUBSCRIPTION_ID";
|
||||
field public static final String EXTRA_SUBSCRIPTION_NICKNAME = "android.telephony.euicc.extra.SUBSCRIPTION_NICKNAME";
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ import android.annotation.CallSuper;
|
||||
import android.annotation.IntDef;
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.Nullable;
|
||||
import android.annotation.SdkConstant;
|
||||
import android.annotation.SystemApi;
|
||||
import android.app.Service;
|
||||
import android.content.Intent;
|
||||
@@ -103,6 +104,26 @@ public abstract class EuiccService extends Service {
|
||||
public static final String ACTION_BIND_CARRIER_PROVISIONING_SERVICE =
|
||||
"android.service.euicc.action.BIND_CARRIER_PROVISIONING_SERVICE";
|
||||
|
||||
/**
|
||||
* Intent action sent by the LPA to launch a carrier app Activity for eSIM activation, e.g. a
|
||||
* carrier login screen. Carrier apps wishing to support this activation method must implement
|
||||
* an Activity that responds to this intent action. Upon completion, the Activity must return
|
||||
* one of the following results to the LPA:
|
||||
*
|
||||
* <p>{@code Activity.RESULT_CANCELED}: The LPA should treat this as an back button and abort
|
||||
* the activation flow.
|
||||
* <p>{@code Activity.RESULT_OK}: The LPA should try to get an activation code from the carrier
|
||||
* app by binding to the carrier app service implementing
|
||||
* {@link #ACTION_BIND_CARRIER_PROVISIONING_SERVICE}.
|
||||
* <p>{@code Activity.RESULT_OK} with
|
||||
* {@link android.telephony.euicc.EuiccManager#EXTRA_USE_QR_SCANNER} set to true: The LPA should
|
||||
* start a QR scanner for the user to scan an eSIM profile QR code.
|
||||
* <p>For other results: The LPA should treat this as an error.
|
||||
**/
|
||||
@SdkConstant(SdkConstant.SdkConstantType.ACTIVITY_INTENT_ACTION)
|
||||
public static final String ACTION_START_CARRIER_ACTIVATION =
|
||||
"android.service.euicc.action.START_CARRIER_ACTIVATION";
|
||||
|
||||
/**
|
||||
* @see android.telephony.euicc.EuiccManager#ACTION_MANAGE_EMBEDDED_SUBSCRIPTIONS
|
||||
* The difference is this one is used by system to bring up the LUI.
|
||||
@@ -138,6 +159,15 @@ public abstract class EuiccService extends Service {
|
||||
public static final String ACTION_RENAME_SUBSCRIPTION_PRIVILEGED =
|
||||
"android.service.euicc.action.RENAME_SUBSCRIPTION_PRIVILEGED";
|
||||
|
||||
/**
|
||||
* @see android.telephony.euicc.EuiccManager#ACTION_START_EUICC_ACTIVATION. This is
|
||||
* a protected intent that can only be sent by the system, and requires the
|
||||
* {@link android.Manifest.permission#BIND_EUICC_SERVICE} permission.
|
||||
*/
|
||||
@SdkConstant(SdkConstant.SdkConstantType.ACTIVITY_INTENT_ACTION)
|
||||
public static final String ACTION_START_EUICC_ACTIVATION =
|
||||
"android.service.euicc.action.START_EUICC_ACTIVATION";
|
||||
|
||||
// LUI resolution actions. These are called by the platform to resolve errors in situations that
|
||||
// require user interaction.
|
||||
// TODO(b/33075886): Define extras for any input parameters to these dialogs once they are
|
||||
|
||||
@@ -188,6 +188,29 @@ public class EuiccManager {
|
||||
public static final String ACTION_RENAME_SUBSCRIPTION_PRIVILEGED =
|
||||
"android.telephony.euicc.action.RENAME_SUBSCRIPTION_PRIVILEGED";
|
||||
|
||||
/**
|
||||
* Intent action sent by a carrier app to launch the eSIM activation flow provided by the LPA UI
|
||||
* (LUI). The carrier app must send this intent with one of the following:
|
||||
*
|
||||
* <p>{@link #EXTRA_USE_QR_SCANNER} not set or set to false: The LPA should try to get an
|
||||
* activation code from the carrier app by binding to the carrier app service implementing
|
||||
* {@link android.service.euicc.EuiccService#ACTION_BIND_CARRIER_PROVISIONING_SERVICE}.
|
||||
* <p>{@link #EXTRA_USE_QR_SCANNER} set to true: The LPA should launch a QR scanner for the user
|
||||
* to scan an eSIM profile QR code.
|
||||
*
|
||||
* <p>Upon completion, the LPA should return one of the following results to the carrier app:
|
||||
*
|
||||
* <p>{@code Activity.RESULT_OK}: The LPA has succeeded in downloading the new eSIM profile.
|
||||
* <p>{@code Activity.RESULT_CANCELED}: The carrier app should treat this as if the user pressed
|
||||
* the back button.
|
||||
* <p>Anything else: The carrier app should treat this as an error.
|
||||
*
|
||||
* <p>LPA needs to check if caller's package name is allowed to perform this action.
|
||||
**/
|
||||
@SdkConstant(SdkConstant.SdkConstantType.ACTIVITY_INTENT_ACTION)
|
||||
public static final String ACTION_START_EUICC_ACTIVATION =
|
||||
"android.telephony.euicc.action.START_EUICC_ACTIVATION";
|
||||
|
||||
/**
|
||||
* Result code for an operation indicating that the operation succeeded.
|
||||
*/
|
||||
@@ -342,10 +365,20 @@ public class EuiccManager {
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
// TODO: Make this a @SystemApi.
|
||||
@SystemApi
|
||||
public static final String EXTRA_PHYSICAL_SLOT_ID =
|
||||
"android.telephony.euicc.extra.PHYSICAL_SLOT_ID";
|
||||
|
||||
|
||||
/**
|
||||
* Key for an extra set on actions {@link #ACTION_START_EUICC_ACTIVATION} providing a boolean
|
||||
* value of whether to start eSIM activation with QR scanner.
|
||||
*
|
||||
* <p>Expected type of the extra data: boolean
|
||||
**/
|
||||
public static final String EXTRA_USE_QR_SCANNER =
|
||||
"android.telephony.euicc.extra.USE_QR_SCANNER";
|
||||
|
||||
/**
|
||||
* Optional meta-data attribute for a carrier app providing an icon to use to represent the
|
||||
* carrier. If not provided, the app's launcher icon will be used as a fallback.
|
||||
|
||||
Reference in New Issue
Block a user