Merge "Carrier confirmation code." am: 6627d2c4df
am: 0e788e00b6
Change-Id: Ibbb439b724ee031b76ff42ecd84c3c1f2df69ae1
This commit is contained in:
@@ -97,6 +97,10 @@ public abstract class EuiccService extends Service {
|
|||||||
public static final String ACTION_RESOLVE_NO_PRIVILEGES =
|
public static final String ACTION_RESOLVE_NO_PRIVILEGES =
|
||||||
"android.service.euicc.action.RESOLVE_NO_PRIVILEGES";
|
"android.service.euicc.action.RESOLVE_NO_PRIVILEGES";
|
||||||
|
|
||||||
|
/** Ask the user to input carrier confirmation code. */
|
||||||
|
public static final String ACTION_RESOLVE_CONFIRMATION_CODE =
|
||||||
|
"android.service.euicc.action.RESOLVE_CONFIRMATION_CODE";
|
||||||
|
|
||||||
/** Intent extra set for resolution requests containing the package name of the calling app. */
|
/** Intent extra set for resolution requests containing the package name of the calling app. */
|
||||||
public static final String EXTRA_RESOLUTION_CALLING_PACKAGE =
|
public static final String EXTRA_RESOLUTION_CALLING_PACKAGE =
|
||||||
"android.service.euicc.extra.RESOLUTION_CALLING_PACKAGE";
|
"android.service.euicc.extra.RESOLUTION_CALLING_PACKAGE";
|
||||||
@@ -105,6 +109,8 @@ public abstract class EuiccService extends Service {
|
|||||||
public static final int RESULT_OK = 0;
|
public static final int RESULT_OK = 0;
|
||||||
/** Result code indicating that an active SIM must be deactivated to perform the operation. */
|
/** Result code indicating that an active SIM must be deactivated to perform the operation. */
|
||||||
public static final int RESULT_MUST_DEACTIVATE_SIM = -1;
|
public static final int RESULT_MUST_DEACTIVATE_SIM = -1;
|
||||||
|
/** Result code indicating that the user must input a carrier confirmation code. */
|
||||||
|
public static final int RESULT_NEED_CONFIRMATION_CODE = -2;
|
||||||
// New predefined codes should have negative values.
|
// New predefined codes should have negative values.
|
||||||
|
|
||||||
/** Start of implementation-specific error results. */
|
/** Start of implementation-specific error results. */
|
||||||
@@ -119,10 +125,13 @@ public abstract class EuiccService extends Service {
|
|||||||
RESOLUTION_ACTIONS = new ArraySet<>();
|
RESOLUTION_ACTIONS = new ArraySet<>();
|
||||||
RESOLUTION_ACTIONS.add(EuiccService.ACTION_RESOLVE_DEACTIVATE_SIM);
|
RESOLUTION_ACTIONS.add(EuiccService.ACTION_RESOLVE_DEACTIVATE_SIM);
|
||||||
RESOLUTION_ACTIONS.add(EuiccService.ACTION_RESOLVE_NO_PRIVILEGES);
|
RESOLUTION_ACTIONS.add(EuiccService.ACTION_RESOLVE_NO_PRIVILEGES);
|
||||||
|
RESOLUTION_ACTIONS.add(EuiccService.ACTION_RESOLVE_CONFIRMATION_CODE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Boolean extra for resolution actions indicating whether the user granted consent. */
|
/** Boolean extra for resolution actions indicating whether the user granted consent. */
|
||||||
public static final String RESOLUTION_EXTRA_CONSENT = "consent";
|
public static final String RESOLUTION_EXTRA_CONSENT = "consent";
|
||||||
|
/** String extra for resolution actions indicating the carrier confirmation code. */
|
||||||
|
public static final String RESOLUTION_EXTRA_CONFIRMATION_CODE = "confirmation_code";
|
||||||
|
|
||||||
private final IEuiccService.Stub mStubWrapper;
|
private final IEuiccService.Stub mStubWrapper;
|
||||||
|
|
||||||
|
|||||||
@@ -53,6 +53,8 @@ public final class DownloadableSubscription implements Parcelable {
|
|||||||
@Nullable
|
@Nullable
|
||||||
public final String encodedActivationCode;
|
public final String encodedActivationCode;
|
||||||
|
|
||||||
|
@Nullable private String confirmationCode;
|
||||||
|
|
||||||
// see getCarrierName and setCarrierName
|
// see getCarrierName and setCarrierName
|
||||||
@Nullable
|
@Nullable
|
||||||
private String carrierName;
|
private String carrierName;
|
||||||
@@ -66,6 +68,7 @@ public final class DownloadableSubscription implements Parcelable {
|
|||||||
|
|
||||||
private DownloadableSubscription(Parcel in) {
|
private DownloadableSubscription(Parcel in) {
|
||||||
encodedActivationCode = in.readString();
|
encodedActivationCode = in.readString();
|
||||||
|
confirmationCode = in.readString();
|
||||||
carrierName = in.readString();
|
carrierName = in.readString();
|
||||||
accessRules = in.createTypedArray(UiccAccessRule.CREATOR);
|
accessRules = in.createTypedArray(UiccAccessRule.CREATOR);
|
||||||
}
|
}
|
||||||
@@ -82,6 +85,21 @@ public final class DownloadableSubscription implements Parcelable {
|
|||||||
return new DownloadableSubscription(encodedActivationCode);
|
return new DownloadableSubscription(encodedActivationCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the confirmation code.
|
||||||
|
*/
|
||||||
|
public void setConfirmationCode(String confirmationCode) {
|
||||||
|
this.confirmationCode = confirmationCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the confirmation code.
|
||||||
|
*/
|
||||||
|
@Nullable
|
||||||
|
public String getConfirmationCode() {
|
||||||
|
return confirmationCode;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the user-visible carrier name.
|
* Set the user-visible carrier name.
|
||||||
* @hide
|
* @hide
|
||||||
@@ -134,6 +152,7 @@ public final class DownloadableSubscription implements Parcelable {
|
|||||||
@Override
|
@Override
|
||||||
public void writeToParcel(Parcel dest, int flags) {
|
public void writeToParcel(Parcel dest, int flags) {
|
||||||
dest.writeString(encodedActivationCode);
|
dest.writeString(encodedActivationCode);
|
||||||
|
dest.writeString(confirmationCode);
|
||||||
dest.writeString(carrierName);
|
dest.writeString(carrierName);
|
||||||
dest.writeTypedArray(accessRules, flags);
|
dest.writeTypedArray(accessRules, flags);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user