1 /*
2  * Copyright (C) 2014 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.android.internal.telecom;
18 
19 import android.net.Uri;
20 import android.os.Bundle;
21 import android.telecom.PhoneAccountHandle;
22 
23 /**
24  * Internal remote callback interface for in-call services.
25  *
26  * @see android.telecom.InCallAdapter
27  *
28  * {@hide}
29  */
30 oneway interface IInCallAdapter {
answerCall(String callId, int videoState)31     void answerCall(String callId, int videoState);
32 
deflectCall(String callId, in Uri address)33     void deflectCall(String callId, in Uri address);
34 
rejectCall(String callId, boolean rejectWithMessage, String textMessage)35     void rejectCall(String callId, boolean rejectWithMessage, String textMessage);
36 
rejectCallWithReason(String callId, int rejectReason)37     void rejectCallWithReason(String callId, int rejectReason);
38 
transferCall(String callId, in Uri targetNumber, boolean isConfirmationRequired)39     void transferCall(String callId, in Uri targetNumber, boolean isConfirmationRequired);
40 
consultativeTransfer(String callId, String otherCallId)41     void consultativeTransfer(String callId, String otherCallId);
42 
disconnectCall(String callId)43     void disconnectCall(String callId);
44 
holdCall(String callId)45     void holdCall(String callId);
46 
unholdCall(String callId)47     void unholdCall(String callId);
48 
mute(boolean shouldMute)49     void mute(boolean shouldMute);
50 
setAudioRoute(int route, String bluetoothAddress)51     void setAudioRoute(int route, String bluetoothAddress);
52 
enterBackgroundAudioProcessing(String callId)53     void enterBackgroundAudioProcessing(String callId);
54 
exitBackgroundAudioProcessing(String callId, boolean shouldRing)55     void exitBackgroundAudioProcessing(String callId, boolean shouldRing);
56 
playDtmfTone(String callId, char digit)57     void playDtmfTone(String callId, char digit);
58 
stopDtmfTone(String callId)59     void stopDtmfTone(String callId);
60 
postDialContinue(String callId, boolean proceed)61     void postDialContinue(String callId, boolean proceed);
62 
phoneAccountSelected(String callId, in PhoneAccountHandle accountHandle, boolean setDefault)63     void phoneAccountSelected(String callId, in PhoneAccountHandle accountHandle,
64             boolean setDefault);
65 
conference(String callId, String otherCallId)66     void conference(String callId, String otherCallId);
67 
splitFromConference(String callId)68     void splitFromConference(String callId);
69 
mergeConference(String callId)70     void mergeConference(String callId);
71 
swapConference(String callId)72     void swapConference(String callId);
73 
addConferenceParticipants(String callId, in List<Uri> participants)74     void addConferenceParticipants(String callId, in List<Uri> participants);
75 
turnOnProximitySensor()76     void turnOnProximitySensor();
77 
turnOffProximitySensor(boolean screenOnImmediately)78     void turnOffProximitySensor(boolean screenOnImmediately);
79 
pullExternalCall(String callId)80     void pullExternalCall(String callId);
81 
sendCallEvent(String callId, String event, int targetSdkVer, in Bundle extras)82     void sendCallEvent(String callId, String event, int targetSdkVer, in Bundle extras);
83 
putExtras(String callId, in Bundle extras)84     void putExtras(String callId, in Bundle extras);
85 
removeExtras(String callId, in List<String> keys)86     void removeExtras(String callId, in List<String> keys);
87 
sendRttRequest(String callId)88     void sendRttRequest(String callId);
89 
respondToRttRequest(String callId, int id, boolean accept)90     void respondToRttRequest(String callId, int id, boolean accept);
91 
stopRtt(String callId)92     void stopRtt(String callId);
93 
setRttMode(String callId, int mode)94     void setRttMode(String callId, int mode);
95 
handoverTo(String callId, in PhoneAccountHandle destAcct, int videoState, in Bundle extras)96     void handoverTo(String callId, in PhoneAccountHandle destAcct, int videoState,
97             in Bundle extras);
98 }
99