Merge "Update the UCE OPTIONS API" am: a2d03f9eec am: 2f9c50d50a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1605096 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I8d6c55e59a39875e4cc8213c0dd950113d522414
This commit is contained in:
@@ -12295,7 +12295,7 @@ package android.telephony.ims.stub {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static interface CapabilityExchangeEventListener.OptionsRequestCallback {
|
public static interface CapabilityExchangeEventListener.OptionsRequestCallback {
|
||||||
method public default void onRespondToCapabilityRequest(@NonNull android.telephony.ims.RcsContactUceCapability, boolean);
|
method public void onRespondToCapabilityRequest(@NonNull android.telephony.ims.RcsContactUceCapability, boolean);
|
||||||
method public void onRespondToCapabilityRequestWithError(@IntRange(from=100, to=699) int, @NonNull String);
|
method public void onRespondToCapabilityRequestWithError(@IntRange(from=100, to=699) int, @NonNull String);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ import android.telephony.ims.RcsContactUceCapability;
|
|||||||
import android.telephony.ims.RcsUceAdapter;
|
import android.telephony.ims.RcsUceAdapter;
|
||||||
import android.telephony.ims.feature.ImsFeature;
|
import android.telephony.ims.feature.ImsFeature;
|
||||||
import android.telephony.ims.feature.RcsFeature;
|
import android.telephony.ims.feature.RcsFeature;
|
||||||
import android.util.Log;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -40,15 +39,6 @@ public interface CapabilityExchangeEventListener {
|
|||||||
* Interface used by the framework to respond to OPTIONS requests.
|
* Interface used by the framework to respond to OPTIONS requests.
|
||||||
*/
|
*/
|
||||||
interface OptionsRequestCallback {
|
interface OptionsRequestCallback {
|
||||||
/**
|
|
||||||
* Respond to a remote capability request from the contact specified with the
|
|
||||||
* capabilities of this device.
|
|
||||||
* @param ownCapabilities The capabilities of this device.
|
|
||||||
* @hide
|
|
||||||
*/
|
|
||||||
default void onRespondToCapabilityRequest(
|
|
||||||
@NonNull RcsContactUceCapability ownCapabilities) {}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Respond to a remote capability request from the contact specified with the
|
* Respond to a remote capability request from the contact specified with the
|
||||||
* capabilities of this device.
|
* capabilities of this device.
|
||||||
@@ -57,17 +47,8 @@ public interface CapabilityExchangeEventListener {
|
|||||||
* capabilities of this device. If true, the device should respond to the OPTIONS
|
* capabilities of this device. If true, the device should respond to the OPTIONS
|
||||||
* request with a 200 OK response and no capabilities.
|
* request with a 200 OK response and no capabilities.
|
||||||
*/
|
*/
|
||||||
default void onRespondToCapabilityRequest(@NonNull RcsContactUceCapability ownCapabilities,
|
void onRespondToCapabilityRequest(@NonNull RcsContactUceCapability ownCapabilities,
|
||||||
boolean isBlocked) {
|
boolean isBlocked);
|
||||||
Log.w("CapabilityExchangeEventListener", "implement "
|
|
||||||
+ "onRespondToCapabilityRequest(RcsContactUceCapability, boolean) instead!");
|
|
||||||
// Fall back to old implementation
|
|
||||||
if (isBlocked) {
|
|
||||||
onRespondToCapabilityRequestWithError(200, "OK");
|
|
||||||
} else {
|
|
||||||
onRespondToCapabilityRequest(ownCapabilities);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Respond to a remote capability request from the contact specified with the
|
* Respond to a remote capability request from the contact specified with the
|
||||||
|
|||||||
Reference in New Issue
Block a user