diff options
| -rw-r--r-- | core/api/system-current.txt | 2 | ||||
| -rw-r--r-- | telephony/java/android/telephony/ims/DelegateRegistrationState.java | 34 |
2 files changed, 34 insertions, 2 deletions
diff --git a/core/api/system-current.txt b/core/api/system-current.txt index 29a445322085..28917351801f 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -13164,6 +13164,7 @@ package android.telephony.ims { method @NonNull public java.util.Set<android.telephony.ims.FeatureTagState> getDeregisteredFeatureTags(); method @NonNull public java.util.Set<android.telephony.ims.FeatureTagState> getDeregisteringFeatureTags(); method @NonNull public java.util.Set<java.lang.String> getRegisteredFeatureTags(); + method @NonNull public java.util.Set<java.lang.String> getRegisteringFeatureTags(); method public void writeToParcel(@NonNull android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ims.DelegateRegistrationState> CREATOR; field public static final int DEREGISTERED_REASON_NOT_PROVISIONED = 1; // 0x1 @@ -13181,6 +13182,7 @@ package android.telephony.ims { method @NonNull public android.telephony.ims.DelegateRegistrationState.Builder addDeregisteringFeatureTag(@NonNull String, int); method @NonNull public android.telephony.ims.DelegateRegistrationState.Builder addRegisteredFeatureTag(@NonNull String); method @NonNull public android.telephony.ims.DelegateRegistrationState.Builder addRegisteredFeatureTags(@NonNull java.util.Set<java.lang.String>); + method @NonNull public android.telephony.ims.DelegateRegistrationState.Builder addRegisteringFeatureTags(@NonNull java.util.Set<java.lang.String>); method @NonNull public android.telephony.ims.DelegateRegistrationState build(); } diff --git a/telephony/java/android/telephony/ims/DelegateRegistrationState.java b/telephony/java/android/telephony/ims/DelegateRegistrationState.java index c00c741a0d60..1b1040430fd2 100644 --- a/telephony/java/android/telephony/ims/DelegateRegistrationState.java +++ b/telephony/java/android/telephony/ims/DelegateRegistrationState.java @@ -117,6 +117,7 @@ public final class DelegateRegistrationState implements Parcelable { }) public @interface DeregisteringReason {} + private ArraySet<String> mRegisteringTags = new ArraySet<>(); private ArraySet<String> mRegisteredTags = new ArraySet<>(); private final ArraySet<FeatureTagState> mDeregisteringTags = new ArraySet<>(); private final ArraySet<FeatureTagState> mDeregisteredTags = new ArraySet<>(); @@ -134,6 +135,20 @@ public final class DelegateRegistrationState implements Parcelable { } /** + * Add the set of feature tags that are associated with this SipDelegate and + * the IMS stack is actively trying to register on the carrier network. + * + * The feature tags will either move to the registered or deregistered state + * depending on the result of the registration. + * @param featureTags The IMS media feature tags that are in the progress of registering. + * @return The in-progress Builder instance for RegistrationState. ] + */ + public @NonNull Builder addRegisteringFeatureTags(@NonNull Set<String> featureTags) { + mState.mRegisteringTags.addAll(featureTags); + return this; + } + + /** * Add a feature tag that is currently included in the current network IMS Registration. * @param featureTag The IMS media feature tag included in the current IMS registration. * @return The in-progress Builder instance for RegistrationState. @@ -209,6 +224,17 @@ public final class DelegateRegistrationState implements Parcelable { mRegisteredTags = (ArraySet<String>) source.readArraySet(null); readStateFromParcel(source, mDeregisteringTags); readStateFromParcel(source, mDeregisteredTags); + mRegisteringTags = (ArraySet<String>) source.readArraySet(null); + } + + /** + * Get the feature tags that are associated with this SipDelegate that the IMS stack is actively + * trying to register on the carrier network. + * @return A Set of feature tags associated with this SipDelegate that the IMS service is + * currently trying to register on the carrier network. + */ + public @NonNull Set<String> getRegisteringFeatureTags() { + return new ArraySet<>(mRegisteringTags); } /** @@ -286,6 +312,7 @@ public final class DelegateRegistrationState implements Parcelable { dest.writeArraySet(mRegisteredTags); writeStateToParcel(dest, mDeregisteringTags); writeStateToParcel(dest, mDeregisteredTags); + dest.writeArraySet(mRegisteringTags); } private void writeStateToParcel(Parcel dest, Set<FeatureTagState> state) { @@ -311,19 +338,22 @@ public final class DelegateRegistrationState implements Parcelable { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; DelegateRegistrationState that = (DelegateRegistrationState) o; - return mRegisteredTags.equals(that.mRegisteredTags) + return mRegisteringTags.equals(that.mRegisteringTags) + && mRegisteredTags.equals(that.mRegisteredTags) && mDeregisteringTags.equals(that.mDeregisteringTags) && mDeregisteredTags.equals(that.mDeregisteredTags); } @Override public int hashCode() { - return Objects.hash(mRegisteredTags, mDeregisteringTags, mDeregisteredTags); + return Objects.hash(mRegisteringTags, mRegisteredTags, + mDeregisteringTags, mDeregisteredTags); } @Override public String toString() { return "DelegateRegistrationState{ registered={" + mRegisteredTags + + "}, registering={" + mRegisteringTags + "}, deregistering={" + mDeregisteringTags + "}, deregistered={" + mDeregisteredTags + "}}"; } |