Add further Connection-side APIs for RTT (part 2)

Add methods and callbacks to facilitate local and remote RTT initiation
and termination in the middle of a call. Adds @hide Connection-side APIs
to communicate with the ConnectionService, as well as plumbing for
RemoteConnections.

Test: manual, through telecom testapps
Change-Id: Ia80604b7dff8586ff222dbccdbe55e91aab02178
This commit is contained in:
Hall Liu
2017-02-06 10:49:48 -08:00
parent 78eed31d2d
commit 57006aa82a
17 changed files with 670 additions and 20 deletions

View File

@@ -547,4 +547,66 @@ final class ConnectionServiceAdapter implements DeathRecipient {
}
}
}
/**
* Notifies Telecom that an RTT session was successfully established.
*
* @param callId The unique ID of the call.
*/
void onRttInitiationSuccess(String callId) {
Log.v(this, "onRttInitiationSuccess: %s", callId);
for (IConnectionServiceAdapter adapter : mAdapters) {
try {
adapter.onRttInitiationSuccess(callId, Log.getExternalSession());
} catch (RemoteException ignored) {
}
}
}
/**
* Notifies Telecom that a requested RTT session failed to be established.
*
* @param callId The unique ID of the call.
*/
void onRttInitiationFailure(String callId, int reason) {
Log.v(this, "onRttInitiationFailure: %s", callId);
for (IConnectionServiceAdapter adapter : mAdapters) {
try {
adapter.onRttInitiationFailure(callId, reason, Log.getExternalSession());
} catch (RemoteException ignored) {
}
}
}
/**
* Notifies Telecom that an established RTT session was terminated by the remote user on
* the call.
*
* @param callId The unique ID of the call.
*/
void onRttSessionRemotelyTerminated(String callId) {
Log.v(this, "onRttSessionRemotelyTerminated: %s", callId);
for (IConnectionServiceAdapter adapter : mAdapters) {
try {
adapter.onRttSessionRemotelyTerminated(callId, Log.getExternalSession());
} catch (RemoteException ignored) {
}
}
}
/**
* Notifies Telecom that the remote user on the call has requested an upgrade to an RTT
* session for this call.
*
* @param callId The unique ID of the call.
*/
void onRemoteRttRequest(String callId) {
Log.v(this, "onRemoteRttRequest: %s", callId);
for (IConnectionServiceAdapter adapter : mAdapters) {
try {
adapter.onRemoteRttRequest(callId, Log.getExternalSession());
} catch (RemoteException ignored) {
}
}
}
}