diff options
author | 2023-05-02 15:31:09 -0700 | |
---|---|---|
committer | 2023-05-03 20:48:42 +0000 | |
commit | 7c0864dfb4820d259bb0c4652f442a4ca862470c (patch) | |
tree | 1e0953811b6e7a64f351144480d2b569503e6847 | |
parent | f7147b5cfdbbff0d8999d4af92bcd40b71372234 (diff) |
update CallControlCallback docs for the rejection case
TL;DR:
- docs update for CallControlCallback rejection cases
- CTS coverage for onAnswer#(wasCompleted(false)) case
- CTS coverage for onSetActive#(wasCompleted(false)) case
- TSW fix
In most of the Transactional tests, it's expected that the client
always completed the CallControlCallback. In adding these tests I
noticed that the current logic will answer or set the call active if the
client rejects the onAnswer or onSetActive. In order to prevent this two
active call scenario, I've adjusted the appropriate code.
Fixes: 279034589
Test: CTS coverage for changes
Change-Id: I97f6371d845e00e7708b8b65abd57591d7a01cb7
-rw-r--r-- | telecomm/java/android/telecom/CallControlCallback.java | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/telecomm/java/android/telecom/CallControlCallback.java b/telecomm/java/android/telecom/CallControlCallback.java index 35e2fd43efdd..eac2e64aa2ab 100644 --- a/telecomm/java/android/telecom/CallControlCallback.java +++ b/telecomm/java/android/telecom/CallControlCallback.java @@ -44,9 +44,11 @@ public interface CallControlCallback { * * @param wasCompleted The {@link Consumer} to be completed. If the client can set the call * active on their end, the {@link Consumer#accept(Object)} should be - * called with {@link Boolean#TRUE}. Otherwise, - * {@link Consumer#accept(Object)} should be called with - * {@link Boolean#FALSE}. + * called with {@link Boolean#TRUE}. + * + * Otherwise, {@link Consumer#accept(Object)} should be called with + * {@link Boolean#FALSE}. Telecom will effectively ignore the remote + * setActive request and the call will remain in whatever state it is in. */ void onSetActive(@NonNull Consumer<Boolean> wasCompleted); @@ -56,9 +58,11 @@ public interface CallControlCallback { * * @param wasCompleted The {@link Consumer} to be completed. If the client can set the call * inactive on their end, the {@link Consumer#accept(Object)} should be - * called with {@link Boolean#TRUE}. Otherwise, - * {@link Consumer#accept(Object)} should be called with - * {@link Boolean#FALSE}. + * called with {@link Boolean#TRUE}. + * + * Otherwise, {@link Consumer#accept(Object)} should be called with + * {@link Boolean#FALSE}. Telecom will effectively ignore the remote + * setInactive request and the call will remain in whatever state it is in. */ void onSetInactive(@NonNull Consumer<Boolean> wasCompleted); @@ -68,8 +72,11 @@ public interface CallControlCallback { * @param videoState see {@link android.telecom.CallAttributes.CallType} for valid states * @param wasCompleted The {@link Consumer} to be completed. If the client can answer the call * on their end, {@link Consumer#accept(Object)} should be called with - * {@link Boolean#TRUE}. Otherwise, {@link Consumer#accept(Object)} should - * be called with {@link Boolean#FALSE}. + * {@link Boolean#TRUE}. + * + * Otherwise,{@link Consumer#accept(Object)} should be called with + * {@link Boolean#FALSE}. However, Telecom will still disconnect + * the call and remove it from tracking. */ void onAnswer(@android.telecom.CallAttributes.CallType int videoState, @NonNull Consumer<Boolean> wasCompleted); @@ -80,9 +87,11 @@ public interface CallControlCallback { * @param disconnectCause represents the cause for disconnecting the call. * @param wasCompleted The {@link Consumer} to be completed. If the client can disconnect * the call on their end, {@link Consumer#accept(Object)} should be - * called with {@link Boolean#TRUE}. Otherwise, - * {@link Consumer#accept(Object)} should be called with - * {@link Boolean#FALSE}. + * called with {@link Boolean#TRUE}. + * + * Otherwise,{@link Consumer#accept(Object)} should be called with + * {@link Boolean#FALSE}. However, Telecom will still disconnect + * the call and remove it from tracking. */ void onDisconnect(@NonNull DisconnectCause disconnectCause, @NonNull Consumer<Boolean> wasCompleted); |