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

Commit c512d1b5 authored by Tyler Gunn's avatar Tyler Gunn Committed by Android (Google) Code Review
Browse files

Merge "resolve merge conflicts of 74f9c2a0 to master"

parents 2e013e9e c8878bd9
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -11358,7 +11358,6 @@ package android.telephony.ims {
    method public int getEmergencyServiceCategories();
    method @NonNull public java.util.List<java.lang.String> getEmergencyUrns();
    method public android.telephony.ims.ImsStreamMediaProfile getMediaProfile();
    method @NonNull public java.util.Set<android.telephony.ims.RtpHeaderExtensionType> getOfferedRtpHeaderExtensionTypes();
    method @NonNull public android.os.Bundle getProprietaryCallExtras();
    method public int getRestrictCause();
    method public int getServiceType();
@@ -11380,7 +11379,6 @@ package android.telephony.ims {
    method public void setEmergencyServiceCategories(int);
    method public void setEmergencyUrns(@NonNull java.util.List<java.lang.String>);
    method public void setHasKnownUserIntentEmergency(boolean);
    method public void setOfferedRtpHeaderExtensionTypes(@NonNull java.util.Set<android.telephony.ims.RtpHeaderExtensionType>);
    method public void updateCallExtras(android.telephony.ims.ImsCallProfile);
    method public void updateCallType(android.telephony.ims.ImsCallProfile);
    method public void updateMediaProfile(android.telephony.ims.ImsCallProfile);
@@ -11889,6 +11887,7 @@ package android.telephony.ims.feature {
  public class MmTelFeature extends android.telephony.ims.feature.ImsFeature {
    ctor public MmTelFeature();
    method public void changeEnabledCapabilities(@NonNull android.telephony.ims.feature.CapabilityChangeRequest, @NonNull android.telephony.ims.feature.ImsFeature.CapabilityCallbackProxy);
    method public void changeOfferedRtpHeaderExtensionTypes(@NonNull java.util.Set<android.telephony.ims.RtpHeaderExtensionType>);
    method @Nullable public android.telephony.ims.ImsCallProfile createCallProfile(int, int);
    method @Nullable public android.telephony.ims.stub.ImsCallSessionImplBase createCallSession(@NonNull android.telephony.ims.ImsCallProfile);
    method @NonNull public android.telephony.ims.stub.ImsEcbmImplBase getEcbm();
+3 −42
Original line number Diff line number Diff line
@@ -450,8 +450,6 @@ public final class ImsCallProfile implements Parcelable {
    /** Indicates if we have known the intent of the user for the call is emergency */
    private boolean mHasKnownUserIntentEmergency = false;

    private Set<RtpHeaderExtensionType> mOfferedRtpHeaderExtensionTypes = new ArraySet<>();

    private Set<RtpHeaderExtensionType> mAcceptedRtpHeaderExtensionTypes = new ArraySet<>();

    /**
@@ -692,7 +690,6 @@ public final class ImsCallProfile implements Parcelable {
        out.writeBoolean(mHasKnownUserIntentEmergency);
        out.writeInt(mRestrictCause);
        out.writeInt(mCallerNumberVerificationStatus);
        out.writeArray(mOfferedRtpHeaderExtensionTypes.toArray());
        out.writeArray(mAcceptedRtpHeaderExtensionTypes.toArray());
    }

@@ -708,9 +705,6 @@ public final class ImsCallProfile implements Parcelable {
        mHasKnownUserIntentEmergency = in.readBoolean();
        mRestrictCause = in.readInt();
        mCallerNumberVerificationStatus = in.readInt();
        Object[] offered = in.readArray(RtpHeaderExtensionType.class.getClassLoader());
        mOfferedRtpHeaderExtensionTypes = Arrays.stream(offered)
                .map(o -> (RtpHeaderExtensionType) o).collect(Collectors.toSet());
        Object[] accepted = in.readArray(RtpHeaderExtensionType.class.getClassLoader());
        mAcceptedRtpHeaderExtensionTypes = Arrays.stream(accepted)
                .map(o -> (RtpHeaderExtensionType) o).collect(Collectors.toSet());
@@ -1105,47 +1099,14 @@ public final class ImsCallProfile implements Parcelable {
        return mHasKnownUserIntentEmergency;
    }

    /**
     * For an incoming or outgoing call, indicates the {@link RtpHeaderExtensionType}s which the
     * caller is offering to make available.
     * <p>
     * For outgoing calls, an {@link ImsService} will reserve
     * {@link RtpHeaderExtensionType#getLocalIdentifier()} identifiers the telephony stack has
     * proposed to use and not use these same local identifiers.  The offered header extension
     * types for an outgoing call can be found in the
     * {@link ImsCallProfile#getOfferedRtpHeaderExtensionTypes()} and will be available to the
     * {@link ImsService} in {@link MmTelFeature#createCallSession(ImsCallProfile)}.
     * The {@link ImsService} sets the accepted {@link #setAcceptedRtpHeaderExtensionTypes(Set)}
     * when the SDP offer/accept process has completed.
     * <p>
     * According to RFC8285, RTP header extensions available to a call are determined using the
     * offer/accept phase of the SDP protocol (see RFC4566).
     *
     * @return the {@link RtpHeaderExtensionType}s which were offered by other end of the call.
     */
    public @NonNull Set<RtpHeaderExtensionType> getOfferedRtpHeaderExtensionTypes() {
        return mOfferedRtpHeaderExtensionTypes;
    }

    /**
     * Sets the offered {@link RtpHeaderExtensionType}s for this call.
     * <p>
     * According to RFC8285, RTP header extensions available to a call are determined using the
     * offer/accept phase of the SDP protocol (see RFC4566).
     *
     * @param rtpHeaderExtensions the {@link RtpHeaderExtensionType}s which are offered.
     */
    public void setOfferedRtpHeaderExtensionTypes(@NonNull Set<RtpHeaderExtensionType>
                    rtpHeaderExtensions) {
        mOfferedRtpHeaderExtensionTypes.clear();
        mOfferedRtpHeaderExtensionTypes.addAll(rtpHeaderExtensions);
    }

    /**
     * Gets the {@link RtpHeaderExtensionType}s which have been accepted by both ends of the call.
     * <p>
     * According to RFC8285, RTP header extensions available to a call are determined using the
     * offer/accept phase of the SDP protocol (see RFC4566).
     * <p>
     * The offered header extension types supported by the framework and exposed to the
     * {@link ImsService} via {@link MmTelFeature#changeOfferedRtpHeaderExtensionTypes(Set)}.
     *
     * @return the {@link RtpHeaderExtensionType}s which were accepted by the other end of the call.
     */
+4 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.telephony.ims.aidl.IImsMmTelListener;
import android.telephony.ims.aidl.IImsSmsListener;
import android.telephony.ims.aidl.IImsCapabilityCallback;
import android.telephony.ims.feature.CapabilityChangeRequest;
import android.telephony.ims.RtpHeaderExtensionType;

import android.telephony.ims.ImsCallProfile;
import com.android.ims.internal.IImsCallSession;
@@ -29,6 +30,8 @@ import com.android.ims.internal.IImsMultiEndpoint;
import com.android.ims.internal.IImsRegistrationListener;
import com.android.ims.internal.IImsUt;

import java.util.List;

/**
 * See MmTelFeature for more information.
 * {@hide}
@@ -37,6 +40,7 @@ interface IImsMmTelFeature {
    void setListener(IImsMmTelListener l);
    int getFeatureState();
    ImsCallProfile createCallProfile(int callSessionType, int callType);
    void changeOfferedRtpHeaderExtensionTypes(in List<RtpHeaderExtensionType> types);
    IImsCallSession createCallSession(in ImsCallProfile profile);
    int shouldProcessCall(in String[] uris);
    IImsUt getUtInterface();
+35 −0
Original line number Diff line number Diff line
@@ -27,6 +27,8 @@ import android.telecom.TelecomManager;
import android.telephony.ims.ImsCallProfile;
import android.telephony.ims.ImsCallSession;
import android.telephony.ims.ImsReasonInfo;
import android.telephony.ims.ImsService;
import android.telephony.ims.RtpHeaderExtensionType;
import android.telephony.ims.aidl.IImsCapabilityCallback;
import android.telephony.ims.aidl.IImsMmTelFeature;
import android.telephony.ims.aidl.IImsMmTelListener;
@@ -37,6 +39,7 @@ import android.telephony.ims.stub.ImsMultiEndpointImplBase;
import android.telephony.ims.stub.ImsRegistrationImplBase;
import android.telephony.ims.stub.ImsSmsImplBase;
import android.telephony.ims.stub.ImsUtImplBase;
import android.util.ArraySet;

import com.android.ims.internal.IImsCallSession;
import com.android.ims.internal.IImsEcbm;
@@ -45,6 +48,8 @@ import com.android.ims.internal.IImsUt;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.List;
import java.util.Set;

/**
 * Base implementation for Voice and SMS (IR-92) and Video (IR-94) IMS support.
@@ -92,6 +97,18 @@ public class MmTelFeature extends ImsFeature {
            }
        }

        @Override
        public void changeOfferedRtpHeaderExtensionTypes(List<RtpHeaderExtensionType> types)
                throws RemoteException {
            synchronized (mLock) {
                try {
                    MmTelFeature.this.changeOfferedRtpHeaderExtensionTypes(new ArraySet<>(types));
                } catch (Exception e) {
                    throw new RemoteException(e.getMessage());
                }
            }
        }

        @Override
        public IImsCallSession createCallSession(ImsCallProfile profile) throws RemoteException {
            synchronized (mLock) {
@@ -622,6 +639,24 @@ public class MmTelFeature extends ImsFeature {
        return null;
    }

    /**
     * Called by the framework to report a change to the RTP header extension types which should be
     * offered during SDP negotiation (see RFC8285 for more information).
     * <p>
     * The {@link ImsService} should report the RTP header extensions which were accepted during
     * SDP negotiation using {@link ImsCallProfile#setAcceptedRtpHeaderExtensionTypes(Set)}.
     *
     * @param extensionTypes The RTP header extensions the framework wishes to offer during
     *                       outgoing and incoming call setup.  An empty list indicates that there
     *                       are no framework defined RTP header extension types to offer.
     * @hide
     */
    @SystemApi
    public void changeOfferedRtpHeaderExtensionTypes(
            @NonNull Set<RtpHeaderExtensionType> extensionTypes) {
        // Base implementation - should be overridden if RTP header extension handling is supported.
    }

    /**
     * @hide
     */