Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7b46efda authored by Leland Miller's avatar Leland Miller Committed by android-build-merger
Browse files

Merge "Split RCS events into API and internal classes"

am: 609ea873

Change-Id: Ic12e2ce7ba5fbc576fc2537204049a28828ec4e7
parents 225ef93d 609ea873
Loading
Loading
Loading
Loading
+8 −26
Original line number Diff line number Diff line
@@ -43604,12 +43604,9 @@ package android.telephony.ims {
  @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) @IntDef({android.telephony.ims.RcsEventQueryParams.SORT_BY_CREATION_ORDER, android.telephony.ims.RcsEventQueryParams.SORT_BY_TIMESTAMP}) public static @interface RcsEventQueryParams.SortingProperty {
  }
  public final class RcsEventQueryResult implements android.os.Parcelable {
    method public int describeContents();
  public class RcsEventQueryResult {
    method public android.telephony.ims.RcsQueryContinuationToken getContinuationToken();
    method public java.util.List<android.telephony.ims.RcsEvent> getEvents();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.telephony.ims.RcsEventQueryResult> CREATOR;
  }
  public final class RcsFileTransferCreationParams implements android.os.Parcelable {
@@ -43704,37 +43701,25 @@ package android.telephony.ims {
    method @NonNull public android.telephony.ims.RcsGroupThread getRcsGroupThread();
  }
  public final class RcsGroupThreadIconChangedEvent extends android.telephony.ims.RcsGroupThreadEvent implements android.os.Parcelable {
  public final class RcsGroupThreadIconChangedEvent extends android.telephony.ims.RcsGroupThreadEvent {
    ctor public RcsGroupThreadIconChangedEvent(long, @NonNull android.telephony.ims.RcsGroupThread, @NonNull android.telephony.ims.RcsParticipant, @Nullable android.net.Uri);
    method public int describeContents();
    method @Nullable public android.net.Uri getNewIcon();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.telephony.ims.RcsGroupThreadIconChangedEvent> CREATOR;
  }
  public final class RcsGroupThreadNameChangedEvent extends android.telephony.ims.RcsGroupThreadEvent implements android.os.Parcelable {
  public final class RcsGroupThreadNameChangedEvent extends android.telephony.ims.RcsGroupThreadEvent {
    ctor public RcsGroupThreadNameChangedEvent(long, @NonNull android.telephony.ims.RcsGroupThread, @NonNull android.telephony.ims.RcsParticipant, @Nullable String);
    method public int describeContents();
    method @Nullable public String getNewName();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.telephony.ims.RcsGroupThreadNameChangedEvent> CREATOR;
  }
  public final class RcsGroupThreadParticipantJoinedEvent extends android.telephony.ims.RcsGroupThreadEvent implements android.os.Parcelable {
  public final class RcsGroupThreadParticipantJoinedEvent extends android.telephony.ims.RcsGroupThreadEvent {
    ctor public RcsGroupThreadParticipantJoinedEvent(long, @NonNull android.telephony.ims.RcsGroupThread, @NonNull android.telephony.ims.RcsParticipant, @NonNull android.telephony.ims.RcsParticipant);
    method public int describeContents();
    method public android.telephony.ims.RcsParticipant getJoinedParticipant();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.telephony.ims.RcsGroupThreadParticipantJoinedEvent> CREATOR;
  }
  public final class RcsGroupThreadParticipantLeftEvent extends android.telephony.ims.RcsGroupThreadEvent implements android.os.Parcelable {
  public final class RcsGroupThreadParticipantLeftEvent extends android.telephony.ims.RcsGroupThreadEvent {
    ctor public RcsGroupThreadParticipantLeftEvent(long, @NonNull android.telephony.ims.RcsGroupThread, @NonNull android.telephony.ims.RcsParticipant, @NonNull android.telephony.ims.RcsParticipant);
    method public int describeContents();
    method @NonNull public android.telephony.ims.RcsParticipant getLeavingParticipantId();
    method @NonNull public android.telephony.ims.RcsParticipant getLeavingParticipant();
    method public void persist() throws android.telephony.ims.RcsMessageStoreException;
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.telephony.ims.RcsGroupThreadParticipantLeftEvent> CREATOR;
  }
  public class RcsIncomingMessage extends android.telephony.ims.RcsMessage {
@@ -43926,13 +43911,10 @@ package android.telephony.ims {
    method @WorkerThread public void setContactId(String) throws android.telephony.ims.RcsMessageStoreException;
  }
  public final class RcsParticipantAliasChangedEvent extends android.telephony.ims.RcsEvent implements android.os.Parcelable {
  public final class RcsParticipantAliasChangedEvent extends android.telephony.ims.RcsEvent {
    ctor public RcsParticipantAliasChangedEvent(long, @NonNull android.telephony.ims.RcsParticipant, @Nullable String);
    method public int describeContents();
    method @Nullable public String getNewAlias();
    method @NonNull public android.telephony.ims.RcsParticipant getParticipantId();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.telephony.ims.RcsParticipantAliasChangedEvent> CREATOR;
    method @NonNull public android.telephony.ims.RcsParticipant getParticipant();
  }
  public final class RcsParticipantQueryParams implements android.os.Parcelable {
+1 −20
Original line number Diff line number Diff line
@@ -15,16 +15,11 @@
 */
package android.telephony.ims;

import android.os.Parcel;

/**
 * The base class for events that can happen on {@link RcsParticipant}s and {@link RcsThread}s.
 */
public abstract class RcsEvent {
    /**
     * @hide
     */
    protected final long mTimestamp;
    private final long mTimestamp;

    protected RcsEvent(long timestamp) {
        mTimestamp = timestamp;
@@ -44,18 +39,4 @@ public abstract class RcsEvent {
     * @hide
     */
    abstract void persist() throws RcsMessageStoreException;

    /**
     * @hide
     */
    RcsEvent(Parcel in) {
        mTimestamp = in.readLong();
    }

    /**
     * @hide
     */
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(mTimestamp);
    }
}
+1 −1
Original line number Diff line number Diff line
@@ -17,4 +17,4 @@

package android.telephony.ims;

parcelable RcsEvent;
parcelable RcsEventDescriptor;
+56 −0
Original line number Diff line number Diff line
/*
 * 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 static com.android.internal.annotations.VisibleForTesting.Visibility.PROTECTED;

import android.os.Parcel;
import android.os.Parcelable;

import com.android.internal.annotations.VisibleForTesting;

/**
 * @hide - used only for internal communication with the ircs service
 */
public abstract class RcsEventDescriptor implements Parcelable {
    protected final long mTimestamp;

    RcsEventDescriptor(long timestamp) {
        mTimestamp = timestamp;
    }

    /**
     * Creates an RcsEvent based on this RcsEventDescriptor. Overriding this method practically
     * allows an injection point for RcsEvent dependencies outside of the values contained in the
     * descriptor.
     */
    @VisibleForTesting(visibility = PROTECTED)
    public abstract RcsEvent createRcsEvent();

    RcsEventDescriptor(Parcel in) {
        mTimestamp = in.readLong();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(mTimestamp);
    }

    @Override
    public int describeContents() {
        return 0;
    }
}
+1 −30
Original line number Diff line number Diff line
@@ -16,9 +16,6 @@

package android.telephony.ims;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
@@ -26,7 +23,7 @@ import java.util.List;
 * 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.
 */
public final class RcsEventQueryResult implements Parcelable {
public class RcsEventQueryResult {
    private RcsQueryContinuationToken mContinuationToken;
    private List<RcsEvent> mEvents;

@@ -60,30 +57,4 @@ public final class RcsEventQueryResult implements Parcelable {
    public List<RcsEvent> getEvents() {
        return mEvents;
    }

    private RcsEventQueryResult(Parcel in) {
        mContinuationToken = in.readParcelable(RcsQueryContinuationToken.class.getClassLoader());
    }

    public static final Creator<RcsEventQueryResult> CREATOR = new Creator<RcsEventQueryResult>() {
        @Override
        public RcsEventQueryResult createFromParcel(Parcel in) {
            return new RcsEventQueryResult(in);
        }

        @Override
        public RcsEventQueryResult[] newArray(int size) {
            return new RcsEventQueryResult[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeParcelable(mContinuationToken, flags);
    }
}
Loading