diff options
-rwxr-xr-x | api/system-current.txt | 3 | ||||
-rw-r--r-- | core/api/system-current.txt | 3 | ||||
-rw-r--r-- | telephony/java/android/telephony/ims/ImsCallProfile.java | 45 | ||||
-rw-r--r-- | telephony/java/android/telephony/ims/aidl/IImsMmTelFeature.aidl | 4 | ||||
-rw-r--r-- | telephony/java/android/telephony/ims/feature/MmTelFeature.java | 35 |
5 files changed, 44 insertions, 46 deletions
diff --git a/api/system-current.txt b/api/system-current.txt index d93f14753673..dcffa06ead8f 100755 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -11819,7 +11819,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(); @@ -11841,7 +11840,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); @@ -12350,6 +12348,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(); diff --git a/core/api/system-current.txt b/core/api/system-current.txt index b263bf45a97e..18d10641d0cd 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -10701,7 +10701,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(); @@ -10723,7 +10722,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); @@ -11232,6 +11230,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(); diff --git a/telephony/java/android/telephony/ims/ImsCallProfile.java b/telephony/java/android/telephony/ims/ImsCallProfile.java index 9a55cec80816..1b51936e873b 100644 --- a/telephony/java/android/telephony/ims/ImsCallProfile.java +++ b/telephony/java/android/telephony/ims/ImsCallProfile.java @@ -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()); @@ -1106,46 +1100,13 @@ public final class ImsCallProfile implements Parcelable { } /** - * 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. */ diff --git a/telephony/java/android/telephony/ims/aidl/IImsMmTelFeature.aidl b/telephony/java/android/telephony/ims/aidl/IImsMmTelFeature.aidl index b9a6b3c38a92..37fec7a73634 100644 --- a/telephony/java/android/telephony/ims/aidl/IImsMmTelFeature.aidl +++ b/telephony/java/android/telephony/ims/aidl/IImsMmTelFeature.aidl @@ -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(); diff --git a/telephony/java/android/telephony/ims/feature/MmTelFeature.java b/telephony/java/android/telephony/ims/feature/MmTelFeature.java index d7b0e0f030ab..e570fb6f5612 100644 --- a/telephony/java/android/telephony/ims/feature/MmTelFeature.java +++ b/telephony/java/android/telephony/ims/feature/MmTelFeature.java @@ -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. @@ -93,6 +98,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) { return createCallSessionInterface(profile); @@ -623,6 +640,24 @@ public class MmTelFeature extends ImsFeature { } /** + * 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 */ public IImsCallSession createCallSessionInterface(ImsCallProfile profile) |