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

Commit 26381815 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Use RcsThreadQueryResultParcelable"

parents 4c71c42f 024e5f7a
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -102,7 +102,7 @@ import android.telephony.ims.RcsParticipantQueryParams;
import android.telephony.ims.RcsParticipantQueryResult;
import android.telephony.ims.RcsQueryContinuationToken;
import android.telephony.ims.RcsThreadQueryParams;
import android.telephony.ims.RcsThreadQueryResult;
import android.telephony.ims.RcsThreadQueryResultParcelable;
import android.telephony.ims.aidl.IRcs;

import com.android.internal.annotations.VisibleForTesting;
@@ -168,7 +168,7 @@ public class RcsMessageStoreController extends IRcs.Stub {
    }

    @Override
    public RcsThreadQueryResult getRcsThreads(RcsThreadQueryParams queryParameters)
    public RcsThreadQueryResultParcelable getRcsThreads(RcsThreadQueryParams queryParameters)
            throws RemoteException {
        Bundle bundle = new Bundle();
        bundle.putParcelable(THREAD_QUERY_PARAMETERS_KEY, queryParameters);
@@ -176,7 +176,7 @@ public class RcsMessageStoreController extends IRcs.Stub {
    }

    @Override
    public RcsThreadQueryResult getRcsThreadsWithToken(
    public RcsThreadQueryResultParcelable getRcsThreadsWithToken(
            RcsQueryContinuationToken continuationToken) throws RemoteException {
        Bundle bundle = new Bundle();
        bundle.putParcelable(QUERY_CONTINUATION_TOKEN, continuationToken);
+3 −3
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ import android.net.Uri;
import android.os.Bundle;
import android.os.RemoteException;
import android.telephony.ims.RcsQueryContinuationToken;
import android.telephony.ims.RcsThreadQueryResult;
import android.telephony.ims.RcsThreadQueryResultParcelable;

import com.android.ims.RcsTypeIdPair;

@@ -60,7 +60,7 @@ class RcsThreadQueryHelper {
        mParticipantQueryHelper = participantQueryHelper;
    }

    RcsThreadQueryResult performThreadQuery(Bundle bundle) throws RemoteException {
    RcsThreadQueryResultParcelable performThreadQuery(Bundle bundle) throws RemoteException {
        RcsQueryContinuationToken continuationToken = null;
        List<RcsTypeIdPair> rcsThreadIdList = new ArrayList<>();
        try (Cursor cursor = mContentResolver.query(RCS_THREAD_URI, null, bundle, null)) {
@@ -87,7 +87,7 @@ class RcsThreadQueryHelper {
                continuationToken = cursorExtras.getParcelable(QUERY_CONTINUATION_TOKEN);
            }
        }
        return new RcsThreadQueryResult(continuationToken, rcsThreadIdList);
        return new RcsThreadQueryResultParcelable(continuationToken, rcsThreadIdList);
    }

    int create1To1Thread(int participantId) throws RemoteException {
+1 −3
Original line number Diff line number Diff line
@@ -185,10 +185,8 @@ public class RcsMessageStoreControllerTest extends TelephonyTest {
        mFakeRcsProvider.addExpectedOperation(new ExpectedUpdate(
                Uri.parse("content://rcs/group_thread/454"), null, null, contentValues, 0));

        RcsParticipant participant = new RcsParticipant(9);

        try {
            mRcsMessageStoreController.setGroupThreadOwner(454, participant.getId());
            mRcsMessageStoreController.setGroupThreadOwner(454, 9);
        } catch (RemoteException e) {
            // eat the exception as there is no provider - we care about the expected update assert
        }