blob: c1ffa68341265fa892213c58259e4b288dd3b675 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
/*
* Copyright (C) 2013 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.telecomm;
import android.telecomm.CallInfo;
/**
* Provides methods for ICallService implementations to interact with the system phone app.
* TODO(santoscordon): Need final public-facing comments in this file.
*/
oneway interface ICallServiceAdapter {
/**
* Receives confirmation of a call service's ability to place a call. This method is used in
* response to {@link ICallService#isCompatibleWith}.
* TODO(santoscordon): rename to setIsCompatibleWith().
*
* @param callId The identifier of the call for which compatibility is being received. This ID
* should correspond to the ID given as part of the call information in
* {@link ICallService#isCompatibleWith}.
* @param isCompatible True if the call service can place the call.
*/
void setCompatibleWith(String callId, boolean isCompatible);
/**
* Receives confirmation of the existence of an incoming call connected through the call
* service. Invoked by the call service after it receives a confirmation request from Telecomm
* through {@link ICallService#confirmIncomingCall}. The call info object must contain all the
* updated status of the call and use the same call ID as was passed into
* {@link ICallService#confirmIncomingCall}.
*
* @param callInfo The details of the relevant call.
*/
void handleConfirmedIncomingCall(in CallInfo callInfo);
/**
* Tells Telecomm that an attempt to place the specified outgoing call succeeded.
* TODO(santoscordon): Consider adding a CallState parameter in case this outgoing call is
* somehow no longer in the DIALING state.
*
* @param callId The ID of the outgoing call.
*/
void handleSuccessfulOutgoingCall(String callId);
/**
* Tells Telecomm that an attempt to place the specified outgoing call failed.
*
* @param callId The ID of the outgoing call.
* @param errorMessage The error associated with the failed call attempt.
*/
void handleFailedOutgoingCall(String callId, String errorMessage);
/**
* Sets a call's state to active (e.g., an ongoing call where two parties can actively
* communicate).
*
* @param callId The unique ID of the call whose state is changing to active.
*/
void setActive(String callId);
/**
* Sets a call's state to ringing (e.g., an inbound ringing call).
*
* @param callId The unique ID of the call whose state is changing to ringing.
*/
void setRinging(String callId);
/**
* Sets a call's state to dialing (e.g., dialing an outbound call).
*
* @param callId The unique ID of the call whose state is changing to dialing.
*/
void setDialing(String callId);
/**
* Sets a call's state to disconnected.
*
* @param callId The unique ID of the call whose state is changing to disconnected.
*/
void setDisconnected(String callId);
}
|