Merge "Make RCS Message Store APIs ready to unhide"

This commit is contained in:
Sahin Caliskan
2019-02-07 22:05:00 +00:00
committed by Gerrit Code Review
45 changed files with 451 additions and 348 deletions

View File

@@ -23,7 +23,7 @@ import android.annotation.WorkerThread;
* {@link RcsParticipant}s. Please see Section 5 (1-to-1 Messaging) - GSMA RCC.71 (RCS Universal
* Profile Service Definition Document)
*
* @hide - TODO(109759350) make this public
* @hide - TODO: make public
*/
public class Rcs1To1Thread extends RcsThread {
private int mThreadId;

View File

@@ -16,14 +16,17 @@
package android.telephony.ims;
import android.os.Parcel;
import android.os.Parcelable;
/**
* The base class for events that can happen on {@link RcsParticipant}s and {@link RcsThread}s.
* @hide - TODO(109759350) make this public
*
* @hide - TODO: make public
*/
public abstract class RcsEvent implements Parcelable {
protected long mTimestamp;
public abstract class RcsEvent {
/**
* @hide
*/
protected final long mTimestamp;
protected RcsEvent(long timestamp) {
mTimestamp = timestamp;
@@ -44,17 +47,17 @@ public abstract class RcsEvent implements Parcelable {
*/
abstract void persist() throws RcsMessageStoreException;
/**
* @hide
*/
RcsEvent(Parcel in) {
mTimestamp = in.readLong();
}
@Override
/**
* @hide
*/
public void writeToParcel(Parcel dest, int flags) {
dest.writeLong(mTimestamp);
}
@Override
public int describeContents() {
return 0;
}
}

View File

@@ -17,4 +17,4 @@
package android.telephony.ims;
parcelable RcsEventQueryParameters;
parcelable RcsEventQueryParams;

View File

@@ -35,29 +35,29 @@ import java.security.InvalidParameterException;
/**
* The parameters to pass into
* {@link RcsMessageStore#getRcsEvents(RcsEventQueryParameters)} in order to select a
* {@link RcsMessageStore#getRcsEvents(RcsEventQueryParams)} in order to select a
* subset of {@link RcsEvent}s present in the message store.
*
* @hide TODO - make the Builder and builder() public. The rest should stay internal only.
* @hide - TODO: make public
*/
public class RcsEventQueryParameters implements Parcelable {
public final class RcsEventQueryParams implements Parcelable {
/**
* Flag to be used with {@link Builder#setEventType(int)} to make
* {@link RcsMessageStore#getRcsEvents(RcsEventQueryParameters)} return all types of
* {@link RcsMessageStore#getRcsEvents(RcsEventQueryParams)} return all types of
* {@link RcsEvent}s
*/
public static final int ALL_EVENTS = -1;
/**
* Flag to be used with {@link Builder#setEventType(int)} to make
* {@link RcsMessageStore#getRcsEvents(RcsEventQueryParameters)} return sub-types of
* {@link RcsMessageStore#getRcsEvents(RcsEventQueryParams)} return sub-types of
* {@link RcsGroupThreadEvent}s
*/
public static final int ALL_GROUP_THREAD_EVENTS = 0;
/**
* Flag to be used with {@link Builder#setEventType(int)} to make
* {@link RcsMessageStore#getRcsEvents(RcsEventQueryParameters)} return only
* {@link RcsMessageStore#getRcsEvents(RcsEventQueryParams)} return only
* {@link RcsParticipantAliasChangedEvent}s
*/
public static final int PARTICIPANT_ALIAS_CHANGED_EVENT =
@@ -65,7 +65,7 @@ public class RcsEventQueryParameters implements Parcelable {
/**
* Flag to be used with {@link Builder#setEventType(int)} to make
* {@link RcsMessageStore#getRcsEvents(RcsEventQueryParameters)} return only
* {@link RcsMessageStore#getRcsEvents(RcsEventQueryParams)} return only
* {@link RcsGroupThreadParticipantJoinedEvent}s
*/
public static final int GROUP_THREAD_PARTICIPANT_JOINED_EVENT =
@@ -73,7 +73,7 @@ public class RcsEventQueryParameters implements Parcelable {
/**
* Flag to be used with {@link Builder#setEventType(int)} to make
* {@link RcsMessageStore#getRcsEvents(RcsEventQueryParameters)} return only
* {@link RcsMessageStore#getRcsEvents(RcsEventQueryParams)} return only
* {@link RcsGroupThreadParticipantLeftEvent}s
*/
public static final int GROUP_THREAD_PARTICIPANT_LEFT_EVENT =
@@ -81,14 +81,14 @@ public class RcsEventQueryParameters implements Parcelable {
/**
* Flag to be used with {@link Builder#setEventType(int)} to make
* {@link RcsMessageStore#getRcsEvents(RcsEventQueryParameters)} return only
* {@link RcsMessageStore#getRcsEvents(RcsEventQueryParams)} return only
* {@link RcsGroupThreadNameChangedEvent}s
*/
public static final int GROUP_THREAD_NAME_CHANGED_EVENT = NAME_CHANGED_EVENT_TYPE;
/**
* Flag to be used with {@link Builder#setEventType(int)} to make
* {@link RcsMessageStore#getRcsEvents(RcsEventQueryParameters)} return only
* {@link RcsMessageStore#getRcsEvents(RcsEventQueryParams)} return only
* {@link RcsGroupThreadIconChangedEvent}s
*/
public static final int GROUP_THREAD_ICON_CHANGED_EVENT = ICON_CHANGED_EVENT_TYPE;
@@ -134,7 +134,7 @@ public class RcsEventQueryParameters implements Parcelable {
// The thread that the results are limited to
private int mThreadId;
RcsEventQueryParameters(@EventType int eventType, int threadId,
RcsEventQueryParams(@EventType int eventType, int threadId,
@SortingProperty int sortingProperty, boolean isAscending, int limit) {
mEventType = eventType;
mSortingProperty = sortingProperty;
@@ -144,7 +144,7 @@ public class RcsEventQueryParameters implements Parcelable {
}
/**
* @return Returns the type of {@link RcsEvent}s that this {@link RcsEventQueryParameters} is
* @return Returns the type of {@link RcsEvent}s that this {@link RcsEventQueryParams} is
* set to query for.
*/
public @EventType int getEventType() {
@@ -152,7 +152,7 @@ public class RcsEventQueryParameters implements Parcelable {
}
/**
* @return Returns the type of {@link RcsEvent}s that this {@link RcsEventQueryParameters} is
* @return Returns the type of {@link RcsEvent}s that this {@link RcsEventQueryParams} is
* set to query for.
*/
public int getLimit() {
@@ -186,7 +186,7 @@ public class RcsEventQueryParameters implements Parcelable {
}
/**
* A helper class to build the {@link RcsEventQueryParameters}.
* A helper class to build the {@link RcsEventQueryParams}.
*/
public static class Builder {
private @EventType int mEventType;
@@ -196,8 +196,8 @@ public class RcsEventQueryParameters implements Parcelable {
private int mThreadId;
/**
* Creates a new builder for {@link RcsEventQueryParameters} to be used in
* {@link RcsMessageStore#getRcsEvents(RcsEventQueryParameters)}
* Creates a new builder for {@link RcsEventQueryParams} to be used in
* {@link RcsMessageStore#getRcsEvents(RcsEventQueryParams)}
*/
public Builder() {
// empty implementation
@@ -236,7 +236,7 @@ public class RcsEventQueryParameters implements Parcelable {
/**
* Sets the property where the results should be sorted against. Defaults to
* {@link RcsEventQueryParameters.SortingProperty#SORT_BY_CREATION_ORDER}
* {@link RcsEventQueryParams.SortingProperty#SORT_BY_CREATION_ORDER}
*
* @param sortingProperty against which property the results should be sorted
* @return The same instance of the builder to chain parameters.
@@ -273,18 +273,18 @@ public class RcsEventQueryParameters implements Parcelable {
}
/**
* Builds the {@link RcsEventQueryParameters} to use in
* {@link RcsMessageStore#getRcsEvents(RcsEventQueryParameters)}
* Builds the {@link RcsEventQueryParams} to use in
* {@link RcsMessageStore#getRcsEvents(RcsEventQueryParams)}
*
* @return An instance of {@link RcsEventQueryParameters} to use with the event query.
* @return An instance of {@link RcsEventQueryParams} to use with the event query.
*/
public RcsEventQueryParameters build() {
return new RcsEventQueryParameters(mEventType, mThreadId, mSortingProperty,
public RcsEventQueryParams build() {
return new RcsEventQueryParams(mEventType, mThreadId, mSortingProperty,
mIsAscending, mLimit);
}
}
protected RcsEventQueryParameters(Parcel in) {
private RcsEventQueryParams(Parcel in) {
mEventType = in.readInt();
mThreadId = in.readInt();
mSortingProperty = in.readInt();
@@ -292,20 +292,19 @@ public class RcsEventQueryParameters implements Parcelable {
mLimit = in.readInt();
}
public static final Creator<RcsEventQueryParameters> CREATOR =
new Creator<RcsEventQueryParameters>() {
public static final Creator<RcsEventQueryParams> CREATOR =
new Creator<RcsEventQueryParams>() {
@Override
public RcsEventQueryParameters createFromParcel(Parcel in) {
return new RcsEventQueryParameters(in);
public RcsEventQueryParams createFromParcel(Parcel in) {
return new RcsEventQueryParams(in);
}
@Override
public RcsEventQueryParameters[] newArray(int size) {
return new RcsEventQueryParameters[size];
public RcsEventQueryParams[] newArray(int size) {
return new RcsEventQueryParams[size];
}
};
@Override
public int describeContents() {
return 0;

View File

@@ -22,13 +22,13 @@ import android.os.Parcelable;
import java.util.List;
/**
* The result of a {@link RcsMessageStore#getRcsEvents(RcsEventQueryParameters)}
* The result of a {@link RcsMessageStore#getRcsEvents(RcsEventQueryParams)}
* call. This class allows getting the token for querying the next batch of events in order to
* prevent handling large amounts of data at once.
*
* @hide
* @hide - TODO: make public
*/
public class RcsEventQueryResult implements Parcelable {
public final class RcsEventQueryResult implements Parcelable {
private RcsQueryContinuationToken mContinuationToken;
private List<RcsEvent> mEvents;
@@ -63,7 +63,8 @@ public class RcsEventQueryResult implements Parcelable {
return mEvents;
}
protected RcsEventQueryResult(Parcel in) {
private RcsEventQueryResult(Parcel in) {
mContinuationToken = in.readParcelable(RcsQueryContinuationToken.class.getClassLoader());
}
public static final Creator<RcsEventQueryResult> CREATOR = new Creator<RcsEventQueryResult>() {

View File

@@ -1,20 +0,0 @@
/*
*
* Copyright 2019, The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.telephony.ims;
parcelable RcsFileTransferCreationParameters;

View File

@@ -17,4 +17,4 @@
package android.telephony.ims;
parcelable RcsParticipantQueryParameters;
parcelable RcsFileTransferCreationParams;

View File

@@ -22,12 +22,12 @@ import android.os.Parcelable;
/**
* Pass an instance of this class to
* {@link RcsMessage#insertFileTransfer(RcsFileTransferCreationParameters)} create an
* {@link RcsMessage#insertFileTransfer(RcsFileTransferCreationParams)} create an
* {@link RcsFileTransferPart} and save it into storage.
*
* @hide - TODO(109759350) make this public
* @hide - TODO: make public
*/
public class RcsFileTransferCreationParameters implements Parcelable {
public final class RcsFileTransferCreationParams implements Parcelable {
private String mRcsFileTransferSessionId;
private Uri mContentUri;
private String mContentMimeType;
@@ -128,7 +128,7 @@ public class RcsFileTransferCreationParameters implements Parcelable {
/**
* @hide
*/
RcsFileTransferCreationParameters(Builder builder) {
RcsFileTransferCreationParams(Builder builder) {
mRcsFileTransferSessionId = builder.mRcsFileTransferSessionId;
mContentUri = builder.mContentUri;
mContentMimeType = builder.mContentMimeType;
@@ -143,7 +143,7 @@ public class RcsFileTransferCreationParameters implements Parcelable {
}
/**
* A builder to create instances of {@link RcsFileTransferCreationParameters}
* A builder to create instances of {@link RcsFileTransferCreationParams}
*/
public class Builder {
private String mRcsFileTransferSessionId;
@@ -300,18 +300,18 @@ public class RcsFileTransferCreationParameters implements Parcelable {
}
/**
* Creates an instance of {@link RcsFileTransferCreationParameters} with the given
* Creates an instance of {@link RcsFileTransferCreationParams} with the given
* parameters.
*
* @return The same instance of {@link Builder} to chain methods
* @see RcsMessage#insertFileTransfer(RcsFileTransferCreationParameters)
* @see RcsMessage#insertFileTransfer(RcsFileTransferCreationParams)
*/
public RcsFileTransferCreationParameters build() {
return new RcsFileTransferCreationParameters(this);
public RcsFileTransferCreationParams build() {
return new RcsFileTransferCreationParams(this);
}
}
protected RcsFileTransferCreationParameters(Parcel in) {
private RcsFileTransferCreationParams(Parcel in) {
mRcsFileTransferSessionId = in.readString();
mContentUri = in.readParcelable(Uri.class.getClassLoader());
mContentMimeType = in.readString();
@@ -325,16 +325,16 @@ public class RcsFileTransferCreationParameters implements Parcelable {
mFileTransferStatus = in.readInt();
}
public static final Creator<RcsFileTransferCreationParameters> CREATOR =
new Creator<RcsFileTransferCreationParameters>() {
public static final Creator<RcsFileTransferCreationParams> CREATOR =
new Creator<RcsFileTransferCreationParams>() {
@Override
public RcsFileTransferCreationParameters createFromParcel(Parcel in) {
return new RcsFileTransferCreationParameters(in);
public RcsFileTransferCreationParams createFromParcel(Parcel in) {
return new RcsFileTransferCreationParams(in);
}
@Override
public RcsFileTransferCreationParameters[] newArray(int size) {
return new RcsFileTransferCreationParameters[size];
public RcsFileTransferCreationParams[] newArray(int size) {
return new RcsFileTransferCreationParams[size];
}
};

View File

@@ -27,7 +27,7 @@ import java.lang.annotation.RetentionPolicy;
* A part of a composite {@link RcsMessage} that holds a file transfer. Please see Section 7
* (File Transfer) - GSMA RCC.71 (RCS Universal Profile Service Definition Document)
*
* @hide - TODO(109759350) make this public
* @hide - TODO: make public
*/
public class RcsFileTransferPart {
/**

View File

@@ -30,7 +30,7 @@ import java.util.Set;
* or leave. Please see Section 6 (Group Chat) - GSMA RCC.71 (RCS Universal Profile Service
* Definition Document)
*
* @hide - TODO(sahinc) make this public
* @hide - TODO: make public
*/
public class RcsGroupThread extends RcsThread {
/**
@@ -166,8 +166,8 @@ public class RcsGroupThread extends RcsThread {
@WorkerThread
@NonNull
public Set<RcsParticipant> getParticipants() throws RcsMessageStoreException {
RcsParticipantQueryParameters queryParameters =
new RcsParticipantQueryParameters.Builder().setThread(this).build();
RcsParticipantQueryParams queryParameters =
new RcsParticipantQueryParams.Builder().setThread(this).build();
RcsParticipantQueryResult queryResult = RcsControllerCall.call(
iRcs -> iRcs.getParticipants(queryParameters));

View File

@@ -21,7 +21,7 @@ import android.os.Parcel;
/**
* An event that happened on an {@link RcsGroupThread}.
*
* @hide - TODO(109759350) make this public
* @hide - TODO: make public
*/
public abstract class RcsGroupThreadEvent extends RcsEvent {
private final int mRcsGroupThreadId;
@@ -50,13 +50,18 @@ public abstract class RcsGroupThreadEvent extends RcsEvent {
return new RcsParticipant(mOriginatingParticipantId);
}
/**
* @hide
*/
RcsGroupThreadEvent(Parcel in) {
super(in);
mRcsGroupThreadId = in.readInt();
mOriginatingParticipantId = in.readInt();
}
@Override
/**
* @hide
*/
public void writeToParcel(Parcel dest, int flags) {
super.writeToParcel(dest, flags);
dest.writeInt(mRcsGroupThreadId);

View File

@@ -19,14 +19,16 @@ import android.annotation.NonNull;
import android.annotation.Nullable;
import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable;
/**
* An event that indicates an {@link RcsGroupThread}'s icon was changed. Please see R6-2-5 - GSMA
* RCC.71 (RCS Universal Profile Service Definition Document)
*
* @hide - TODO(109759350) make this public
* @hide - TODO: make public
*/
public class RcsGroupThreadIconChangedEvent extends RcsGroupThreadEvent {
public final class RcsGroupThreadIconChangedEvent extends RcsGroupThreadEvent implements
Parcelable {
private final Uri mNewIcon;
/**
@@ -91,7 +93,7 @@ public class RcsGroupThreadIconChangedEvent extends RcsGroupThreadEvent {
}
};
protected RcsGroupThreadIconChangedEvent(Parcel in) {
private RcsGroupThreadIconChangedEvent(Parcel in) {
super(in);
mNewIcon = in.readParcelable(Uri.class.getClassLoader());
}

View File

@@ -18,15 +18,17 @@ package android.telephony.ims;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.os.Parcel;
import android.os.Parcelable;
/**
* An event that indicates an {@link RcsGroupThread}'s name was changed. Please see R6-2-5 - GSMA
* RCC.71 (RCS Universal Profile Service Definition Document)
*
* @hide - TODO(109759350) make this public
* @hide - TODO: make public
*/
public class RcsGroupThreadNameChangedEvent extends RcsGroupThreadEvent {
private String mNewName;
public final class RcsGroupThreadNameChangedEvent extends RcsGroupThreadEvent implements
Parcelable {
private final String mNewName;
/**
* Creates a new {@link RcsGroupThreadNameChangedEvent}. This event is not persisted into
@@ -89,7 +91,7 @@ public class RcsGroupThreadNameChangedEvent extends RcsGroupThreadEvent {
}
};
protected RcsGroupThreadNameChangedEvent(Parcel in) {
private RcsGroupThreadNameChangedEvent(Parcel in) {
super(in);
mNewName = in.readString();
}

View File

@@ -17,15 +17,17 @@ package android.telephony.ims;
import android.annotation.NonNull;
import android.os.Parcel;
import android.os.Parcelable;
/**
* An event that indicates an RCS participant has joined an {@link RcsThread}. Please see US6-3 -
* GSMA RCC.71 (RCS Universal Profile Service Definition Document)
*
* @hide - TODO(109759350) make this public
* @hide - TODO: make public
*/
public class RcsGroupThreadParticipantJoinedEvent extends RcsGroupThreadEvent {
private int mJoinedParticipantId;
public final class RcsGroupThreadParticipantJoinedEvent extends RcsGroupThreadEvent implements
Parcelable {
private final int mJoinedParticipantId;
/**
* Creates a new {@link RcsGroupThreadParticipantJoinedEvent}. This event is not persisted into
@@ -89,7 +91,7 @@ public class RcsGroupThreadParticipantJoinedEvent extends RcsGroupThreadEvent {
}
};
protected RcsGroupThreadParticipantJoinedEvent(Parcel in) {
private RcsGroupThreadParticipantJoinedEvent(Parcel in) {
super(in);
mJoinedParticipantId = in.readInt();
}

View File

@@ -17,15 +17,17 @@ package android.telephony.ims;
import android.annotation.NonNull;
import android.os.Parcel;
import android.os.Parcelable;
/**
* An event that indicates an RCS participant has left an {@link RcsThread}. Please see US6-23 -
* GSMA RCC.71 (RCS Universal Profile Service Definition Document)
*
* @hide - TODO(109759350) make this public
* @hide - TODO: make public
*/
public class RcsGroupThreadParticipantLeftEvent extends RcsGroupThreadEvent {
private int mLeavingParticipantId;
public final class RcsGroupThreadParticipantLeftEvent extends RcsGroupThreadEvent implements
Parcelable {
private final int mLeavingParticipantId;
/**
* Creates a new {@link RcsGroupThreadParticipantLeftEvent}. his event is not persisted into
@@ -88,7 +90,7 @@ public class RcsGroupThreadParticipantLeftEvent extends RcsGroupThreadEvent {
}
};
protected RcsGroupThreadParticipantLeftEvent(Parcel in) {
private RcsGroupThreadParticipantLeftEvent(Parcel in) {
super(in);
mLeavingParticipantId = in.readInt();
}

View File

@@ -20,7 +20,7 @@ import android.annotation.WorkerThread;
/**
* This is a single instance of a message received over RCS.
*
* @hide - TODO(109759350) make this public
* @hide - TODO: make public
*/
public class RcsIncomingMessage extends RcsMessage {
/**

View File

@@ -1,20 +0,0 @@
/*
*
* Copyright 2019, The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.telephony.ims;
parcelable RcsIncomingMessageCreationParameters;

View File

@@ -0,0 +1,20 @@
/*
*
* Copyright 2019, The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.telephony.ims;
parcelable RcsIncomingMessageCreationParams;

View File

@@ -21,13 +21,13 @@ import android.os.Parcel;
import android.os.Parcelable;
/**
* {@link RcsIncomingMessageCreationParameters} is a collection of parameters that should be passed
* into {@link RcsThread#addIncomingMessage(RcsIncomingMessageCreationParameters)} to generate an
* {@link RcsIncomingMessageCreationParams} is a collection of parameters that should be passed
* into {@link RcsThread#addIncomingMessage(RcsIncomingMessageCreationParams)} to generate an
* {@link RcsIncomingMessage} on that {@link RcsThread}
*
* @hide TODO:make public
* @hide - TODO: make public
*/
public class RcsIncomingMessageCreationParameters extends RcsMessageCreationParameters implements
public final class RcsIncomingMessageCreationParams extends RcsMessageCreationParams implements
Parcelable {
// The arrival timestamp for the RcsIncomingMessage to be created
private final long mArrivalTimestamp;
@@ -37,18 +37,18 @@ public class RcsIncomingMessageCreationParameters extends RcsMessageCreationPara
private final int mSenderParticipantId;
/**
* Builder to help create an {@link RcsIncomingMessageCreationParameters}
* Builder to help create an {@link RcsIncomingMessageCreationParams}
*
* @see RcsThread#addIncomingMessage(RcsIncomingMessageCreationParameters)
* @see RcsThread#addIncomingMessage(RcsIncomingMessageCreationParams)
*/
public static class Builder extends RcsMessageCreationParameters.Builder {
public static class Builder extends RcsMessageCreationParams.Builder {
private RcsParticipant mSenderParticipant;
private long mArrivalTimestamp;
private long mSeenTimestamp;
/**
* Creates a {@link Builder} to create an instance of
* {@link RcsIncomingMessageCreationParameters}
* {@link RcsIncomingMessageCreationParams}
*
* @param originationTimestamp The timestamp of {@link RcsMessage} creation. The origination
* timestamp value in milliseconds passed after midnight,
@@ -103,22 +103,22 @@ public class RcsIncomingMessageCreationParameters extends RcsMessageCreationPara
/**
* Creates parameters for creating a new incoming message.
* @return A new instance of {@link RcsIncomingMessageCreationParameters} to create a new
* @return A new instance of {@link RcsIncomingMessageCreationParams} to create a new
* {@link RcsIncomingMessage}
*/
public RcsIncomingMessageCreationParameters build() {
return new RcsIncomingMessageCreationParameters(this);
public RcsIncomingMessageCreationParams build() {
return new RcsIncomingMessageCreationParams(this);
}
}
private RcsIncomingMessageCreationParameters(Builder builder) {
private RcsIncomingMessageCreationParams(Builder builder) {
super(builder);
mArrivalTimestamp = builder.mArrivalTimestamp;
mSeenTimestamp = builder.mSeenTimestamp;
mSenderParticipantId = builder.mSenderParticipant.getId();
}
protected RcsIncomingMessageCreationParameters(Parcel in) {
private RcsIncomingMessageCreationParams(Parcel in) {
super(in);
mArrivalTimestamp = in.readLong();
mSeenTimestamp = in.readLong();
@@ -152,16 +152,16 @@ public class RcsIncomingMessageCreationParameters extends RcsMessageCreationPara
return mSenderParticipantId;
}
public static final Creator<RcsIncomingMessageCreationParameters> CREATOR =
new Creator<RcsIncomingMessageCreationParameters>() {
public static final Creator<RcsIncomingMessageCreationParams> CREATOR =
new Creator<RcsIncomingMessageCreationParams>() {
@Override
public RcsIncomingMessageCreationParameters createFromParcel(Parcel in) {
return new RcsIncomingMessageCreationParameters(in);
public RcsIncomingMessageCreationParams createFromParcel(Parcel in) {
return new RcsIncomingMessageCreationParams(in);
}
@Override
public RcsIncomingMessageCreationParameters[] newArray(int size) {
return new RcsIncomingMessageCreationParameters[size];
public RcsIncomingMessageCreationParams[] newArray(int size) {
return new RcsIncomingMessageCreationParams[size];
}
};
@@ -172,7 +172,7 @@ public class RcsIncomingMessageCreationParameters extends RcsMessageCreationPara
@Override
public void writeToParcel(Parcel dest, int flags) {
super.writeToParcel(dest, flags);
super.writeToParcel(dest);
dest.writeLong(mArrivalTimestamp);
dest.writeLong(mSeenTimestamp);
dest.writeInt(mSenderParticipantId);

View File

@@ -20,11 +20,19 @@ import android.content.Context;
/**
* The manager class for RCS related utilities.
* @hide
*
* @hide - TODO: make public
*/
@SystemService(Context.TELEPHONY_RCS_SERVICE)
public class RcsManager {
/**
* @hide
*/
public RcsManager() {
// empty constructor
}
private static final RcsMessageStore sRcsMessageStoreInstance = new RcsMessageStore();
/**

View File

@@ -28,7 +28,7 @@ import java.util.Set;
/**
* This is a single instance of a message sent or received over RCS.
*
* @hide - TODO(109759350) make this public
* @hide - TODO: make public
*/
public abstract class RcsMessage {
/**
@@ -83,7 +83,10 @@ public abstract class RcsMessage {
*/
public static final int SEEN = 9;
protected int mId;
/**
* @hide
*/
protected final int mId;
@IntDef({
DRAFT, QUEUED, SENDING, SENT, RETRYING, FAILED, RECEIVED, SEEN
@@ -277,7 +280,7 @@ public abstract class RcsMessage {
@NonNull
@WorkerThread
public RcsFileTransferPart insertFileTransfer(
RcsFileTransferCreationParameters fileTransferCreationParameters)
RcsFileTransferCreationParams fileTransferCreationParameters)
throws RcsMessageStoreException {
return new RcsFileTransferPart(RcsControllerCall.call(
iRcs -> iRcs.storeFileTransfer(mId, isIncoming(), fileTransferCreationParameters)));

View File

@@ -21,18 +21,16 @@ import static android.telephony.ims.RcsMessage.LOCATION_NOT_SET;
import android.annotation.CheckResult;
import android.annotation.Nullable;
import android.os.Parcel;
import android.os.Parcelable;
import android.telephony.SubscriptionInfo;
/**
* The collection of parameters to be passed into
* {@link RcsThread#addIncomingMessage(RcsIncomingMessageCreationParameters)} and
* {@link RcsThread#addOutgoingMessage(RcsMessageCreationParameters)} to create and persist
* {@link RcsThread#addIncomingMessage(RcsIncomingMessageCreationParams)} and
* {@link RcsThread#addOutgoingMessage(RcsOutgoingMessageCreationParams)} to create and persist
* {@link RcsMessage}s on an {@link RcsThread}
*
* @hide TODO - make public
* @hide - TODO: make public
*/
public class RcsMessageCreationParameters implements Parcelable {
public class RcsMessageCreationParams {
// The globally unique id of the RcsMessage to be created.
private final String mRcsMessageGlobalId;
@@ -110,7 +108,7 @@ public class RcsMessageCreationParameters implements Parcelable {
/**
* The base builder for creating {@link RcsMessage}s on {@link RcsThread}s.
*
* @see RcsIncomingMessageCreationParameters
* @see RcsIncomingMessageCreationParams
*/
public static class Builder {
private String mRcsMessageGlobalId;
@@ -122,15 +120,7 @@ public class RcsMessageCreationParameters implements Parcelable {
private double mLongitude = LOCATION_NOT_SET;
/**
* Creates a new {@link Builder} to create an instance of
* {@link RcsMessageCreationParameters}.
*
* @param originationTimestamp The timestamp of {@link RcsMessage} creation. The origination
* timestamp value in milliseconds passed after midnight,
* January 1, 1970 UTC
* @param subscriptionId The subscription ID that was used to send or receive this
* {@link RcsMessage}
* @see SubscriptionInfo#getSubscriptionId()
* @hide
*/
public Builder(long originationTimestamp, int subscriptionId) {
mOriginationTimestamp = originationTimestamp;
@@ -207,14 +197,14 @@ public class RcsMessageCreationParameters implements Parcelable {
}
/**
* @hide
* @return Builds and returns a newly created {@link RcsMessageCreationParams}
*/
public RcsMessageCreationParameters build() {
return new RcsMessageCreationParameters(this);
public RcsMessageCreationParams build() {
return new RcsMessageCreationParams(this);
}
}
protected RcsMessageCreationParameters(Builder builder) {
protected RcsMessageCreationParams(Builder builder) {
mRcsMessageGlobalId = builder.mRcsMessageGlobalId;
mSubId = builder.mSubId;
mMessageStatus = builder.mMessageStatus;
@@ -224,7 +214,10 @@ public class RcsMessageCreationParameters implements Parcelable {
mLongitude = builder.mLongitude;
}
protected RcsMessageCreationParameters(Parcel in) {
/**
* @hide
*/
RcsMessageCreationParams(Parcel in) {
mRcsMessageGlobalId = in.readString();
mSubId = in.readInt();
mMessageStatus = in.readInt();
@@ -234,26 +227,10 @@ public class RcsMessageCreationParameters implements Parcelable {
mLongitude = in.readDouble();
}
public static final Creator<RcsMessageCreationParameters> CREATOR =
new Creator<RcsMessageCreationParameters>() {
@Override
public RcsMessageCreationParameters createFromParcel(Parcel in) {
return new RcsMessageCreationParameters(in);
}
@Override
public RcsMessageCreationParameters[] newArray(int size) {
return new RcsMessageCreationParameters[size];
}
};
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
/**
* @hide
*/
public void writeToParcel(Parcel dest) {
dest.writeString(mRcsMessageGlobalId);
dest.writeInt(mSubId);
dest.writeInt(mMessageStatus);

View File

@@ -17,4 +17,4 @@
package android.telephony.ims;
parcelable RcsThreadQueryParameters;
parcelable RcsMessageQueryParams;

View File

@@ -29,12 +29,12 @@ import java.security.InvalidParameterException;
/**
* The parameters to pass into
* {@link RcsMessageStore#getRcsMessages(RcsMessageQueryParameters)} in order to select a
* {@link RcsMessageStore#getRcsMessages(RcsMessageQueryParams)} in order to select a
* subset of {@link RcsMessage}s present in the message store.
*
* @hide TODO - make the Builder and builder() public. The rest should stay internal only.
* @hide - TODO: make public
*/
public class RcsMessageQueryParameters implements Parcelable {
public final class RcsMessageQueryParams implements Parcelable {
/**
* @hide - not meant for public use
*/
@@ -60,28 +60,28 @@ public class RcsMessageQueryParameters implements Parcelable {
/**
* Bitmask flag to be used with {@link Builder#setMessageType(int)} to make
* {@link RcsMessageStore#getRcsMessages(RcsMessageQueryParameters)} return
* {@link RcsMessageStore#getRcsMessages(RcsMessageQueryParams)} return
* {@link RcsIncomingMessage}s.
*/
public static final int MESSAGE_TYPE_INCOMING = 0x0001;
/**
* Bitmask flag to be used with {@link Builder#setMessageType(int)} to make
* {@link RcsMessageStore#getRcsMessages(RcsMessageQueryParameters)} return
* {@link RcsMessageStore#getRcsMessages(RcsMessageQueryParams)} return
* {@link RcsOutgoingMessage}s.
*/
public static final int MESSAGE_TYPE_OUTGOING = 0x0002;
/**
* Bitmask flag to be used with {@link Builder#setFileTransferPresence(int)} to make
* {@link RcsMessageStore#getRcsMessages(RcsMessageQueryParameters)} return {@link RcsMessage}s
* {@link RcsMessageStore#getRcsMessages(RcsMessageQueryParams)} return {@link RcsMessage}s
* that have an {@link RcsFileTransferPart} attached.
*/
public static final int MESSAGES_WITH_FILE_TRANSFERS = 0x0004;
/**
* Bitmask flag to be used with {@link Builder#setFileTransferPresence(int)} to make
* {@link RcsMessageStore#getRcsMessages(RcsMessageQueryParameters)} return {@link RcsMessage}s
* {@link RcsMessageStore#getRcsMessages(RcsMessageQueryParams)} return {@link RcsMessage}s
* that don't have an {@link RcsFileTransferPart} attached.
*/
public static final int MESSAGES_WITHOUT_FILE_TRANSFERS = 0x0008;
@@ -106,7 +106,7 @@ public class RcsMessageQueryParameters implements Parcelable {
// The thread that the results should be limited to
private int mThreadId;
RcsMessageQueryParameters(int messageType, int fileTransferPresence, String messageLike,
RcsMessageQueryParams(int messageType, int fileTransferPresence, String messageLike,
int threadId, @SortingProperty int sortingProperty, boolean isAscending, int limit) {
mMessageType = messageType;
mFileTransferPresence = fileTransferPresence;
@@ -118,7 +118,7 @@ public class RcsMessageQueryParameters implements Parcelable {
}
/**
* @return Returns the type of {@link RcsMessage}s that this {@link RcsMessageQueryParameters}
* @return Returns the type of {@link RcsMessage}s that this {@link RcsMessageQueryParams}
* is set to query for.
*/
public int getMessageType() {
@@ -177,7 +177,7 @@ public class RcsMessageQueryParameters implements Parcelable {
}
/**
* A helper class to build the {@link RcsMessageQueryParameters}.
* A helper class to build the {@link RcsMessageQueryParams}.
*/
public static class Builder {
private @SortingProperty int mSortingProperty;
@@ -189,8 +189,8 @@ public class RcsMessageQueryParameters implements Parcelable {
private int mThreadId = THREAD_ID_NOT_SET;
/**
* Creates a new builder for {@link RcsMessageQueryParameters} to be used in
* {@link RcsMessageStore#getRcsMessages(RcsMessageQueryParameters)}
* Creates a new builder for {@link RcsMessageQueryParams} to be used in
* {@link RcsMessageStore#getRcsMessages(RcsMessageQueryParams)}
*
*/
public Builder() {
@@ -221,8 +221,8 @@ public class RcsMessageQueryParameters implements Parcelable {
*
* @param messageType The type of message to be returned.
* @return The same instance of the builder to chain parameters.
* @see RcsMessageQueryParameters#MESSAGE_TYPE_INCOMING
* @see RcsMessageQueryParameters#MESSAGE_TYPE_OUTGOING
* @see RcsMessageQueryParams#MESSAGE_TYPE_INCOMING
* @see RcsMessageQueryParams#MESSAGE_TYPE_OUTGOING
*/
@CheckResult
public Builder setMessageType(int messageType) {
@@ -235,8 +235,8 @@ public class RcsMessageQueryParameters implements Parcelable {
*
* @param fileTransferPresence Whether file transfers should be included in the result
* @return The same instance of the builder to chain parameters.
* @see RcsMessageQueryParameters#MESSAGES_WITH_FILE_TRANSFERS
* @see RcsMessageQueryParameters#MESSAGES_WITHOUT_FILE_TRANSFERS
* @see RcsMessageQueryParams#MESSAGES_WITH_FILE_TRANSFERS
* @see RcsMessageQueryParams#MESSAGES_WITHOUT_FILE_TRANSFERS
*/
@CheckResult
public Builder setFileTransferPresence(int fileTransferPresence) {
@@ -264,7 +264,7 @@ public class RcsMessageQueryParameters implements Parcelable {
/**
* Sets the property where the results should be sorted against. Defaults to
* {@link RcsMessageQueryParameters.SortingProperty#SORT_BY_CREATION_ORDER}
* {@link RcsMessageQueryParams.SortingProperty#SORT_BY_CREATION_ORDER}
*
* @param sortingProperty against which property the results should be sorted
* @return The same instance of the builder to chain parameters.
@@ -305,14 +305,14 @@ public class RcsMessageQueryParameters implements Parcelable {
}
/**
* Builds the {@link RcsMessageQueryParameters} to use in
* {@link RcsMessageStore#getRcsMessages(RcsMessageQueryParameters)}
* Builds the {@link RcsMessageQueryParams} to use in
* {@link RcsMessageStore#getRcsMessages(RcsMessageQueryParams)}
*
* @return An instance of {@link RcsMessageQueryParameters} to use with the message
* @return An instance of {@link RcsMessageQueryParams} to use with the message
* query.
*/
public RcsMessageQueryParameters build() {
return new RcsMessageQueryParameters(mMessageType, mFileTransferPresence, mMessageLike,
public RcsMessageQueryParams build() {
return new RcsMessageQueryParams(mMessageType, mFileTransferPresence, mMessageLike,
mThreadId, mSortingProperty, mIsAscending, mLimit);
}
}
@@ -320,7 +320,7 @@ public class RcsMessageQueryParameters implements Parcelable {
/**
* Parcelable boilerplate below.
*/
protected RcsMessageQueryParameters(Parcel in) {
private RcsMessageQueryParams(Parcel in) {
mMessageType = in.readInt();
mFileTransferPresence = in.readInt();
mMessageLike = in.readString();
@@ -330,16 +330,16 @@ public class RcsMessageQueryParameters implements Parcelable {
mThreadId = in.readInt();
}
public static final Creator<RcsMessageQueryParameters> CREATOR =
new Creator<RcsMessageQueryParameters>() {
public static final Creator<RcsMessageQueryParams> CREATOR =
new Creator<RcsMessageQueryParams>() {
@Override
public RcsMessageQueryParameters createFromParcel(Parcel in) {
return new RcsMessageQueryParameters(in);
public RcsMessageQueryParams createFromParcel(Parcel in) {
return new RcsMessageQueryParams(in);
}
@Override
public RcsMessageQueryParameters[] newArray(int size) {
return new RcsMessageQueryParameters[size];
public RcsMessageQueryParams[] newArray(int size) {
return new RcsMessageQueryParams[size];
}
};

View File

@@ -29,13 +29,13 @@ import java.util.ArrayList;
import java.util.List;
/**
* The result of a {@link RcsMessageStore#getRcsMessages(RcsMessageQueryParameters)}
* The result of a {@link RcsMessageStore#getRcsMessages(RcsMessageQueryParams)}
* call. This class allows getting the token for querying the next batch of messages in order to
* prevent handling large amounts of data at once.
*
* @hide
* @hide - TODO: make public
*/
public class RcsMessageQueryResult implements Parcelable {
public final class RcsMessageQueryResult implements Parcelable {
// The token to continue the query to get the next batch of results
private RcsQueryContinuationToken mContinuationToken;
// The message type and message ID pairs for all the messages in this query result
@@ -83,7 +83,7 @@ public class RcsMessageQueryResult implements Parcelable {
return messages;
}
protected RcsMessageQueryResult(Parcel in) {
private RcsMessageQueryResult(Parcel in) {
mContinuationToken = in.readParcelable(
RcsQueryContinuationToken.class.getClassLoader());
in.readTypedList(mMessageTypeIdPairs, RcsTypeIdPair.CREATOR);

View File

@@ -24,9 +24,9 @@ import android.telephony.ims.RcsMessage.RcsMessageStatus;
/**
* An immutable summary of the latest {@link RcsMessage} on an {@link RcsThread}
*
* @hide TODO: make public
* @hide - TODO: make public
*/
public class RcsMessageSnippet implements Parcelable {
public final class RcsMessageSnippet implements Parcelable {
private final String mText;
private final @RcsMessageStatus int mStatus;
private final long mTimestamp;
@@ -65,7 +65,7 @@ public class RcsMessageSnippet implements Parcelable {
return mTimestamp;
}
protected RcsMessageSnippet(Parcel in) {
private RcsMessageSnippet(Parcel in) {
mText = in.readString();
mStatus = in.readInt();
mTimestamp = in.readLong();

View File

@@ -27,7 +27,7 @@ import java.util.List;
* RcsMessageStore is the application interface to RcsProvider and provides access methods to
* RCS related database tables.
*
* @hide - TODO make this public
* @hide - TODO: make public
*/
public class RcsMessageStore {
/**
@@ -39,7 +39,7 @@ public class RcsMessageStore {
*/
@WorkerThread
@NonNull
public RcsThreadQueryResult getRcsThreads(@Nullable RcsThreadQueryParameters queryParameters)
public RcsThreadQueryResult getRcsThreads(@Nullable RcsThreadQueryParams queryParameters)
throws RcsMessageStoreException {
return RcsControllerCall.call(iRcs -> iRcs.getRcsThreads(queryParameters));
}
@@ -68,7 +68,7 @@ public class RcsMessageStore {
@WorkerThread
@NonNull
public RcsParticipantQueryResult getRcsParticipants(
@Nullable RcsParticipantQueryParameters queryParameters)
@Nullable RcsParticipantQueryParams queryParameters)
throws RcsMessageStoreException {
return RcsControllerCall.call(iRcs -> iRcs.getParticipants(queryParameters));
}
@@ -99,7 +99,7 @@ public class RcsMessageStore {
@WorkerThread
@NonNull
public RcsMessageQueryResult getRcsMessages(
@Nullable RcsMessageQueryParameters queryParameters) throws RcsMessageStoreException {
@Nullable RcsMessageQueryParams queryParameters) throws RcsMessageStoreException {
return RcsControllerCall.call(iRcs -> iRcs.getMessages(queryParameters));
}
@@ -127,7 +127,7 @@ public class RcsMessageStore {
@WorkerThread
@NonNull
public RcsEventQueryResult getRcsEvents(
@Nullable RcsEventQueryParameters queryParameters) throws RcsMessageStoreException {
@Nullable RcsEventQueryParams queryParameters) throws RcsMessageStoreException {
return RcsControllerCall.call(iRcs -> iRcs.getEvents(queryParameters));
}

View File

@@ -20,7 +20,7 @@ package android.telephony.ims;
* An exception that happened on {@link RcsMessageStore} or one of the derived storage classes in
* {@link android.telephony.ims}
*
* @hide TODO: make public
* @hide - TODO: make public
*/
public class RcsMessageStoreException extends Exception {

View File

@@ -24,7 +24,7 @@ import java.util.List;
/**
* This is a single instance of a message sent over RCS.
*
* @hide - TODO(109759350) make this public
* @hide - TODO: make public
*/
public class RcsOutgoingMessage extends RcsMessage {
RcsOutgoingMessage(int id) {

View File

@@ -0,0 +1,20 @@
/*
*
* Copyright 2019, The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.telephony.ims;
parcelable RcsOutgoingMessageCreationParams;

View File

@@ -0,0 +1,89 @@
/*
* Copyright (C) 2019 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.telephony.ims;
import android.os.Parcel;
import android.os.Parcelable;
/**
* {@link RcsOutgoingMessageCreationParams} is a collection of parameters that should be passed
* into {@link RcsThread#addOutgoingMessage(RcsOutgoingMessageCreationParams)} to generate an
* {@link RcsOutgoingMessage} on that {@link RcsThread}
*
* @hide - TODO: make public
*/
public final class RcsOutgoingMessageCreationParams extends RcsMessageCreationParams
implements Parcelable {
/**
* A builder to instantiate and persist an {@link RcsOutgoingMessage}
*/
public static class Builder extends RcsMessageCreationParams.Builder {
/**
* Creates a new {@link Builder} to create an instance of
* {@link RcsOutgoingMessageCreationParams}.
*
* @param originationTimestamp The timestamp of {@link RcsMessage} creation. The origination
* timestamp value in milliseconds passed after midnight,
* January 1, 1970 UTC
* @param subscriptionId The subscription ID that was used to send or receive this
* {@link RcsMessage}
* @see android.telephony.SubscriptionInfo#getSubscriptionId()
*/
public Builder(long originationTimestamp, int subscriptionId) {
super(originationTimestamp, subscriptionId);
}
/**
* Creates configuration parameters for a new message.
*/
public RcsOutgoingMessageCreationParams build() {
return new RcsOutgoingMessageCreationParams(this);
}
}
private RcsOutgoingMessageCreationParams(Builder builder) {
super(builder);
}
private RcsOutgoingMessageCreationParams(Parcel in) {
super(in);
}
public static final Creator<RcsOutgoingMessageCreationParams> CREATOR =
new Creator<RcsOutgoingMessageCreationParams>() {
@Override
public RcsOutgoingMessageCreationParams createFromParcel(Parcel in) {
return new RcsOutgoingMessageCreationParams(in);
}
@Override
public RcsOutgoingMessageCreationParams[] newArray(int size) {
return new RcsOutgoingMessageCreationParams[size];
}
};
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
super.writeToParcel(dest);
}
}

View File

@@ -22,7 +22,7 @@ import android.annotation.WorkerThread;
* This class holds the delivery information of an {@link RcsOutgoingMessage} for each
* {@link RcsParticipant} that the message was intended for.
*
* @hide - TODO(109759350) make this public
* @hide - TODO: make public
*/
public class RcsOutgoingMessageDelivery {
// The participant that this delivery is intended for

View File

@@ -21,7 +21,7 @@ import android.annotation.WorkerThread;
/**
* RcsParticipant is an RCS capable contact that can participate in {@link RcsThread}s.
*
* @hide - TODO(109759350) make this public
* @hide - TODO: make public
*/
public class RcsParticipant {
// The row ID of this participant in the database

View File

@@ -18,18 +18,19 @@ package android.telephony.ims;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.os.Parcel;
import android.os.Parcelable;
/**
* An event that indicates an {@link RcsParticipant}'s alias was changed. Please see US18-2 - GSMA
* RCC.71 (RCS Universal Profile Service Definition Document)
*
* @hide - TODO(109759350) make this public
* @hide - TODO: make public
*/
public class RcsParticipantAliasChangedEvent extends RcsEvent {
public final class RcsParticipantAliasChangedEvent extends RcsEvent implements Parcelable {
// The ID of the participant that changed their alias
private int mParticipantId;
private final int mParticipantId;
// The new alias of the above participant
private String mNewAlias;
private final String mNewAlias;
/**
* Creates a new {@link RcsParticipantAliasChangedEvent}. This event is not persisted into
@@ -98,7 +99,7 @@ public class RcsParticipantAliasChangedEvent extends RcsEvent {
}
};
protected RcsParticipantAliasChangedEvent(Parcel in) {
private RcsParticipantAliasChangedEvent(Parcel in) {
super(in);
mNewAlias = in.readString();
mParticipantId = in.readInt();

View File

@@ -17,4 +17,4 @@
package android.telephony.ims;
parcelable RcsMessageQueryParameters;
parcelable RcsParticipantQueryParams;

View File

@@ -28,12 +28,12 @@ import java.security.InvalidParameterException;
/**
* The parameters to pass into
* {@link RcsMessageStore#getRcsParticipants(RcsParticipantQueryParameters)} in order to select a
* {@link RcsMessageStore#getRcsParticipants(RcsParticipantQueryParams)} in order to select a
* subset of {@link RcsThread}s present in the message store.
*
* @hide TODO - make the Builder and builder() public. The rest should stay internal only.
* @hide - TODO: make public
*/
public class RcsParticipantQueryParameters implements Parcelable {
public final class RcsParticipantQueryParams implements Parcelable {
/**
* Flag to set with {@link Builder#setSortProperty(int)} to sort the results in the order of
* creation time for faster query results
@@ -75,7 +75,7 @@ public class RcsParticipantQueryParameters implements Parcelable {
*/
public static final String PARTICIPANT_QUERY_PARAMETERS_KEY = "participant_query_parameters";
RcsParticipantQueryParameters(int rcsThreadId, String aliasLike, String canonicalAddressLike,
RcsParticipantQueryParams(int rcsThreadId, String aliasLike, String canonicalAddressLike,
@SortingProperty int sortingProperty, boolean isAscending,
int limit) {
mThreadId = rcsThreadId;
@@ -143,7 +143,7 @@ public class RcsParticipantQueryParameters implements Parcelable {
}
/**
* A helper class to build the {@link RcsParticipantQueryParameters}.
* A helper class to build the {@link RcsParticipantQueryParams}.
*/
public static class Builder {
private String mAliasLike;
@@ -154,8 +154,8 @@ public class RcsParticipantQueryParameters implements Parcelable {
private int mThreadId;
/**
* Creates a new builder for {@link RcsParticipantQueryParameters} to be used in
* {@link RcsMessageStore#getRcsParticipants(RcsParticipantQueryParameters)}
* Creates a new builder for {@link RcsParticipantQueryParams} to be used in
* {@link RcsMessageStore#getRcsParticipants(RcsParticipantQueryParams)}
*/
public Builder() {
// empty implementation
@@ -231,7 +231,7 @@ public class RcsParticipantQueryParameters implements Parcelable {
/**
* Sets the property where the results should be sorted against. Defaults to
* {@link RcsParticipantQueryParameters.SortingProperty#SORT_BY_CREATION_ORDER}
* {@link RcsParticipantQueryParams.SortingProperty#SORT_BY_CREATION_ORDER}
*
* @param sortingProperty against which property the results should be sorted
* @return The same instance of the builder to chain parameters.
@@ -255,14 +255,14 @@ public class RcsParticipantQueryParameters implements Parcelable {
}
/**
* Builds the {@link RcsParticipantQueryParameters} to use in
* {@link RcsMessageStore#getRcsParticipants(RcsParticipantQueryParameters)}
* Builds the {@link RcsParticipantQueryParams} to use in
* {@link RcsMessageStore#getRcsParticipants(RcsParticipantQueryParams)}
*
* @return An instance of {@link RcsParticipantQueryParameters} to use with the participant
* @return An instance of {@link RcsParticipantQueryParams} to use with the participant
* query.
*/
public RcsParticipantQueryParameters build() {
return new RcsParticipantQueryParameters(mThreadId, mAliasLike, mCanonicalAddressLike,
public RcsParticipantQueryParams build() {
return new RcsParticipantQueryParams(mThreadId, mAliasLike, mCanonicalAddressLike,
mSortingProperty, mIsAscending, mLimit);
}
}
@@ -270,7 +270,7 @@ public class RcsParticipantQueryParameters implements Parcelable {
/**
* Parcelable boilerplate below.
*/
protected RcsParticipantQueryParameters(Parcel in) {
private RcsParticipantQueryParams(Parcel in) {
mAliasLike = in.readString();
mCanonicalAddressLike = in.readString();
mSortingProperty = in.readInt();
@@ -279,16 +279,16 @@ public class RcsParticipantQueryParameters implements Parcelable {
mThreadId = in.readInt();
}
public static final Creator<RcsParticipantQueryParameters> CREATOR =
new Creator<RcsParticipantQueryParameters>() {
public static final Creator<RcsParticipantQueryParams> CREATOR =
new Creator<RcsParticipantQueryParams>() {
@Override
public RcsParticipantQueryParameters createFromParcel(Parcel in) {
return new RcsParticipantQueryParameters(in);
public RcsParticipantQueryParams createFromParcel(Parcel in) {
return new RcsParticipantQueryParams(in);
}
@Override
public RcsParticipantQueryParameters[] newArray(int size) {
return new RcsParticipantQueryParameters[size];
public RcsParticipantQueryParams[] newArray(int size) {
return new RcsParticipantQueryParams[size];
}
};

View File

@@ -25,13 +25,13 @@ import java.util.ArrayList;
import java.util.List;
/**
* The result of a {@link RcsMessageStore#getRcsParticipants(RcsParticipantQueryParameters)}
* The result of a {@link RcsMessageStore#getRcsParticipants(RcsParticipantQueryParams)}
* call. This class allows getting the token for querying the next batch of participants in order to
* prevent handling large amounts of data at once.
*
* @hide
* @hide - TODO: make public
*/
public class RcsParticipantQueryResult implements Parcelable {
public final class RcsParticipantQueryResult implements Parcelable {
// A token for the caller to continue their query for the next batch of results
private RcsQueryContinuationToken mContinuationToken;
// The list of participant IDs returned with this query
@@ -75,7 +75,7 @@ public class RcsParticipantQueryResult implements Parcelable {
return participantList;
}
protected RcsParticipantQueryResult(Parcel in) {
private RcsParticipantQueryResult(Parcel in) {
mContinuationToken = in.readParcelable(
RcsQueryContinuationToken.class.getClassLoader());
}

View File

@@ -24,11 +24,17 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
/**
* This interface allows using the same implementation for continuation token usage in
* {@link com.android.providers.telephony.RcsProvider}
* @hide - TODO make getQueryType() and types public - the rest should stay internal
* A token for enabling continuation queries. Instances are acquired through
* {@code getContinuationToken} on result objects after initial query is done.
*
* @see RcsEventQueryResult#getContinuationToken()
* @see RcsMessageQueryResult#getContinuationToken()
* @see RcsParticipantQueryResult#getContinuationToken()
* @see RcsThreadQueryResult#getContinuationToken()
*
* @hide - TODO: make public
*/
public class RcsQueryContinuationToken implements Parcelable {
public final class RcsQueryContinuationToken implements Parcelable {
/**
* Denotes that this {@link RcsQueryContinuationToken} token is meant to allow continuing
* {@link RcsEvent} queries
@@ -116,7 +122,7 @@ public class RcsQueryContinuationToken implements Parcelable {
return mQueryType;
}
protected RcsQueryContinuationToken(Parcel in) {
private RcsQueryContinuationToken(Parcel in) {
mQueryType = in.readInt();
mRawQuery = in.readString();
mLimit = in.readInt();

View File

@@ -28,10 +28,13 @@ import com.android.internal.annotations.VisibleForTesting;
* RcsThread represents a single RCS conversation thread. It holds messages that were sent and
* received and events that occurred on that thread.
*
* @hide - TODO(109759350) make this public
* @hide - TODO: make public
*/
public abstract class RcsThread {
// The rcs_participant_thread_id that represents this thread in the database
/**
* The rcs_participant_thread_id that represents this thread in the database
* @hide
*/
protected int mThreadId;
/**
@@ -59,10 +62,10 @@ public abstract class RcsThread {
@WorkerThread
@NonNull
public RcsIncomingMessage addIncomingMessage(
@NonNull RcsIncomingMessageCreationParameters rcsIncomingMessageCreationParameters)
@NonNull RcsIncomingMessageCreationParams rcsIncomingMessageCreationParams)
throws RcsMessageStoreException {
return new RcsIncomingMessage(RcsControllerCall.call(iRcs -> iRcs.addIncomingMessage(
mThreadId, rcsIncomingMessageCreationParameters)));
mThreadId, rcsIncomingMessageCreationParams)));
}
/**
@@ -73,10 +76,10 @@ public abstract class RcsThread {
@WorkerThread
@NonNull
public RcsOutgoingMessage addOutgoingMessage(
@NonNull RcsMessageCreationParameters rcsMessageCreationParameters)
@NonNull RcsOutgoingMessageCreationParams rcsOutgoingMessageCreationParams)
throws RcsMessageStoreException {
int messageId = RcsControllerCall.call(iRcs -> iRcs.addOutgoingMessage(
mThreadId, rcsMessageCreationParameters));
mThreadId, rcsOutgoingMessageCreationParams));
return new RcsOutgoingMessage(messageId);
}
@@ -97,7 +100,7 @@ public abstract class RcsThread {
/**
* Convenience function for loading all the {@link RcsMessage}s in this {@link RcsThread}. For
* a more detailed and paginated query, please use
* {@link RcsMessageStore#getRcsMessages(RcsMessageQueryParameters)}
* {@link RcsMessageStore#getRcsMessages(RcsMessageQueryParams)}
*
* @return Loads the {@link RcsMessage}s in this thread and returns them in an immutable list.
* @throws RcsMessageStoreException if the messages could not be read from the storage
@@ -105,8 +108,8 @@ public abstract class RcsThread {
@WorkerThread
@NonNull
public RcsMessageQueryResult getMessages() throws RcsMessageStoreException {
RcsMessageQueryParameters queryParameters =
new RcsMessageQueryParameters.Builder().setThread(this).build();
RcsMessageQueryParams queryParameters =
new RcsMessageQueryParams.Builder().setThread(this).build();
return RcsControllerCall.call(iRcs -> iRcs.getMessages(queryParameters));
}

View File

@@ -17,4 +17,4 @@
package android.telephony.ims;
parcelable RcsMessageCreationParameters;
parcelable RcsThreadQueryParams;

View File

@@ -33,22 +33,22 @@ import java.util.List;
import java.util.Set;
/**
* The parameters to pass into {@link RcsMessageStore#getRcsThreads(RcsThreadQueryParameters)} in
* The parameters to pass into {@link RcsMessageStore#getRcsThreads(RcsThreadQueryParams)} in
* order to select a subset of {@link RcsThread}s present in the message store.
*
* @hide TODO - make the Builder and builder() public. The rest should stay internal only.
* @hide - TODO: make public
*/
public class RcsThreadQueryParameters implements Parcelable {
public final class RcsThreadQueryParams implements Parcelable {
/**
* Bitmask flag to be used with {@link Builder#setThreadType(int)} to make
* {@link RcsMessageStore#getRcsThreads(RcsThreadQueryParameters)} return
* {@link RcsMessageStore#getRcsThreads(RcsThreadQueryParams)} return
* {@link RcsGroupThread}s.
*/
public static final int THREAD_TYPE_GROUP = 0x0001;
/**
* Bitmask flag to be used with {@link Builder#setThreadType(int)} to make
* {@link RcsMessageStore#getRcsThreads(RcsThreadQueryParameters)} return
* {@link RcsMessageStore#getRcsThreads(RcsThreadQueryParams)} return
* {@link Rcs1To1Thread}s.
*/
public static final int THREAD_TYPE_1_TO_1 = 0x0002;
@@ -86,7 +86,7 @@ public class RcsThreadQueryParameters implements Parcelable {
*/
public static final String THREAD_QUERY_PARAMETERS_KEY = "thread_query_parameters";
RcsThreadQueryParameters(int threadType, Set<RcsParticipant> participants,
RcsThreadQueryParams(int threadType, Set<RcsParticipant> participants,
int limit, int sortingProperty, boolean isAscending) {
mThreadType = threadType;
mRcsParticipantIds = convertParticipantSetToIdList(participants);
@@ -148,7 +148,7 @@ public class RcsThreadQueryParameters implements Parcelable {
}
/**
* A helper class to build the {@link RcsThreadQueryParameters}.
* A helper class to build the {@link RcsThreadQueryParams}.
*/
public static class Builder {
private int mThreadType;
@@ -158,8 +158,8 @@ public class RcsThreadQueryParameters implements Parcelable {
private boolean mIsAscending;
/**
* Constructs a {@link RcsThreadQueryParameters.Builder} to help build an
* {@link RcsThreadQueryParameters}
* Constructs a {@link RcsThreadQueryParams.Builder} to help build an
* {@link RcsThreadQueryParams}
*/
public Builder() {
mParticipants = new HashSet<>();
@@ -170,8 +170,8 @@ public class RcsThreadQueryParameters implements Parcelable {
*
* @param threadType Whether to limit the query result to group threads.
* @return The same instance of the builder to chain parameters.
* @see RcsThreadQueryParameters#THREAD_TYPE_GROUP
* @see RcsThreadQueryParameters#THREAD_TYPE_1_TO_1
* @see RcsThreadQueryParams#THREAD_TYPE_GROUP
* @see RcsThreadQueryParams#THREAD_TYPE_1_TO_1
*/
@CheckResult
public Builder setThreadType(int threadType) {
@@ -253,13 +253,13 @@ public class RcsThreadQueryParameters implements Parcelable {
}
/**
* Builds the {@link RcsThreadQueryParameters} to use in
* {@link RcsMessageStore#getRcsThreads(RcsThreadQueryParameters)}
* Builds the {@link RcsThreadQueryParams} to use in
* {@link RcsMessageStore#getRcsThreads(RcsThreadQueryParams)}
*
* @return An instance of {@link RcsThreadQueryParameters} to use with the thread query.
* @return An instance of {@link RcsThreadQueryParams} to use with the thread query.
*/
public RcsThreadQueryParameters build() {
return new RcsThreadQueryParameters(mThreadType, mParticipants, mLimit,
public RcsThreadQueryParams build() {
return new RcsThreadQueryParams(mThreadType, mParticipants, mLimit,
mSortingProperty, mIsAscending);
}
}
@@ -267,7 +267,7 @@ public class RcsThreadQueryParameters implements Parcelable {
/**
* Parcelable boilerplate below.
*/
protected RcsThreadQueryParameters(Parcel in) {
private RcsThreadQueryParams(Parcel in) {
mThreadType = in.readInt();
mRcsParticipantIds = new ArrayList<>();
in.readList(mRcsParticipantIds, Integer.class.getClassLoader());
@@ -276,16 +276,16 @@ public class RcsThreadQueryParameters implements Parcelable {
mIsAscending = in.readByte() == 1;
}
public static final Creator<RcsThreadQueryParameters> CREATOR =
new Creator<RcsThreadQueryParameters>() {
public static final Creator<RcsThreadQueryParams> CREATOR =
new Creator<RcsThreadQueryParams>() {
@Override
public RcsThreadQueryParameters createFromParcel(Parcel in) {
return new RcsThreadQueryParameters(in);
public RcsThreadQueryParams createFromParcel(Parcel in) {
return new RcsThreadQueryParams(in);
}
@Override
public RcsThreadQueryParameters[] newArray(int size) {
return new RcsThreadQueryParameters[size];
public RcsThreadQueryParams[] newArray(int size) {
return new RcsThreadQueryParams[size];
}
};

View File

@@ -29,13 +29,13 @@ import java.util.ArrayList;
import java.util.List;
/**
* The result of a {@link RcsMessageStore#getRcsThreads(RcsThreadQueryParameters)}
* The result of a {@link RcsMessageStore#getRcsThreads(RcsThreadQueryParams)}
* call. This class allows getting the token for querying the next batch of threads in order to
* prevent handling large amounts of data at once.
*
* @hide
* @hide - TODO: make public
*/
public class RcsThreadQueryResult implements Parcelable {
public final class RcsThreadQueryResult implements Parcelable {
// A token for the caller to continue their query for the next batch of results
private RcsQueryContinuationToken mContinuationToken;
// The list of thread IDs returned with this query
@@ -84,7 +84,7 @@ public class RcsThreadQueryResult implements Parcelable {
return rcsThreads;
}
protected RcsThreadQueryResult(Parcel in) {
private RcsThreadQueryResult(Parcel in) {
mContinuationToken = in.readParcelable(
RcsQueryContinuationToken.class.getClassLoader());
mRcsThreadIds = new ArrayList<>();

View File

@@ -17,18 +17,18 @@
package android.telephony.ims.aidl;
import android.net.Uri;
import android.telephony.ims.RcsEventQueryParameters;
import android.telephony.ims.RcsEventQueryParams;
import android.telephony.ims.RcsEventQueryResult;
import android.telephony.ims.RcsFileTransferCreationParameters;
import android.telephony.ims.RcsIncomingMessageCreationParameters;
import android.telephony.ims.RcsMessageCreationParameters;
import android.telephony.ims.RcsFileTransferCreationParams;
import android.telephony.ims.RcsIncomingMessageCreationParams;
import android.telephony.ims.RcsMessageSnippet;
import android.telephony.ims.RcsMessageQueryParameters;
import android.telephony.ims.RcsMessageQueryParams;
import android.telephony.ims.RcsMessageQueryResult;
import android.telephony.ims.RcsParticipantQueryParameters;
import android.telephony.ims.RcsOutgoingMessageCreationParams;
import android.telephony.ims.RcsParticipantQueryParams;
import android.telephony.ims.RcsParticipantQueryResult;
import android.telephony.ims.RcsQueryContinuationToken;
import android.telephony.ims.RcsThreadQueryParameters;
import android.telephony.ims.RcsThreadQueryParams;
import android.telephony.ims.RcsThreadQueryResult;
/**
@@ -39,22 +39,22 @@ interface IRcs {
/////////////////////////
// RcsMessageStore APIs
/////////////////////////
RcsThreadQueryResult getRcsThreads(in RcsThreadQueryParameters queryParameters);
RcsThreadQueryResult getRcsThreads(in RcsThreadQueryParams queryParams);
RcsThreadQueryResult getRcsThreadsWithToken(
in RcsQueryContinuationToken continuationToken);
RcsParticipantQueryResult getParticipants(in RcsParticipantQueryParameters queryParameters);
RcsParticipantQueryResult getParticipants(in RcsParticipantQueryParams queryParams);
RcsParticipantQueryResult getParticipantsWithToken(
in RcsQueryContinuationToken continuationToken);
RcsMessageQueryResult getMessages(in RcsMessageQueryParameters queryParameters);
RcsMessageQueryResult getMessages(in RcsMessageQueryParams queryParams);
RcsMessageQueryResult getMessagesWithToken(
in RcsQueryContinuationToken continuationToken);
RcsEventQueryResult getEvents(in RcsEventQueryParameters queryParameters);
RcsEventQueryResult getEvents(in RcsEventQueryParams queryParams);
RcsEventQueryResult getEventsWithToken(
in RcsQueryContinuationToken continuationToken);
@@ -74,11 +74,11 @@ interface IRcs {
// Creates a new RcsIncomingMessage on the given thread and returns its row ID
int addIncomingMessage(int rcsThreadId,
in RcsIncomingMessageCreationParameters rcsIncomingMessageCreationParameters);
in RcsIncomingMessageCreationParams rcsIncomingMessageCreationParams);
// Creates a new RcsOutgoingMessage on the given thread and returns its row ID
int addOutgoingMessage(int rcsThreadId,
in RcsMessageCreationParameters rcsMessageCreationParameters);
in RcsOutgoingMessageCreationParams rcsOutgoingMessageCreationParams);
// TODO: modify RcsProvider URI's to allow deleting a message without specifying its thread
void deleteMessage(int rcsMessageId, boolean isIncoming, int rcsThreadId, boolean isGroup);
@@ -203,7 +203,7 @@ interface IRcs {
// Performs the initial write to storage and returns the row ID.
int storeFileTransfer(int messageId, boolean isIncoming,
in RcsFileTransferCreationParameters fileTransferCreationParameters);
in RcsFileTransferCreationParams fileTransferCreationParams);
void deleteFileTransfer(int partId);

View File

@@ -19,39 +19,39 @@ import static com.google.common.truth.Truth.assertThat;
import android.os.Parcel;
import android.support.test.runner.AndroidJUnit4;
import android.telephony.ims.RcsParticipantQueryParameters;
import android.telephony.ims.RcsParticipantQueryParams;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(AndroidJUnit4.class)
public class RcsParticipantQueryParametersTest {
public class RcsParticipantQueryParamsTest {
@Test
public void testCanUnparcel() {
RcsParticipantQueryParameters rcsParticipantQueryParameters =
new RcsParticipantQueryParameters.Builder()
RcsParticipantQueryParams rcsParticipantQueryParams =
new RcsParticipantQueryParams.Builder()
.setAliasLike("%alias_")
.setCanonicalAddressLike("_canonical%")
.setSortProperty(RcsParticipantQueryParameters.SORT_BY_CANONICAL_ADDRESS)
.setSortProperty(RcsParticipantQueryParams.SORT_BY_CANONICAL_ADDRESS)
.setSortDirection(true)
.setResultLimit(432)
.build();
Parcel parcel = Parcel.obtain();
rcsParticipantQueryParameters.writeToParcel(parcel,
rcsParticipantQueryParameters.describeContents());
rcsParticipantQueryParams.writeToParcel(parcel,
rcsParticipantQueryParams.describeContents());
parcel.setDataPosition(0);
rcsParticipantQueryParameters = RcsParticipantQueryParameters.CREATOR.createFromParcel(
rcsParticipantQueryParams = RcsParticipantQueryParams.CREATOR.createFromParcel(
parcel);
assertThat(rcsParticipantQueryParameters.getAliasLike()).isEqualTo("%alias_");
assertThat(rcsParticipantQueryParameters.getCanonicalAddressLike()).contains("_canonical%");
assertThat(rcsParticipantQueryParameters.getLimit()).isEqualTo(432);
assertThat(rcsParticipantQueryParameters.getSortingProperty()).isEqualTo(
RcsParticipantQueryParameters.SORT_BY_CANONICAL_ADDRESS);
assertThat(rcsParticipantQueryParameters.getSortDirection()).isTrue();
assertThat(rcsParticipantQueryParams.getAliasLike()).isEqualTo("%alias_");
assertThat(rcsParticipantQueryParams.getCanonicalAddressLike()).contains("_canonical%");
assertThat(rcsParticipantQueryParams.getLimit()).isEqualTo(432);
assertThat(rcsParticipantQueryParams.getSortingProperty()).isEqualTo(
RcsParticipantQueryParams.SORT_BY_CANONICAL_ADDRESS);
assertThat(rcsParticipantQueryParams.getSortDirection()).isTrue();
}
}

View File

@@ -15,26 +15,26 @@
*/
package com.android.tests.ims;
import static android.telephony.ims.RcsThreadQueryParameters.SORT_BY_TIMESTAMP;
import static android.telephony.ims.RcsThreadQueryParameters.THREAD_TYPE_GROUP;
import static android.telephony.ims.RcsThreadQueryParams.SORT_BY_TIMESTAMP;
import static android.telephony.ims.RcsThreadQueryParams.THREAD_TYPE_GROUP;
import static com.google.common.truth.Truth.assertThat;
import android.os.Parcel;
import android.support.test.runner.AndroidJUnit4;
import android.telephony.ims.RcsParticipant;
import android.telephony.ims.RcsThreadQueryParameters;
import android.telephony.ims.RcsThreadQueryParams;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(AndroidJUnit4.class)
public class RcsThreadQueryParametersTest {
public class RcsThreadQueryParamsTest {
@Test
public void testCanUnparcel() {
RcsParticipant rcsParticipant = new RcsParticipant(1);
RcsThreadQueryParameters rcsThreadQueryParameters = new RcsThreadQueryParameters.Builder()
RcsThreadQueryParams rcsThreadQueryParams = new RcsThreadQueryParams.Builder()
.setThreadType(THREAD_TYPE_GROUP)
.setParticipant(rcsParticipant)
.setResultLimit(50)
@@ -43,16 +43,16 @@ public class RcsThreadQueryParametersTest {
.build();
Parcel parcel = Parcel.obtain();
rcsThreadQueryParameters.writeToParcel(parcel, rcsThreadQueryParameters.describeContents());
rcsThreadQueryParams.writeToParcel(parcel, rcsThreadQueryParams.describeContents());
parcel.setDataPosition(0);
rcsThreadQueryParameters = RcsThreadQueryParameters.CREATOR.createFromParcel(parcel);
rcsThreadQueryParams = RcsThreadQueryParams.CREATOR.createFromParcel(parcel);
assertThat(rcsThreadQueryParameters.getThreadType()).isEqualTo(THREAD_TYPE_GROUP);
assertThat(rcsThreadQueryParameters.getRcsParticipantsIds())
assertThat(rcsThreadQueryParams.getThreadType()).isEqualTo(THREAD_TYPE_GROUP);
assertThat(rcsThreadQueryParams.getRcsParticipantsIds())
.contains(rcsParticipant.getId());
assertThat(rcsThreadQueryParameters.getLimit()).isEqualTo(50);
assertThat(rcsThreadQueryParameters.getSortingProperty()).isEqualTo(SORT_BY_TIMESTAMP);
assertThat(rcsThreadQueryParameters.getSortDirection()).isTrue();
assertThat(rcsThreadQueryParams.getLimit()).isEqualTo(50);
assertThat(rcsThreadQueryParams.getSortingProperty()).isEqualTo(SORT_BY_TIMESTAMP);
assertThat(rcsThreadQueryParams.getSortDirection()).isTrue();
}
}