Merge "Skeleton implementation of RCS APIs" am: 94d92dc3cf am: ac974d0b0d

am: 2f1e9b45a8

Change-Id: I29a5e5e7921e69e8f7625bab57f31dca9f3b9030
This commit is contained in:
Sahin Caliskan
2019-01-03 16:56:14 -08:00
committed by android-build-merger
41 changed files with 1169 additions and 52 deletions

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 Rcs1To1Thread;

View File

@@ -0,0 +1,49 @@
/*
* 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;
/**
* Rcs1To1Thread represents a single RCS conversation thread with a total of two
* {@link RcsParticipant}s.
* @hide - TODO(sahinc) make this public
*/
public class Rcs1To1Thread extends RcsThread {
public static final Creator<Rcs1To1Thread> CREATOR = new Creator<Rcs1To1Thread>() {
@Override
public Rcs1To1Thread createFromParcel(Parcel in) {
return new Rcs1To1Thread(in);
}
@Override
public Rcs1To1Thread[] newArray(int size) {
return new Rcs1To1Thread[size];
}
};
protected Rcs1To1Thread(Parcel in) {
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
}
}

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 RcsFileTransferPart;

View File

@@ -0,0 +1,48 @@
/*
* 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;
/**
* A part of a composite {@link RcsMessage} that holds a file transfer.
* @hide - TODO(sahinc) make this public
*/
public class RcsFileTransferPart extends RcsPart {
public static final Creator<RcsFileTransferPart> CREATOR = new Creator<RcsFileTransferPart>() {
@Override
public RcsFileTransferPart createFromParcel(Parcel in) {
return new RcsFileTransferPart(in);
}
@Override
public RcsFileTransferPart[] newArray(int size) {
return new RcsFileTransferPart[size];
}
};
protected RcsFileTransferPart(Parcel in) {
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
}
}

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 RcsGroupThread;

View File

@@ -0,0 +1,49 @@
/*
* 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;
/**
* RcsGroupThread represents a single RCS conversation thread where {@link RcsParticipant}s can join
* or leave.
* @hide - TODO(sahinc) make this public
*/
public class RcsGroupThread extends RcsThread {
public static final Creator<RcsGroupThread> CREATOR = new Creator<RcsGroupThread>() {
@Override
public RcsGroupThread createFromParcel(Parcel in) {
return new RcsGroupThread(in);
}
@Override
public RcsGroupThread[] newArray(int size) {
return new RcsGroupThread[size];
}
};
protected RcsGroupThread(Parcel in) {
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
}
}

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 RcsIncomingMessage;

View File

@@ -0,0 +1,48 @@
/*
* 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;
/**
* This is a single instance of a message received over RCS.
* @hide - TODO(sahinc) make this public
*/
public class RcsIncomingMessage extends RcsMessage {
public static final Creator<RcsIncomingMessage> CREATOR = new Creator<RcsIncomingMessage>() {
@Override
public RcsIncomingMessage createFromParcel(Parcel in) {
return new RcsIncomingMessage(in);
}
@Override
public RcsIncomingMessage[] newArray(int size) {
return new RcsIncomingMessage[size];
}
};
protected RcsIncomingMessage(Parcel in) {
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
}
}

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 RcsLocationPart;

View File

@@ -0,0 +1,48 @@
/*
* 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;
/**
* A part of a composite {@link RcsMessage} that holds a location
* @hide - TODO(sahinc) make this public
*/
public class RcsLocationPart extends RcsPart {
public static final Creator<RcsLocationPart> CREATOR = new Creator<RcsLocationPart>() {
@Override
public RcsLocationPart createFromParcel(Parcel in) {
return new RcsLocationPart(in);
}
@Override
public RcsLocationPart[] newArray(int size) {
return new RcsLocationPart[size];
}
};
protected RcsLocationPart(Parcel in) {
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
}
}

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 RcsManager;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018 The Android Open Source Project
* 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.

View File

@@ -0,0 +1,20 @@
/*
*
* Copyright 2018, 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 RcsMessage;

View File

@@ -0,0 +1,25 @@
/*
* 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.Parcelable;
/**
* This is a single instance of a message sent or received over RCS.
* @hide - TODO(sahinc) make this public
*/
public abstract class RcsMessage implements Parcelable {
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018 The Android Open Source Project
* 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.

View File

@@ -0,0 +1,50 @@
/*
* 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;
/**
* A part of a composite {@link RcsMessage} that holds a media that is rendered on the screen
* (i.e. image, video etc)
* @hide - TODO(sahinc) make this public
*/
public class RcsMultiMediaPart extends RcsFileTransferPart {
public static final Creator<RcsMultiMediaPart> CREATOR = new Creator<RcsMultiMediaPart>() {
@Override
public RcsMultiMediaPart createFromParcel(Parcel in) {
return new RcsMultiMediaPart(in);
}
@Override
public RcsMultiMediaPart[] newArray(int size) {
return new RcsMultiMediaPart[size];
}
};
protected RcsMultiMediaPart(Parcel in) {
super(in);
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
}
}

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 RcsMultimediaPart;

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 RcsOutgoingMessage;

View File

@@ -0,0 +1,48 @@
/*
* 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;
/**
* This is a single instance of a message sent over RCS.
* @hide - TODO(sahinc) make this public
*/
public class RcsOutgoingMessage extends RcsMessage {
public static final Creator<RcsOutgoingMessage> CREATOR = new Creator<RcsOutgoingMessage>() {
@Override
public RcsOutgoingMessage createFromParcel(Parcel in) {
return new RcsOutgoingMessage(in);
}
@Override
public RcsOutgoingMessage[] newArray(int size) {
return new RcsOutgoingMessage[size];
}
};
protected RcsOutgoingMessage(Parcel in) {
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
}
}

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 RcsPart;

View File

@@ -0,0 +1,25 @@
/*
* 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.Parcelable;
/**
* A part of a composite {@link RcsMessage}.
* @hide - TODO(sahinc) make this public
*/
public abstract class RcsPart implements Parcelable {
}

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 RcsParticipant;

View File

@@ -0,0 +1,50 @@
/*
* 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;
/**
* RcsParticipant is an RCS capable contact that can participate in {@link RcsThread}s.
* @hide - TODO(sahinc) make this public
*/
public class RcsParticipant implements Parcelable {
public static final Creator<RcsParticipant> CREATOR = new Creator<RcsParticipant>() {
@Override
public RcsParticipant createFromParcel(Parcel in) {
return new RcsParticipant(in);
}
@Override
public RcsParticipant[] newArray(int size) {
return new RcsParticipant[size];
}
};
protected RcsParticipant(Parcel in) {
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
}
}

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 RcsParticipantAliasChangedEvent;

View File

@@ -0,0 +1,49 @@
/*
* 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;
/**
* An event that indicates an {@link RcsParticipant}'s alias was changed.
* @hide - TODO(sahinc) make this public
*/
public class RcsParticipantAliasChangedEvent extends RcsParticipantEvent {
public static final Creator<RcsParticipantAliasChangedEvent> CREATOR =
new Creator<RcsParticipantAliasChangedEvent>() {
@Override
public RcsParticipantAliasChangedEvent createFromParcel(Parcel in) {
return new RcsParticipantAliasChangedEvent(in);
}
@Override
public RcsParticipantAliasChangedEvent[] newArray(int size) {
return new RcsParticipantAliasChangedEvent[size];
}
};
protected RcsParticipantAliasChangedEvent(Parcel in) {
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
}
}

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 RcsParticipantEvent;

View File

@@ -0,0 +1,25 @@
/*
* 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.Parcelable;
/**
* An event that is associated with an {@link RcsParticipant}
* @hide - TODO(sahinc) make this public
*/
public abstract class RcsParticipantEvent implements Parcelable {
}

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 RcsTextPart;

View File

@@ -0,0 +1,48 @@
/*
* 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;
/**
* A part of a composite {@link RcsMessage} that holds a string
* @hide - TODO(sahinc) make this public
*/
public class RcsTextPart extends RcsPart {
public static final Creator<RcsTextPart> CREATOR = new Creator<RcsTextPart>() {
@Override
public RcsTextPart createFromParcel(Parcel in) {
return new RcsTextPart(in);
}
@Override
public RcsTextPart[] newArray(int size) {
return new RcsTextPart[size];
}
};
protected RcsTextPart(Parcel in) {
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
}
}

View File

@@ -1,6 +1,6 @@
/*
*
* Copyright 2018, The Android Open Source Project
* 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.

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018 The Android Open Source Project
* 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.
@@ -16,59 +16,13 @@
package android.telephony.ims;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.telephony.ims.aidl.IRcs;
/**
* RcsThread represents a single RCS conversation thread. It holds messages that were sent and
* received and events that occured on that thread.
* received and events that occurred on that thread.
* @hide - TODO(sahinc) make this public
*/
public class RcsThread implements Parcelable {
public static final Creator<RcsThread> CREATOR = new Creator<RcsThread>() {
@Override
public RcsThread createFromParcel(Parcel in) {
return new RcsThread(in);
}
public abstract class RcsThread implements Parcelable {
@Override
public RcsThread[] newArray(int size) {
return new RcsThread[size];
}
};
protected RcsThread(Parcel in) {
}
/**
* Returns the number of messages in this RCS thread.
*
* @hide
*/
public int getMessageCount() {
try {
IRcs iRcs = IRcs.Stub.asInterface(ServiceManager.getService("ircs"));
if (iRcs != null) {
// TODO(sahinc): substitute to the regular thread id once we have database
// TODO(sahinc): connection in place
return iRcs.getMessageCount(/* rcsThreadId= */ 123);
}
} catch (RemoteException re) {
// TODO(sahinc): Log something meaningful
}
return 0;
}
/** Implement the Parcelable interface */
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
}
}

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 RcsThreadEvent;

View File

@@ -0,0 +1,25 @@
/*
* 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.Parcelable;
/**
* An event that happened on an {@link RcsThread}.
* @hide - TODO(sahinc) make this public
*/
public abstract class RcsThreadEvent implements Parcelable {
}

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 RcsThreadIconChangedEvent;

View File

@@ -0,0 +1,49 @@
/*
* 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;
/**
* An event that indicates an {@link RcsGroupThread}'s icon was changed.
* @hide - TODO(sahinc) make this public
*/
public class RcsThreadIconChangedEvent extends RcsThreadEvent {
public static final Creator<RcsThreadIconChangedEvent> CREATOR =
new Creator<RcsThreadIconChangedEvent>() {
@Override
public RcsThreadIconChangedEvent createFromParcel(Parcel in) {
return new RcsThreadIconChangedEvent(in);
}
@Override
public RcsThreadIconChangedEvent[] newArray(int size) {
return new RcsThreadIconChangedEvent[size];
}
};
protected RcsThreadIconChangedEvent(Parcel in) {
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
}
}

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 RcsThreadNameChangedEvent;

View File

@@ -0,0 +1,49 @@
/*
* 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;
/**
* An event that indicates an {@link RcsGroupThread}'s name was changed.
* @hide - TODO(sahinc) make this public
*/
public class RcsThreadNameChangedEvent extends RcsThreadEvent {
public static final Creator<RcsThreadNameChangedEvent> CREATOR =
new Creator<RcsThreadNameChangedEvent>() {
@Override
public RcsThreadNameChangedEvent createFromParcel(Parcel in) {
return new RcsThreadNameChangedEvent(in);
}
@Override
public RcsThreadNameChangedEvent[] newArray(int size) {
return new RcsThreadNameChangedEvent[size];
}
};
protected RcsThreadNameChangedEvent(Parcel in) {
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
}
}

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 RcsThreadParticipantJoinedEvent;

View File

@@ -0,0 +1,49 @@
/*
* 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;
/**
* An event that indicates an RCS participant has joined an {@link RcsGroupThread}.
* @hide - TODO(sahinc) make this public
*/
public class RcsThreadParticipantJoinedEvent extends RcsThreadEvent {
public static final Creator<RcsThreadParticipantJoinedEvent> CREATOR =
new Creator<RcsThreadParticipantJoinedEvent>() {
@Override
public RcsThreadParticipantJoinedEvent createFromParcel(Parcel in) {
return new RcsThreadParticipantJoinedEvent(in);
}
@Override
public RcsThreadParticipantJoinedEvent[] newArray(int size) {
return new RcsThreadParticipantJoinedEvent[size];
}
};
protected RcsThreadParticipantJoinedEvent(Parcel in) {
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
}
}

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 RcsThreadParticipantLeftEvent;

View File

@@ -0,0 +1,49 @@
/*
* 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;
/**
* An event that indicates an RCS participant has left an {@link RcsGroupThread}.
* @hide - TODO(sahinc) make this public
*/
public class RcsThreadParticipantLeftEvent extends RcsThreadEvent {
public static final Creator<RcsThreadParticipantLeftEvent> CREATOR =
new Creator<RcsThreadParticipantLeftEvent>() {
@Override
public RcsThreadParticipantLeftEvent createFromParcel(Parcel in) {
return new RcsThreadParticipantLeftEvent(in);
}
@Override
public RcsThreadParticipantLeftEvent[] newArray(int size) {
return new RcsThreadParticipantLeftEvent[size];
}
};
protected RcsThreadParticipantLeftEvent(Parcel in) {
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
}
}