From 28393c9b61f6f40c1ef88388a253d2178c8b0c2a Mon Sep 17 00:00:00 2001 From: Kamaljeet Maini Date: Fri, 22 Apr 2016 14:19:56 -0700 Subject: Add new options for call waiting response in InCallUI When an incoming call is received while there is already an active call, the user will be given four choices for the response: 1) Left button: hold the current call and answer incoming call 2) Bottom button: end the current call and answer the incoming call 3) Right button: decline the incoming call 4) Top button: Send a text message to the incoming caller if texting is enabled The framework changes include new hidden API for sending additional information to Telecomm service, few constants, and a bug fix. Change-Id: I642b330d856613fafc0526eb79dd97fedba4ce6a --- telecomm/java/android/telecom/InCallAdapter.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'telecomm/java/android/telecom/InCallAdapter.java') diff --git a/telecomm/java/android/telecom/InCallAdapter.java b/telecomm/java/android/telecom/InCallAdapter.java index 8eb62ec..d660f59 100644 --- a/telecomm/java/android/telecom/InCallAdapter.java +++ b/telecomm/java/android/telecom/InCallAdapter.java @@ -57,6 +57,20 @@ public final class InCallAdapter { } /** + * Instructs Telecom to answer the specified call. + * + * @param callId The identifier of the call to answer. + * @param videoState The video state in which to answer the call. + * @param callWaitingResponseType Response type for call waiting. + */ + public void answerCall(String callId, int videoState, int callWaitingResponseType) { + try { + mAdapter.answerCallWithCallWaitingResponse(callId, videoState, callWaitingResponseType); + } catch (RemoteException e) { + } + } + + /** * Instructs Telecom to reject the specified call. * * @param callId The identifier of the call to reject. -- cgit v1.1