Merge "IMS RCS API Improvements-DelegateRegistrationState"
This commit is contained in:
committed by
Android (Google) Code Review
commit
2e8ec6384c
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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<>();
|
||||
@@ -133,6 +134,20 @@ public final class DelegateRegistrationState implements Parcelable {
|
||||
mState = new DelegateRegistrationState();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
@@ -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 + "}}";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user