Merge "Support RCS master switch" am: 6de3c4c12e am: fea850f7d3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1918642 Change-Id: I30fb76d285bd99ccb59f3fcfc6261b73a109fd34
This commit is contained in:
@@ -13490,12 +13490,14 @@ package android.telephony.ims {
|
||||
}
|
||||
|
||||
public final class RcsClientConfiguration implements android.os.Parcelable {
|
||||
ctor public RcsClientConfiguration(@NonNull String, @NonNull String, @NonNull String, @NonNull String);
|
||||
ctor @Deprecated public RcsClientConfiguration(@NonNull String, @NonNull String, @NonNull String, @NonNull String);
|
||||
ctor public RcsClientConfiguration(@NonNull String, @NonNull String, @NonNull String, @NonNull String, boolean);
|
||||
method public int describeContents();
|
||||
method @NonNull public String getClientVendor();
|
||||
method @NonNull public String getClientVersion();
|
||||
method @NonNull public String getRcsProfile();
|
||||
method @NonNull public String getRcsVersion();
|
||||
method public boolean isRcsEnabledByUser();
|
||||
method public void writeToParcel(@NonNull android.os.Parcel, int);
|
||||
field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ims.RcsClientConfiguration> CREATOR;
|
||||
field public static final String RCS_PROFILE_1_0 = "UP_1.0";
|
||||
|
||||
@@ -50,6 +50,7 @@ public final class RcsClientConfiguration implements Parcelable {
|
||||
private String mRcsProfile;
|
||||
private String mClientVendor;
|
||||
private String mClientVersion;
|
||||
private boolean mRcsEnabledByUser;
|
||||
|
||||
/**
|
||||
* Create a RcsClientConfiguration object.
|
||||
@@ -63,14 +64,41 @@ public final class RcsClientConfiguration implements Parcelable {
|
||||
* @param clientVersion Identifies the RCS client version. Refer to GSMA
|
||||
* RCC.07 "client_version" parameter.
|
||||
* Example:client_version=RCSAndrd-1.0
|
||||
* @deprecated Use {@link #RcsClientConfiguration(String, String, String, String, boolean)}
|
||||
* instead. Deprecated prototype assumes that the user setting controlling RCS is enabled.
|
||||
*/
|
||||
@Deprecated
|
||||
public RcsClientConfiguration(@NonNull String rcsVersion,
|
||||
@NonNull @StringRcsProfile String rcsProfile,
|
||||
@NonNull String clientVendor, @NonNull String clientVersion) {
|
||||
this(rcsVersion, rcsProfile, clientVendor, clientVersion, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a RcsClientConfiguration object.
|
||||
* Default messaging application must pass a valid configuration object
|
||||
* @param rcsVersion The parameter identifies the RCS version supported
|
||||
* by the client. Refer to GSMA RCC.07 "rcs_version" parameter.
|
||||
* @param rcsProfile Identifies a fixed set of RCS services that are
|
||||
* supported by the client. See {@link #RCS_PROFILE_1_0 } or
|
||||
* {@link #RCS_PROFILE_2_3 }
|
||||
* @param clientVendor Identifies the vendor providing the RCS client.
|
||||
* @param clientVersion Identifies the RCS client version. Refer to GSMA
|
||||
* RCC.07 "client_version" parameter.
|
||||
* Example:client_version=RCSAndrd-1.0
|
||||
* @param isRcsEnabledByUser The current user setting for whether or not the user has
|
||||
* enabled or disabled RCS. Please refer to GSMA RCC.07 "rcs_state" parameter for how this
|
||||
* can affect provisioning.
|
||||
*/
|
||||
public RcsClientConfiguration(@NonNull String rcsVersion,
|
||||
@NonNull @StringRcsProfile String rcsProfile,
|
||||
@NonNull String clientVendor, @NonNull String clientVersion,
|
||||
boolean isRcsEnabledByUser) {
|
||||
mRcsVersion = rcsVersion;
|
||||
mRcsProfile = rcsProfile;
|
||||
mClientVendor = clientVendor;
|
||||
mClientVersion = clientVersion;
|
||||
mRcsEnabledByUser = isRcsEnabledByUser;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -101,6 +129,18 @@ public final class RcsClientConfiguration implements Parcelable {
|
||||
return mClientVersion;
|
||||
}
|
||||
|
||||
/**
|
||||
* The current user setting provided by the RCS messaging application that determines
|
||||
* whether or not the user has enabled RCS.
|
||||
* <p>
|
||||
* See GSMA RCC.07 "rcs_state" parameter for more information about how this setting
|
||||
* affects provisioning.
|
||||
* @return true if RCS is enabled by the user, false if RCS is disabled by the user.
|
||||
*/
|
||||
public boolean isRcsEnabledByUser() {
|
||||
return mRcsEnabledByUser;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@link Parcelable#writeToParcel}
|
||||
*/
|
||||
@@ -110,6 +150,7 @@ public final class RcsClientConfiguration implements Parcelable {
|
||||
out.writeString(mRcsProfile);
|
||||
out.writeString(mClientVendor);
|
||||
out.writeString(mClientVersion);
|
||||
out.writeBoolean(mRcsEnabledByUser);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -124,8 +165,9 @@ public final class RcsClientConfiguration implements Parcelable {
|
||||
String rcsProfile = in.readString();
|
||||
String clientVendor = in.readString();
|
||||
String clientVersion = in.readString();
|
||||
Boolean rcsEnabledByUser = in.readBoolean();
|
||||
return new RcsClientConfiguration(rcsVersion, rcsProfile,
|
||||
clientVendor, clientVersion);
|
||||
clientVendor, clientVersion, rcsEnabledByUser);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -152,11 +194,13 @@ public final class RcsClientConfiguration implements Parcelable {
|
||||
|
||||
return mRcsVersion.equals(other.mRcsVersion) && mRcsProfile.equals(other.mRcsProfile)
|
||||
&& mClientVendor.equals(other.mClientVendor)
|
||||
&& mClientVersion.equals(other.mClientVersion);
|
||||
&& mClientVersion.equals(other.mClientVersion)
|
||||
&& (mRcsEnabledByUser == other.mRcsEnabledByUser);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(mRcsVersion, mRcsProfile, mClientVendor, mClientVersion);
|
||||
return Objects.hash(mRcsVersion, mRcsProfile, mClientVendor, mClientVersion,
|
||||
mRcsEnabledByUser);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user