blob: cbd9d69eaa5b6d98821ab1dca7b6917a04cefcf5 [file] [log] [blame]
Santos Cordon3afed572014-05-21 15:22:12 -07001/*
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
Tyler Gunnef9f6f92014-09-12 22:16:17 -070017package com.android.internal.telecom;
Santos Cordon3afed572014-05-21 15:22:12 -070018
Santos Cordon6c7a3882014-06-25 15:30:08 -070019import android.content.ComponentName;
Tyler Gunnef9f6f92014-09-12 22:16:17 -070020import android.telecom.PhoneAccountHandle;
Nancy Chenb2299c12014-10-29 18:22:11 -070021import android.net.Uri;
Santos Cordon96efb482014-07-19 14:57:05 -070022import android.os.Bundle;
Tyler Gunnef9f6f92014-09-12 22:16:17 -070023import android.telecom.PhoneAccount;
Yorke Lee2e024702014-06-13 09:59:43 -070024
Santos Cordon3afed572014-05-21 15:22:12 -070025/**
Tyler Gunnef9f6f92014-09-12 22:16:17 -070026 * Interface used to interact with Telecom. Mostly this is used by TelephonyManager for passing
Santos Cordon3afed572014-05-21 15:22:12 -070027 * commands that were previously handled by ITelephony.
28 * {@hide}
29 */
Tyler Gunnef9f6f92014-09-12 22:16:17 -070030interface ITelecomService {
Santos Cordon3534ede2014-05-29 13:07:10 -070031 /**
32 * Brings the in-call screen to the foreground if there is an active call.
33 *
34 * @param showDialpad if true, make the dialpad visible initially.
35 */
Nancy Chen0eb1e402014-08-21 22:52:29 -070036 void showInCallScreen(boolean showDialpad);
Yorke Lee2e024702014-06-13 09:59:43 -070037
38 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -070039 * @see TelecomServiceImpl#getDefaultOutgoingPhoneAccount
Ihab Awad94cf4bf2014-07-17 11:21:19 -070040 */
Tyler Gunnf5b29dc2014-09-03 09:09:12 -070041 PhoneAccountHandle getDefaultOutgoingPhoneAccount(in String uriScheme);
Ihab Awad94cf4bf2014-07-17 11:21:19 -070042
43 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -070044 * @see TelecomServiceImpl#getUserSelectedOutgoingPhoneAccount
Andrew Lee59cac3a2014-08-28 16:50:10 -070045 */
Andrew Leed4abbfb2014-09-03 14:58:27 -070046 PhoneAccountHandle getUserSelectedOutgoingPhoneAccount();
47
48 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -070049 * @see TelecomServiceImpl#setUserSelectedOutgoingPhoneAccount
Andrew Leed4abbfb2014-09-03 14:58:27 -070050 */
51 void setUserSelectedOutgoingPhoneAccount(in PhoneAccountHandle account);
Andrew Lee59cac3a2014-08-28 16:50:10 -070052
53 /**
Nancy Chen210ef032014-09-15 17:58:42 -070054 * @see TelecomServiceImpl#getCallCapablePhoneAccounts
Ihab Awadc35ad022014-06-12 16:29:42 -070055 */
Nancy Chen210ef032014-09-15 17:58:42 -070056 List<PhoneAccountHandle> getCallCapablePhoneAccounts();
Ihab Awadc35ad022014-06-12 16:29:42 -070057
58 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -070059 * @see TelecomManager#getPhoneAccountsSupportingScheme
Tyler Gunnf5b29dc2014-09-03 09:09:12 -070060 */
61 List<PhoneAccountHandle> getPhoneAccountsSupportingScheme(in String uriScheme);
62
63 /**
Nancy Chen513c8922014-09-17 14:47:20 -070064 * @see TelecomManager#getPhoneAccountsForPackage
65 */
66 List<PhoneAccountHandle> getPhoneAccountsForPackage(in String packageName);
67
68 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -070069 * @see TelecomManager#getPhoneAccount
Ihab Awadc35ad022014-06-12 16:29:42 -070070 */
Evan Charlton8c8a0622014-07-20 12:31:00 -070071 PhoneAccount getPhoneAccount(in PhoneAccountHandle account);
Ihab Awadc35ad022014-06-12 16:29:42 -070072
73 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -070074 * @see TelecomManager#getAllPhoneAccountsCount
Tyler Gunna1ed7d12014-09-08 09:52:22 -070075 */
76 int getAllPhoneAccountsCount();
77
78 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -070079 * @see TelecomManager#getAllPhoneAccounts
Tyler Gunna1ed7d12014-09-08 09:52:22 -070080 */
81 List<PhoneAccount> getAllPhoneAccounts();
82
83 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -070084 * @see TelecomManager#getAllPhoneAccountHandles
Tyler Gunna1ed7d12014-09-08 09:52:22 -070085 */
86 List<PhoneAccountHandle> getAllPhoneAccountHandles();
87
88 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -070089 * @see TelecomServiceImpl#getSimCallManager
Andrew Lee59cac3a2014-08-28 16:50:10 -070090 */
91 PhoneAccountHandle getSimCallManager();
92
93 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -070094 * @see TelecomServiceImpl#setSimCallManager
Andrew Lee59cac3a2014-08-28 16:50:10 -070095 */
96 void setSimCallManager(in PhoneAccountHandle account);
97
98 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -070099 * @see TelecomServiceImpl#getSimCallManagers
Andrew Lee59cac3a2014-08-28 16:50:10 -0700100 */
101 List<PhoneAccountHandle> getSimCallManagers();
102
103 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700104 * @see TelecomServiceImpl#registerPhoneAccount
Ihab Awadc35ad022014-06-12 16:29:42 -0700105 */
Evan Charlton8c8a0622014-07-20 12:31:00 -0700106 void registerPhoneAccount(in PhoneAccount metadata);
Santos Cordon6c7a3882014-06-25 15:30:08 -0700107
108 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700109 * @see TelecomServiceImpl#unregisterPhoneAccount
Ihab Awad807fe0a2014-07-09 12:30:52 -0700110 */
Evan Charlton6eb262c2014-07-19 18:18:19 -0700111 void unregisterPhoneAccount(in PhoneAccountHandle account);
Ihab Awad807fe0a2014-07-09 12:30:52 -0700112
113 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700114 * @see TelecomServiceImpl#clearAccounts
Ihab Awad807fe0a2014-07-09 12:30:52 -0700115 */
116 void clearAccounts(String packageName);
117
118 /**
Nancy Chen443e5012014-10-15 15:48:21 -0700119 * @see TelecomServiceImpl#isVoiceMailNumber
120 */
121 boolean isVoiceMailNumber(in PhoneAccountHandle accountHandle, String number);
122
123 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700124 * @see TelecomServiceImpl#getDefaultPhoneApp
Santos Cordon6c7a3882014-06-25 15:30:08 -0700125 */
126 ComponentName getDefaultPhoneApp();
Santos Cordon9eb45932014-06-27 12:28:43 -0700127
128 //
129 // Internal system apis relating to call management.
130 //
131
132 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700133 * @see TelecomServiceImpl#silenceRinger
Santos Cordon9eb45932014-06-27 12:28:43 -0700134 */
135 void silenceRinger();
136
137 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700138 * @see TelecomServiceImpl#isInCall
Santos Cordon9eb45932014-06-27 12:28:43 -0700139 */
Nancy Chen0eb1e402014-08-21 22:52:29 -0700140 boolean isInCall();
Santos Cordon9eb45932014-06-27 12:28:43 -0700141
142 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700143 * @see TelecomServiceImpl#isRinging
Santos Cordon9eb45932014-06-27 12:28:43 -0700144 */
145 boolean isRinging();
146
147 /**
Yorke Lee2ae312e2014-09-12 17:58:48 -0700148 * @see TelecomServiceImpl#getCallState
149 */
150 int getCallState();
151
152 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700153 * @see TelecomServiceImpl#endCall
Santos Cordon9eb45932014-06-27 12:28:43 -0700154 */
155 boolean endCall();
156
157 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700158 * @see TelecomServiceImpl#acceptRingingCall
Santos Cordon9eb45932014-06-27 12:28:43 -0700159 */
160 void acceptRingingCall();
Santos Cordon3c4ff9e2014-07-02 13:20:40 -0700161
162 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700163 * @see TelecomServiceImpl#cancelMissedCallsNotification
Santos Cordon3c4ff9e2014-07-02 13:20:40 -0700164 */
165 void cancelMissedCallsNotification();
Santos Cordon0bae09f2014-07-07 14:53:10 -0700166
167 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700168 * @see TelecomServiceImpl#handleMmi
Santos Cordon0bae09f2014-07-07 14:53:10 -0700169 */
170 boolean handlePinMmi(String dialString);
Sailesh Nepal001bbbb2014-07-15 14:40:39 -0700171
172 /**
Nancy Chen95e8a672014-10-16 18:38:21 -0700173 * @see TelecomServiceImpl#handleMmi
174 */
175 boolean handlePinMmiForPhoneAccount(in PhoneAccountHandle accountHandle, String dialString);
176
177 /**
Nancy Chenb2299c12014-10-29 18:22:11 -0700178 * @see TelecomServiceImpl#getAdnUriForPhoneAccount
179 */
180 Uri getAdnUriForPhoneAccount(in PhoneAccountHandle accountHandle);
181
182 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700183 * @see TelecomServiceImpl#isTtySupported
Sailesh Nepal001bbbb2014-07-15 14:40:39 -0700184 */
185 boolean isTtySupported();
186
187 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700188 * @see TelecomServiceImpl#getCurrentTtyMode
Sailesh Nepal001bbbb2014-07-15 14:40:39 -0700189 */
190 int getCurrentTtyMode();
Santos Cordon96efb482014-07-19 14:57:05 -0700191
192 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700193 * @see TelecomServiceImpl#addNewIncomingCall
Santos Cordon96efb482014-07-19 14:57:05 -0700194 */
195 void addNewIncomingCall(in PhoneAccountHandle phoneAccount, in Bundle extras);
Yorke Leec3cf9822014-10-02 09:38:39 -0700196
197 /**
198 * @see TelecomServiceImpl#addNewUnknownCall
199 */
200 void addNewUnknownCall(in PhoneAccountHandle phoneAccount, in Bundle extras);
Santos Cordon3afed572014-05-21 15:22:12 -0700201}