diff options
| author | 2018-08-09 15:53:31 -0700 | |
|---|---|---|
| committer | 2018-08-09 15:53:31 -0700 | |
| commit | 6fd2776ec7edfb66ec3c5b8bc90c93a6adc16bf0 (patch) | |
| tree | c28513af9bc138d88dcbfecf38c3b13f35d0dfd4 | |
| parent | d45843440410c6228617198201ff709abbad9ee3 (diff) | |
| parent | 430b67054640ab3a09e6d4d66e67de318bb7a221 (diff) | |
Merge "IMS: Adding support for TIR/TIP permanent provisioning" am: 1a622a4215 am: 24fd6dd4d6
am: 430b670546
Change-Id: I7af08942269129a68a8948a6aea9d9fbe551c1fc
| -rw-r--r-- | api/system-current.txt | 4 | ||||
| -rw-r--r-- | telephony/java/android/telephony/ims/ImsSsInfo.java | 57 |
2 files changed, 60 insertions, 1 deletions
diff --git a/api/system-current.txt b/api/system-current.txt index 98113c2de958..a8e8dcb3b422 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -5924,12 +5924,16 @@ package android.telephony.ims { ctor public ImsSsInfo(int, java.lang.String); method public int describeContents(); method public java.lang.String getIcbNum(); + method public int getProvisionStatus(); method public int getStatus(); method public void writeToParcel(android.os.Parcel, int); field public static final android.os.Parcelable.Creator<android.telephony.ims.ImsSsInfo> CREATOR; field public static final int DISABLED = 0; // 0x0 field public static final int ENABLED = 1; // 0x1 field public static final int NOT_REGISTERED = -1; // 0xffffffff + field public static final int SERVICE_NOT_PROVISIONED = 0; // 0x0 + field public static final int SERVICE_PROVISIONED = 1; // 0x1 + field public static final int SERVICE_PROVISIONING_UNKNOWN = -1; // 0xffffffff } public final class ImsStreamMediaProfile implements android.os.Parcelable { diff --git a/telephony/java/android/telephony/ims/ImsSsInfo.java b/telephony/java/android/telephony/ims/ImsSsInfo.java index c6f8622f3fd9..e924a2521617 100644 --- a/telephony/java/android/telephony/ims/ImsSsInfo.java +++ b/telephony/java/android/telephony/ims/ImsSsInfo.java @@ -16,10 +16,14 @@ package android.telephony.ims; +import android.annotation.IntDef; import android.annotation.SystemApi; import android.os.Parcel; import android.os.Parcelable; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + /** * Provides the result to the update operation for the supplementary service configuration. * @@ -34,6 +38,30 @@ public final class ImsSsInfo implements Parcelable { public static final int DISABLED = 0; public static final int ENABLED = 1; + /** + * Provision status of service + */ + /** @hide */ + @IntDef({ + SERVICE_PROVISIONING_UNKNOWN, + SERVICE_NOT_PROVISIONED, + SERVICE_PROVISIONED + }) + @Retention(RetentionPolicy.SOURCE) + public @interface ServiceProvisionStatus {} + /** + * Unknown provision status for the service. + */ + public static final int SERVICE_PROVISIONING_UNKNOWN = (-1); + /** + * Service is not provisioned. + */ + public static final int SERVICE_NOT_PROVISIONED = 0; + /** + * Service is provisioned. + */ + public static final int SERVICE_PROVISIONED = 1; + // 0: disabled, 1: enabled /** @hide */ // TODO: Make private, do not modify this field directly, use getter! @@ -41,6 +69,8 @@ public final class ImsSsInfo implements Parcelable { /** @hide */ // TODO: Make private, do not modify this field directly, use getter! public String mIcbNum; + /** @hide */ + public int mProvisionStatus = SERVICE_PROVISIONING_UNKNOWN; /**@hide*/ // TODO: Remove! Do not use this constructor, instead use public version. @@ -74,16 +104,30 @@ public final class ImsSsInfo implements Parcelable { public void writeToParcel(Parcel out, int flags) { out.writeInt(mStatus); out.writeString(mIcbNum); + out.writeInt(mProvisionStatus); } @Override public String toString() { - return super.toString() + ", Status: " + ((mStatus == 0) ? "disabled" : "enabled"); + return super.toString() + ", Status: " + ((mStatus == 0) ? "disabled" : "enabled") + + ", ProvisionStatus: " + provisionStatusToString(mProvisionStatus); + } + + private static String provisionStatusToString(int pStatus) { + switch (pStatus) { + case SERVICE_NOT_PROVISIONED: + return "Service not provisioned"; + case SERVICE_PROVISIONED: + return "Service provisioned"; + default: + return "Service provisioning unknown"; + } } private void readFromParcel(Parcel in) { mStatus = in.readInt(); mIcbNum = in.readString(); + mProvisionStatus = in.readInt(); } public static final Creator<ImsSsInfo> CREATOR = @@ -112,4 +156,15 @@ public final class ImsSsInfo implements Parcelable { public String getIcbNum() { return mIcbNum; } + + /** + * @return Supplementary Service Provision status. Valid Values are: + * {@link #SERVICE_PROVISIONING_UNKNOWN}, + * {@link #SERVICE_NOT_PROVISIONED}, + * {@link #SERVICE_PROVISIONED} + */ + @ServiceProvisionStatus + public int getProvisionStatus() { + return mProvisionStatus; + } } |