Merge "Add euicc privileged actions and extras."

This commit is contained in:
TreeHugger Robot
2019-01-23 06:41:45 +00:00
committed by Android (Google) Code Review
3 changed files with 113 additions and 0 deletions

View File

@@ -6164,12 +6164,15 @@ package android.service.euicc {
method public abstract int onSwitchToSubscription(int, @Nullable String, boolean);
method public abstract int onUpdateSubscriptionNickname(int, String, String);
field public static final String ACTION_BIND_CARRIER_PROVISIONING_SERVICE = "android.service.euicc.action.BIND_CARRIER_PROVISIONING_SERVICE";
field public static final String ACTION_DELETE_SUBSCRIPTION_PRIVILEGED = "android.service.euicc.action.DELETE_SUBSCRIPTION_PRIVILEGED";
field public static final String ACTION_MANAGE_EMBEDDED_SUBSCRIPTIONS = "android.service.euicc.action.MANAGE_EMBEDDED_SUBSCRIPTIONS";
field public static final String ACTION_PROVISION_EMBEDDED_SUBSCRIPTION = "android.service.euicc.action.PROVISION_EMBEDDED_SUBSCRIPTION";
field public static final String ACTION_RENAME_SUBSCRIPTION_PRIVILEGED = "android.service.euicc.action.RENAME_SUBSCRIPTION_PRIVILEGED";
field @Deprecated public static final String ACTION_RESOLVE_CONFIRMATION_CODE = "android.service.euicc.action.RESOLVE_CONFIRMATION_CODE";
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_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";
field public static final String EXTRA_RESOLUTION_ALLOW_POLICY_RULES = "android.service.euicc.extra.RESOLUTION_ALLOW_POLICY_RULES";
@@ -7913,9 +7916,12 @@ package android.telephony.euicc {
method @RequiresPermission(android.Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS) public void getDefaultDownloadableSubscriptionList(android.app.PendingIntent);
method @RequiresPermission(android.Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS) public void getDownloadableSubscriptionMetadata(android.telephony.euicc.DownloadableSubscription, android.app.PendingIntent);
method @RequiresPermission(android.Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS) public int getOtaStatus();
field public static final String ACTION_DELETE_SUBSCRIPTION_PRIVILEGED = "android.telephony.euicc.action.DELETE_SUBSCRIPTION_PRIVILEGED";
field @RequiresPermission(android.Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS) public static final String ACTION_OTA_STATUS_CHANGED = "android.telephony.euicc.action.OTA_STATUS_CHANGED";
field public static final String ACTION_PROFILE_SELECTION = "android.telephony.euicc.action.PROFILE_SELECTION";
field public static final String ACTION_PROVISION_EMBEDDED_SUBSCRIPTION = "android.telephony.euicc.action.PROVISION_EMBEDDED_SUBSCRIPTION";
field public static final String ACTION_RENAME_SUBSCRIPTION_PRIVILEGED = "android.telephony.euicc.action.RENAME_SUBSCRIPTION_PRIVILEGED";
field public static final String ACTION_TOGGLE_SUBSCRIPTION_PRIVILEGED = "android.telephony.euicc.action.TOGGLE_SUBSCRIPTION_PRIVILEGED";
field public static final int EUICC_ACTIVATION_TYPE_BACKUP = 2; // 0x2
field public static final int EUICC_ACTIVATION_TYPE_DEFAULT = 1; // 0x1
field public static final int EUICC_ACTIVATION_TYPE_TRANSFER = 3; // 0x3
@@ -7926,7 +7932,10 @@ package android.telephony.euicc {
field public static final int EUICC_OTA_SUCCEEDED = 3; // 0x3
field public static final String EXTRA_ACTIVATION_TYPE = "android.telephony.euicc.extra.ACTIVATION_TYPE";
field public static final String EXTRA_EMBEDDED_SUBSCRIPTION_DOWNLOADABLE_SUBSCRIPTIONS = "android.telephony.euicc.extra.EMBEDDED_SUBSCRIPTION_DOWNLOADABLE_SUBSCRIPTIONS";
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_SUBSCRIPTION_ID = "android.telephony.euicc.extra.SUBSCRIPTION_ID";
field public static final String EXTRA_SUBSCRIPTION_NICKNAME = "android.telephony.euicc.extra.SUBSCRIPTION_NICKNAME";
}
@IntDef(prefix={"EUICC_OTA_"}, value={android.telephony.euicc.EuiccManager.EUICC_OTA_IN_PROGRESS, android.telephony.euicc.EuiccManager.EUICC_OTA_FAILED, android.telephony.euicc.EuiccManager.EUICC_OTA_SUCCEEDED, android.telephony.euicc.EuiccManager.EUICC_OTA_NOT_NEEDED, android.telephony.euicc.EuiccManager.EUICC_OTA_STATUS_UNAVAILABLE}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface EuiccManager.OtaStatus {

View File

@@ -103,10 +103,23 @@ public abstract class EuiccService extends Service {
*/
public static final String ACTION_MANAGE_EMBEDDED_SUBSCRIPTIONS =
"android.service.euicc.action.MANAGE_EMBEDDED_SUBSCRIPTIONS";
/** @see android.telephony.euicc.EuiccManager#ACTION_PROVISION_EMBEDDED_SUBSCRIPTION */
public static final String ACTION_PROVISION_EMBEDDED_SUBSCRIPTION =
"android.service.euicc.action.PROVISION_EMBEDDED_SUBSCRIPTION";
/** @see android.telephony.euicc.EuiccManager#ACTION_TOGGLE_SUBSCRIPTION_PRIVILEGED */
public static final String ACTION_TOGGLE_SUBSCRIPTION_PRIVILEGED =
"android.service.euicc.action.TOGGLE_SUBSCRIPTION_PRIVILEGED";
/** @see android.telephony.euicc.EuiccManager#ACTION_DELETE_SUBSCRIPTION_PRIVILEGED */
public static final String ACTION_DELETE_SUBSCRIPTION_PRIVILEGED =
"android.service.euicc.action.DELETE_SUBSCRIPTION_PRIVILEGED";
/** @see android.telephony.euicc.EuiccManager#ACTION_RENAME_SUBSCRIPTION_PRIVILEGED */
public static final String ACTION_RENAME_SUBSCRIPTION_PRIVILEGED =
"android.service.euicc.action.RENAME_SUBSCRIPTION_PRIVILEGED";
// 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

View File

@@ -128,6 +128,66 @@ public class EuiccManager {
public static final String ACTION_RESOLVE_ERROR =
"android.telephony.euicc.action.RESOLVE_ERROR";
/**
* Intent action sent by system apps (such as the Settings app) to the Telephony framework to
* enable or disable a subscription. Must be accompanied with {@link #EXTRA_SUBSCRIPTION_ID} and
* {@link #EXTRA_ENABLE_SUBSCRIPTION}.
*
* <p>Unlike {@link #switchToSubscription(int, PendingIntent)}, using this action allows the
* underlying eUICC service (i.e. the LPA app) to control the UI experience during this
* operation. The action is received by the Telephony framework, which in turn selects and
* launches an appropriate LPA activity to present UI to the user. For example, the activity may
* show a confirmation dialog, a progress dialog, or an error dialog when necessary.
*
* <p>The launched activity will immediately finish with
* {@link android.app.Activity#RESULT_CANCELED} if {@link #isEnabled} is false.
*
* @hide
*/
@SystemApi
public static final String ACTION_TOGGLE_SUBSCRIPTION_PRIVILEGED =
"android.telephony.euicc.action.TOGGLE_SUBSCRIPTION_PRIVILEGED";
/**
* Intent action sent by system apps (such as the Settings app) to the Telephony framework to
* delete a subscription. Must be accompanied with {@link #EXTRA_SUBSCRIPTION_ID}.
*
* <p>Unlike {@link #deleteSubscription(int, PendingIntent)}, using this action allows the
* underlying eUICC service (i.e. the LPA app) to control the UI experience during this
* operation. The action is received by the Telephony framework, which in turn selects and
* launches an appropriate LPA activity to present UI to the user. For example, the activity may
* show a confirmation dialog, a progress dialog, or an error dialog when necessary.
*
* <p>The launched activity will immediately finish with
* {@link android.app.Activity#RESULT_CANCELED} if {@link #isEnabled} is false.
*
* @hide
*/
@SystemApi
public static final String ACTION_DELETE_SUBSCRIPTION_PRIVILEGED =
"android.telephony.euicc.action.DELETE_SUBSCRIPTION_PRIVILEGED";
/**
* Intent action sent by system apps (such as the Settings app) to the Telephony framework to
* rename a subscription. Must be accompanied with {@link #EXTRA_SUBSCRIPTION_ID} and
* {@link #EXTRA_SUBSCRIPTION_NICKNAME}.
*
* <p>Unlike {@link #updateSubscriptionNickname(int, String, PendingIntent)}, using this action
* allows the the underlying eUICC service (i.e. the LPA app) to control the UI experience
* during this operation. The action is received by the Telephony framework, which in turn
* selects and launches an appropriate LPA activity to present UI to the user. For example, the
* activity may show a confirmation dialog, a progress dialog, or an error dialog when
* necessary.
*
* <p>The launched activity will immediately finish with
* {@link android.app.Activity#RESULT_CANCELED} if {@link #isEnabled} is false.
*
* @hide
*/
@SystemApi
public static final String ACTION_RENAME_SUBSCRIPTION_PRIVILEGED =
"android.telephony.euicc.action.RENAME_SUBSCRIPTION_PRIVILEGED";
/**
* Result code for an operation indicating that the operation succeeded.
*/
@@ -218,6 +278,37 @@ public class EuiccManager {
public static final String EXTRA_FORCE_PROVISION =
"android.telephony.euicc.extra.FORCE_PROVISION";
/**
* Key for an extra set on privileged actions {@link #ACTION_TOGGLE_SUBSCRIPTION_PRIVILEGED},
* {@link #ACTION_DELETE_SUBSCRIPTION_PRIVILEGED}, and
* {@link #ACTION_RENAME_SUBSCRIPTION_PRIVILEGED} providing the ID of the targeted subscription.
*
* @hide
*/
@SystemApi
public static final String EXTRA_SUBSCRIPTION_ID =
"android.telephony.euicc.extra.SUBSCRIPTION_ID";
/**
* Key for an extra set on {@link #ACTION_TOGGLE_SUBSCRIPTION_PRIVILEGED} providing a boolean
* value of whether to enable or disable the targeted subscription.
*
* @hide
*/
@SystemApi
public static final String EXTRA_ENABLE_SUBSCRIPTION =
"android.telephony.euicc.extra.ENABLE_SUBSCRIPTION";
/**
* Key for an extra set on {@link #ACTION_RENAME_SUBSCRIPTION_PRIVILEGED} providing a new
* nickname for the targeted subscription.
*
* @hide
*/
@SystemApi
public static final String EXTRA_SUBSCRIPTION_NICKNAME =
"android.telephony.euicc.extra.SUBSCRIPTION_NICKNAME";
/**
* 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.