Introduce APIs for RTT calls (part 1)

Add signaling methods and data pipes for handling real-time text during
a call.

Change-Id: I876827c448252c5f786d7a4919c47891acb03877
Test: manual, through telecom testapps
This commit is contained in:
Hall Liu
2017-01-25 17:12:49 -08:00
parent 975be6c065
commit 95d5587d0a
17 changed files with 817 additions and 10 deletions

View File

@@ -76,6 +76,7 @@ public abstract class InCallService extends Service {
private static final int MSG_ON_CAN_ADD_CALL_CHANGED = 7;
private static final int MSG_SILENCE_RINGER = 8;
private static final int MSG_ON_CONNECTION_EVENT = 9;
private static final int MSG_ON_RTT_UPGRADE_REQUEST = 10;
/** Default Handler used to consolidate binder method calls onto a single thread. */
private final Handler mHandler = new Handler(Looper.getMainLooper()) {
@@ -133,6 +134,12 @@ public abstract class InCallService extends Service {
}
break;
}
case MSG_ON_RTT_UPGRADE_REQUEST: {
String callId = (String) msg.obj;
int requestId = msg.arg1;
mPhone.internalOnRttUpgradeRequest(callId, requestId);
break;
}
default:
break;
}
@@ -198,6 +205,11 @@ public abstract class InCallService extends Service {
args.arg3 = extras;
mHandler.obtainMessage(MSG_ON_CONNECTION_EVENT, args).sendToTarget();
}
@Override
public void onRttUpgradeRequest(String callId, int id) {
mHandler.obtainMessage(MSG_ON_RTT_UPGRADE_REQUEST, id, 0, callId).sendToTarget();
}
}
private Phone.Listener mPhoneListener = new Phone.Listener() {