Update API documentation for onRttInitiationFailure.

Add intdef for reason code.
Clarifying when this callback can be expected and how to handle RTT
state when requested at the start of a call.

Test: Docs only change
Bug: 216608696
Change-Id: I86e46fbb2b0693564a41d1ca0d9f8c180d775c1a
This commit is contained in:
Tyler Gunn 2022-02-17 08:23:54 -08:00
parent 070f2b0502
commit b9a0496258
2 changed files with 24 additions and 3 deletions

View File

@ -1476,12 +1476,21 @@ public final class Call {
/**
* Invoked when the RTT session failed to initiate for some reason, including rejection
* by the remote party.
* <p>
* This callback will ONLY be invoked to report a failure related to a user initiated
* session modification request (i.e. {@link Call#sendRttRequest()}).
* <p>
* If a call is initiated with {@link TelecomManager#EXTRA_START_CALL_WITH_RTT} specified,
* the availability of RTT can be determined by checking {@link Details#PROPERTY_RTT}
* once the call enters state {@link Details#STATE_ACTIVE}.
*
* @param call The call which the RTT initiation failure occurred on.
* @param reason One of the status codes defined in
* {@link android.telecom.Connection.RttModifyStatus}, with the exception of
* {@link android.telecom.Connection.RttModifyStatus#SESSION_MODIFY_REQUEST_SUCCESS}.
* {@link android.telecom.Connection.RttModifyStatus}, with the exception of
* {@link android.telecom.Connection.RttModifyStatus#SESSION_MODIFY_REQUEST_SUCCESS}.
*/
public void onRttInitiationFailure(Call call, int reason) {}
public void onRttInitiationFailure(Call call,
@android.telecom.Connection.RttModifyStatus.RttSessionModifyStatus int reason) {}
/**
* Invoked when Call handover from one {@link PhoneAccount} to other {@link PhoneAccount}

View File

@ -1399,6 +1399,18 @@ public abstract class Connection extends Conferenceable {
* Session modify request rejected by remote user.
*/
public static final int SESSION_MODIFY_REQUEST_REJECTED_BY_REMOTE = 5;
/**@hide*/
@Retention(RetentionPolicy.SOURCE)
@IntDef(prefix = "SESSION_MODIFY_REQUEST_", value = {
SESSION_MODIFY_REQUEST_SUCCESS,
SESSION_MODIFY_REQUEST_FAIL,
SESSION_MODIFY_REQUEST_INVALID,
SESSION_MODIFY_REQUEST_TIMED_OUT,
SESSION_MODIFY_REQUEST_REJECTED_BY_REMOTE
})
public @interface RttSessionModifyStatus {}
}
/**