Merge "Move offered RTP header extension types API." am: 8185680306
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1496302 Change-Id: Ib7343934945566868b23a91a312bb9494b33533d
This commit is contained in:
@@ -11819,7 +11819,6 @@ package android.telephony.ims {
|
|||||||
method public int getEmergencyServiceCategories();
|
method public int getEmergencyServiceCategories();
|
||||||
method @NonNull public java.util.List<java.lang.String> getEmergencyUrns();
|
method @NonNull public java.util.List<java.lang.String> getEmergencyUrns();
|
||||||
method public android.telephony.ims.ImsStreamMediaProfile getMediaProfile();
|
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 @NonNull public android.os.Bundle getProprietaryCallExtras();
|
||||||
method public int getRestrictCause();
|
method public int getRestrictCause();
|
||||||
method public int getServiceType();
|
method public int getServiceType();
|
||||||
@@ -11841,7 +11840,6 @@ package android.telephony.ims {
|
|||||||
method public void setEmergencyServiceCategories(int);
|
method public void setEmergencyServiceCategories(int);
|
||||||
method public void setEmergencyUrns(@NonNull java.util.List<java.lang.String>);
|
method public void setEmergencyUrns(@NonNull java.util.List<java.lang.String>);
|
||||||
method public void setHasKnownUserIntentEmergency(boolean);
|
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 updateCallExtras(android.telephony.ims.ImsCallProfile);
|
||||||
method public void updateCallType(android.telephony.ims.ImsCallProfile);
|
method public void updateCallType(android.telephony.ims.ImsCallProfile);
|
||||||
method public void updateMediaProfile(android.telephony.ims.ImsCallProfile);
|
method public void updateMediaProfile(android.telephony.ims.ImsCallProfile);
|
||||||
@@ -12350,6 +12348,7 @@ package android.telephony.ims.feature {
|
|||||||
public class MmTelFeature extends android.telephony.ims.feature.ImsFeature {
|
public class MmTelFeature extends android.telephony.ims.feature.ImsFeature {
|
||||||
ctor public MmTelFeature();
|
ctor public MmTelFeature();
|
||||||
method public void changeEnabledCapabilities(@NonNull android.telephony.ims.feature.CapabilityChangeRequest, @NonNull android.telephony.ims.feature.ImsFeature.CapabilityCallbackProxy);
|
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.ImsCallProfile createCallProfile(int, int);
|
||||||
method @Nullable public android.telephony.ims.stub.ImsCallSessionImplBase createCallSession(@NonNull android.telephony.ims.ImsCallProfile);
|
method @Nullable public android.telephony.ims.stub.ImsCallSessionImplBase createCallSession(@NonNull android.telephony.ims.ImsCallProfile);
|
||||||
method @NonNull public android.telephony.ims.stub.ImsEcbmImplBase getEcbm();
|
method @NonNull public android.telephony.ims.stub.ImsEcbmImplBase getEcbm();
|
||||||
|
|||||||
@@ -10701,7 +10701,6 @@ package android.telephony.ims {
|
|||||||
method public int getEmergencyServiceCategories();
|
method public int getEmergencyServiceCategories();
|
||||||
method @NonNull public java.util.List<java.lang.String> getEmergencyUrns();
|
method @NonNull public java.util.List<java.lang.String> getEmergencyUrns();
|
||||||
method public android.telephony.ims.ImsStreamMediaProfile getMediaProfile();
|
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 @NonNull public android.os.Bundle getProprietaryCallExtras();
|
||||||
method public int getRestrictCause();
|
method public int getRestrictCause();
|
||||||
method public int getServiceType();
|
method public int getServiceType();
|
||||||
@@ -10723,7 +10722,6 @@ package android.telephony.ims {
|
|||||||
method public void setEmergencyServiceCategories(int);
|
method public void setEmergencyServiceCategories(int);
|
||||||
method public void setEmergencyUrns(@NonNull java.util.List<java.lang.String>);
|
method public void setEmergencyUrns(@NonNull java.util.List<java.lang.String>);
|
||||||
method public void setHasKnownUserIntentEmergency(boolean);
|
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 updateCallExtras(android.telephony.ims.ImsCallProfile);
|
||||||
method public void updateCallType(android.telephony.ims.ImsCallProfile);
|
method public void updateCallType(android.telephony.ims.ImsCallProfile);
|
||||||
method public void updateMediaProfile(android.telephony.ims.ImsCallProfile);
|
method public void updateMediaProfile(android.telephony.ims.ImsCallProfile);
|
||||||
@@ -11232,6 +11230,7 @@ package android.telephony.ims.feature {
|
|||||||
public class MmTelFeature extends android.telephony.ims.feature.ImsFeature {
|
public class MmTelFeature extends android.telephony.ims.feature.ImsFeature {
|
||||||
ctor public MmTelFeature();
|
ctor public MmTelFeature();
|
||||||
method public void changeEnabledCapabilities(@NonNull android.telephony.ims.feature.CapabilityChangeRequest, @NonNull android.telephony.ims.feature.ImsFeature.CapabilityCallbackProxy);
|
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.ImsCallProfile createCallProfile(int, int);
|
||||||
method @Nullable public android.telephony.ims.stub.ImsCallSessionImplBase createCallSession(@NonNull android.telephony.ims.ImsCallProfile);
|
method @Nullable public android.telephony.ims.stub.ImsCallSessionImplBase createCallSession(@NonNull android.telephony.ims.ImsCallProfile);
|
||||||
method @NonNull public android.telephony.ims.stub.ImsEcbmImplBase getEcbm();
|
method @NonNull public android.telephony.ims.stub.ImsEcbmImplBase getEcbm();
|
||||||
|
|||||||
@@ -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 */
|
/** Indicates if we have known the intent of the user for the call is emergency */
|
||||||
private boolean mHasKnownUserIntentEmergency = false;
|
private boolean mHasKnownUserIntentEmergency = false;
|
||||||
|
|
||||||
private Set<RtpHeaderExtensionType> mOfferedRtpHeaderExtensionTypes = new ArraySet<>();
|
|
||||||
|
|
||||||
private Set<RtpHeaderExtensionType> mAcceptedRtpHeaderExtensionTypes = new ArraySet<>();
|
private Set<RtpHeaderExtensionType> mAcceptedRtpHeaderExtensionTypes = new ArraySet<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -692,7 +690,6 @@ public final class ImsCallProfile implements Parcelable {
|
|||||||
out.writeBoolean(mHasKnownUserIntentEmergency);
|
out.writeBoolean(mHasKnownUserIntentEmergency);
|
||||||
out.writeInt(mRestrictCause);
|
out.writeInt(mRestrictCause);
|
||||||
out.writeInt(mCallerNumberVerificationStatus);
|
out.writeInt(mCallerNumberVerificationStatus);
|
||||||
out.writeArray(mOfferedRtpHeaderExtensionTypes.toArray());
|
|
||||||
out.writeArray(mAcceptedRtpHeaderExtensionTypes.toArray());
|
out.writeArray(mAcceptedRtpHeaderExtensionTypes.toArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -708,9 +705,6 @@ public final class ImsCallProfile implements Parcelable {
|
|||||||
mHasKnownUserIntentEmergency = in.readBoolean();
|
mHasKnownUserIntentEmergency = in.readBoolean();
|
||||||
mRestrictCause = in.readInt();
|
mRestrictCause = in.readInt();
|
||||||
mCallerNumberVerificationStatus = 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());
|
Object[] accepted = in.readArray(RtpHeaderExtensionType.class.getClassLoader());
|
||||||
mAcceptedRtpHeaderExtensionTypes = Arrays.stream(accepted)
|
mAcceptedRtpHeaderExtensionTypes = Arrays.stream(accepted)
|
||||||
.map(o -> (RtpHeaderExtensionType) o).collect(Collectors.toSet());
|
.map(o -> (RtpHeaderExtensionType) o).collect(Collectors.toSet());
|
||||||
@@ -1105,47 +1099,14 @@ public final class ImsCallProfile implements Parcelable {
|
|||||||
return mHasKnownUserIntentEmergency;
|
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.
|
* Gets the {@link RtpHeaderExtensionType}s which have been accepted by both ends of the call.
|
||||||
* <p>
|
* <p>
|
||||||
* According to RFC8285, RTP header extensions available to a call are determined using the
|
* According to RFC8285, RTP header extensions available to a call are determined using the
|
||||||
* offer/accept phase of the SDP protocol (see RFC4566).
|
* 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.
|
* @return the {@link RtpHeaderExtensionType}s which were accepted by the other end of the call.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import android.telephony.ims.aidl.IImsMmTelListener;
|
|||||||
import android.telephony.ims.aidl.IImsSmsListener;
|
import android.telephony.ims.aidl.IImsSmsListener;
|
||||||
import android.telephony.ims.aidl.IImsCapabilityCallback;
|
import android.telephony.ims.aidl.IImsCapabilityCallback;
|
||||||
import android.telephony.ims.feature.CapabilityChangeRequest;
|
import android.telephony.ims.feature.CapabilityChangeRequest;
|
||||||
|
import android.telephony.ims.RtpHeaderExtensionType;
|
||||||
|
|
||||||
import android.telephony.ims.ImsCallProfile;
|
import android.telephony.ims.ImsCallProfile;
|
||||||
import com.android.ims.internal.IImsCallSession;
|
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.IImsRegistrationListener;
|
||||||
import com.android.ims.internal.IImsUt;
|
import com.android.ims.internal.IImsUt;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* See MmTelFeature for more information.
|
* See MmTelFeature for more information.
|
||||||
* {@hide}
|
* {@hide}
|
||||||
@@ -37,6 +40,7 @@ interface IImsMmTelFeature {
|
|||||||
void setListener(IImsMmTelListener l);
|
void setListener(IImsMmTelListener l);
|
||||||
int getFeatureState();
|
int getFeatureState();
|
||||||
ImsCallProfile createCallProfile(int callSessionType, int callType);
|
ImsCallProfile createCallProfile(int callSessionType, int callType);
|
||||||
|
void changeOfferedRtpHeaderExtensionTypes(in List<RtpHeaderExtensionType> types);
|
||||||
IImsCallSession createCallSession(in ImsCallProfile profile);
|
IImsCallSession createCallSession(in ImsCallProfile profile);
|
||||||
int shouldProcessCall(in String[] uris);
|
int shouldProcessCall(in String[] uris);
|
||||||
IImsUt getUtInterface();
|
IImsUt getUtInterface();
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ import android.telecom.TelecomManager;
|
|||||||
import android.telephony.ims.ImsCallProfile;
|
import android.telephony.ims.ImsCallProfile;
|
||||||
import android.telephony.ims.ImsCallSession;
|
import android.telephony.ims.ImsCallSession;
|
||||||
import android.telephony.ims.ImsReasonInfo;
|
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.IImsCapabilityCallback;
|
||||||
import android.telephony.ims.aidl.IImsMmTelFeature;
|
import android.telephony.ims.aidl.IImsMmTelFeature;
|
||||||
import android.telephony.ims.aidl.IImsMmTelListener;
|
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.ImsRegistrationImplBase;
|
||||||
import android.telephony.ims.stub.ImsSmsImplBase;
|
import android.telephony.ims.stub.ImsSmsImplBase;
|
||||||
import android.telephony.ims.stub.ImsUtImplBase;
|
import android.telephony.ims.stub.ImsUtImplBase;
|
||||||
|
import android.util.ArraySet;
|
||||||
|
|
||||||
import com.android.ims.internal.IImsCallSession;
|
import com.android.ims.internal.IImsCallSession;
|
||||||
import com.android.ims.internal.IImsEcbm;
|
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.Retention;
|
||||||
import java.lang.annotation.RetentionPolicy;
|
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.
|
* 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
|
@Override
|
||||||
public IImsCallSession createCallSession(ImsCallProfile profile) throws RemoteException {
|
public IImsCallSession createCallSession(ImsCallProfile profile) throws RemoteException {
|
||||||
synchronized (mLock) {
|
synchronized (mLock) {
|
||||||
@@ -622,6 +639,24 @@ public class MmTelFeature extends ImsFeature {
|
|||||||
return null;
|
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
|
* @hide
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user