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

Commit ec851b1f authored by Sahin Caliskan's avatar Sahin Caliskan
Browse files

Skeleton implementation of RCS APIs

This change adds the classes for RCS Storage APIs. There
is no business logic implemented yet, and the parcelable boilerplate
code doesn't really do anything.

This was needed as these APIs are meant to be interconnected, i.e. to
use an RcsPart, the app developer will need an RcsMessage, and for
that they will need the RcsThread etc.

Test: Builds fine. Tests will be added as I add business logic.

Bug: 109759350
Change-Id: I20897946dc1d9218f60274c7e3242194c7e2ac32
parent 760e074e
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
/*
 *
 * 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;
+49 −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 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) {
    }
}
+20 −0
Original line number Diff line number Diff line
/*
 *
 * 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;
+48 −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 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) {
    }
}
+20 −0
Original line number Diff line number Diff line
/*
 *
 * 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;
Loading