diff options
| author | 2021-03-30 03:07:29 +0000 | |
|---|---|---|
| committer | 2021-03-30 03:07:29 +0000 | |
| commit | a4829f365a4ebb1e21b028dc15e168a0eb03e28c (patch) | |
| tree | 3fc225a1de988acab5be305fb60ae75db33edd68 | |
| parent | c103a8cee958b3b688a5109a0258d3a15c5b1dd7 (diff) | |
| parent | 4f4713ec6713f3600a4b99143a4f55e148172633 (diff) | |
Merge "Updated the RcsCapabilityExchangeImplBase APIs" am: 47dc400888 am: 4f4713ec67
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1652213
Change-Id: I8be9e96e205cc464e8620723361de0277b39b2f8
| -rw-r--r-- | core/api/system-current.txt | 6 | ||||
| -rw-r--r-- | telephony/java/android/telephony/ims/feature/RcsFeature.java | 32 | ||||
| -rw-r--r-- | telephony/java/android/telephony/ims/stub/RcsCapabilityExchangeImplBase.java | 9 |
3 files changed, 43 insertions, 4 deletions
diff --git a/core/api/system-current.txt b/core/api/system-current.txt index 4676523bbd6c..4d7360e3853e 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -12066,13 +12066,13 @@ package android.telephony.ims.feature { ctor @Deprecated public RcsFeature(); ctor public RcsFeature(@NonNull java.util.concurrent.Executor); method public void changeEnabledCapabilities(@NonNull android.telephony.ims.feature.CapabilityChangeRequest, @NonNull android.telephony.ims.feature.ImsFeature.CapabilityCallbackProxy); - method @NonNull public android.telephony.ims.stub.RcsCapabilityExchangeImplBase createCapabilityExchangeImpl(@NonNull java.util.concurrent.Executor, @NonNull android.telephony.ims.stub.CapabilityExchangeEventListener); + method @NonNull public android.telephony.ims.stub.RcsCapabilityExchangeImplBase createCapabilityExchangeImpl(@NonNull android.telephony.ims.stub.CapabilityExchangeEventListener); + method public void destroyCapabilityExchangeImpl(@NonNull android.telephony.ims.stub.RcsCapabilityExchangeImplBase); method public final void notifyCapabilitiesStatusChanged(@NonNull android.telephony.ims.feature.RcsFeature.RcsImsCapabilities); method public void onFeatureReady(); method public void onFeatureRemoved(); method public boolean queryCapabilityConfiguration(int, int); method @NonNull public final android.telephony.ims.feature.RcsFeature.RcsImsCapabilities queryCapabilityStatus(); - method public void removeCapabilityExchangeImpl(@NonNull android.telephony.ims.stub.RcsCapabilityExchangeImplBase); } public static class RcsFeature.RcsImsCapabilities extends android.telephony.ims.feature.ImsFeature.Capabilities { @@ -12284,7 +12284,7 @@ package android.telephony.ims.stub { } public class RcsCapabilityExchangeImplBase { - ctor public RcsCapabilityExchangeImplBase(@NonNull java.util.concurrent.Executor); + ctor public RcsCapabilityExchangeImplBase(); method public void publishCapabilities(@NonNull String, @NonNull android.telephony.ims.stub.RcsCapabilityExchangeImplBase.PublishResponseCallback); method public void sendOptionsCapabilityRequest(@NonNull android.net.Uri, @NonNull java.util.Set<java.lang.String>, @NonNull android.telephony.ims.stub.RcsCapabilityExchangeImplBase.OptionsResponseCallback); method public void subscribeForCapabilities(@NonNull java.util.Collection<android.net.Uri>, @NonNull android.telephony.ims.stub.RcsCapabilityExchangeImplBase.SubscribeResponseCallback); diff --git a/telephony/java/android/telephony/ims/feature/RcsFeature.java b/telephony/java/android/telephony/ims/feature/RcsFeature.java index 6315b242184a..b384e50d9f03 100644 --- a/telephony/java/android/telephony/ims/feature/RcsFeature.java +++ b/telephony/java/android/telephony/ims/feature/RcsFeature.java @@ -391,6 +391,7 @@ public class RcsFeature extends ImsFeature { * event to the framework. * @return An instance of {@link RcsCapabilityExchangeImplBase} that implements capability * exchange if it is supported by the device. + * @hide */ public @NonNull RcsCapabilityExchangeImplBase createCapabilityExchangeImpl( @NonNull Executor executor, @NonNull CapabilityExchangeEventListener listener) { @@ -399,14 +400,45 @@ public class RcsFeature extends ImsFeature { } /** + * Retrieve the implementation of UCE for this {@link RcsFeature}, which can use either + * presence or OPTIONS for capability exchange. + * + * Will only be requested by the framework if capability exchange is configured + * as capable during a + * {@link #changeEnabledCapabilities(CapabilityChangeRequest, CapabilityCallbackProxy)} + * operation and the RcsFeature sets the status of the capability to true using + * {@link #notifyCapabilitiesStatusChanged(RcsImsCapabilities)}. + * + * @param listener A {@link CapabilityExchangeEventListener} to send the capability exchange + * event to the framework. + * @return An instance of {@link RcsCapabilityExchangeImplBase} that implements capability + * exchange if it is supported by the device. + */ + public @NonNull RcsCapabilityExchangeImplBase createCapabilityExchangeImpl( + @NonNull CapabilityExchangeEventListener listener) { + // Base Implementation, override to implement functionality + return new RcsCapabilityExchangeImplBase(); + } + + /** * Remove the given CapabilityExchangeImplBase instance. * @param capExchangeImpl The {@link RcsCapabilityExchangeImplBase} instance to be removed. + * @hide */ public void removeCapabilityExchangeImpl( @NonNull RcsCapabilityExchangeImplBase capExchangeImpl) { // Override to implement the process of removing RcsCapabilityExchangeImplBase instance. } + /** + * Remove the given CapabilityExchangeImplBase instance. + * @param capExchangeImpl The {@link RcsCapabilityExchangeImplBase} instance to be destroyed. + */ + public void destroyCapabilityExchangeImpl( + @NonNull RcsCapabilityExchangeImplBase capExchangeImpl) { + // Override to implement the process of destroying RcsCapabilityExchangeImplBase instance. + } + /**{@inheritDoc}*/ @Override public void onFeatureRemoved() { diff --git a/telephony/java/android/telephony/ims/stub/RcsCapabilityExchangeImplBase.java b/telephony/java/android/telephony/ims/stub/RcsCapabilityExchangeImplBase.java index 25b9446152ac..a117adcfb99a 100644 --- a/telephony/java/android/telephony/ims/stub/RcsCapabilityExchangeImplBase.java +++ b/telephony/java/android/telephony/ims/stub/RcsCapabilityExchangeImplBase.java @@ -356,12 +356,13 @@ public class RcsCapabilityExchangeImplBase { void onTerminated(@NonNull String reason, long retryAfterMilliseconds) throws ImsException; } - private final Executor mBinderExecutor; + private Executor mBinderExecutor; /** * Create a new RcsCapabilityExchangeImplBase instance. * * @param executor The executor that remote calls from the framework will be called on. + * @hide */ public RcsCapabilityExchangeImplBase(@NonNull Executor executor) { if (executor == null) { @@ -371,6 +372,12 @@ public class RcsCapabilityExchangeImplBase { } /** + * Create a new RcsCapabilityExchangeImplBase instance. + */ + public RcsCapabilityExchangeImplBase() { + } + + /** * The user capabilities of one or multiple contacts have been requested by the framework. * <p> * The implementer must follow up this call with an |