Debian Codegraph @

telecomm/java/com/android/internal/telecom/ITelecomService.aidl

raw
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.content.ComponentName;
20 import android.content.Intent;
21 import android.telecom.TelecomAnalytics;
22 import android.telecom.PhoneAccountHandle;
23 import android.net.Uri;
24 import android.os.Bundle;
25 import android.os.UserHandle;
26 import android.telecom.PhoneAccount;
27 import android.content.pm.ParceledListSlice;
28
29 /**
30 * Interface used to interact with Telecom. Mostly this is used by TelephonyManager for passing
31 * commands that were previously handled by ITelephony.
32 * {@hide}
33 */
34 interface ITelecomService {
35 /**
36 * Brings the in-call screen to the foreground if there is an active call.
37 *
38 * @param showDialpad if true, make the dialpad visible initially.
39 */
40 void showInCallScreen(boolean showDialpad, String callingPackage, String callingFeatureId);
41
42 /**
43 * @see TelecomServiceImpl#getDefaultOutgoingPhoneAccount
44 */
45 PhoneAccountHandle getDefaultOutgoingPhoneAccount(in String uriScheme, String callingPackage,
46 String callingFeatureId);
47
48 /**
49 * @see TelecomServiceImpl#getUserSelectedOutgoingPhoneAccount
50 */
51 PhoneAccountHandle getUserSelectedOutgoingPhoneAccount(String callingPackage);
52
53 /**
54 * @see TelecomServiceImpl#setUserSelectedOutgoingPhoneAccount
55 */
56 void setUserSelectedOutgoingPhoneAccount(in PhoneAccountHandle account);
57
58 /**
59 * @see TelecomServiceImpl#getCallCapablePhoneAccounts
60 */
61 ParceledListSlice<PhoneAccountHandle> getCallCapablePhoneAccounts(
62 boolean includeDisabledAccounts, String callingPackage, String callingFeatureId);
63
64 /**
65 * @see TelecomServiceImpl#getSelfManagedPhoneAccounts
66 */
67 ParceledListSlice<PhoneAccountHandle> getSelfManagedPhoneAccounts(String callingPackage,
68 String callingFeatureId);
69
70 /**
71 * @see TelecomServiceImpl#getOwnSelfManagedPhoneAccounts
72 */
73 ParceledListSlice<PhoneAccountHandle> getOwnSelfManagedPhoneAccounts(String callingPackage,
74 String callingFeatureId);
75
76 /**
77 * @see TelecomManager#getPhoneAccountsSupportingScheme
78 */
79 ParceledListSlice<PhoneAccountHandle> getPhoneAccountsSupportingScheme(in String uriScheme,
80 String callingPackage);
81
82 /**
83 * @see TelecomManager#getPhoneAccountsForPackage
84 */
85 ParceledListSlice<PhoneAccountHandle> getPhoneAccountsForPackage(in String packageName);
86
87 /**
88 * @see TelecomManager#getPhoneAccount
89 */
90 PhoneAccount getPhoneAccount(in PhoneAccountHandle account, String callingPackage);
91
92 /**
93 * @see TelecomManager#getAllPhoneAccountsCount
94 */
95 int getAllPhoneAccountsCount();
96
97 /**
98 * @see TelecomManager#getAllPhoneAccounts
99 */
100 ParceledListSlice<PhoneAccount> getAllPhoneAccounts();
101
102 /**
103 * @see TelecomManager#getAllPhoneAccountHandles
104 */
105 ParceledListSlice<PhoneAccountHandle> getAllPhoneAccountHandles();
106
107 /**
108 * @see TelecomServiceImpl#getSimCallManager
109 */
110 PhoneAccountHandle getSimCallManager(int subId);
111
112 /**
113 * @see TelecomServiceImpl#getSimCallManagerForUser
114 */
115 PhoneAccountHandle getSimCallManagerForUser(int userId);
116
117 /**
118 * @see TelecomServiceImpl#registerPhoneAccount
119 */
120 void registerPhoneAccount(in PhoneAccount metadata);
121
122 /**
123 * @see TelecomServiceImpl#unregisterPhoneAccount
124 */
125 void unregisterPhoneAccount(in PhoneAccountHandle account);
126
127 /**
128 * @see TelecomServiceImpl#clearAccounts
129 */
130 void clearAccounts(String packageName);
131
132 /**
133 * @see TelecomServiceImpl#isVoiceMailNumber
134 */
135 boolean isVoiceMailNumber(in PhoneAccountHandle accountHandle, String number,
136 String callingPackage, String callingFeatureId);
137
138 /**
139 * @see TelecomServiceImpl#getVoiceMailNumber
140 */
141 String getVoiceMailNumber(in PhoneAccountHandle accountHandle, String callingPackage,
142 String callingFeatureId);
143
144 /**
145 * @see TelecomServiceImpl#getLine1Number
146 */
147 String getLine1Number(in PhoneAccountHandle accountHandle, String callingPackage,
148 String callingFeatureId);
149
150 /**
151 * @see TelecomServiceImpl#getDefaultPhoneApp
152 */
153 ComponentName getDefaultPhoneApp();
154
155 /**
156 * @see TelecomServiceImpl#getDefaultDialerPackage
157 */
158 String getDefaultDialerPackage();
159
160 /**
161 * @see TelecomServiceImpl#getDefaultDialerPackage
162 */
163 String getDefaultDialerPackageForUser(int userId);
164
165 /**
166 * @see TelecomServiceImpl#getSystemDialerPackage
167 */
168 String getSystemDialerPackage();
169
170 /**
171 * @see TelecomServiceImpl#dumpCallAnalytics
172 */
173 TelecomAnalytics dumpCallAnalytics();
174
175 //
176 // Internal system apis relating to call management.
177 //
178
179 /**
180 * @see TelecomServiceImpl#silenceRinger
181 */
182 void silenceRinger(String callingPackage);
183
184 /**
185 * @see TelecomServiceImpl#isInCall
186 */
187 boolean isInCall(String callingPackage, String callingFeatureId);
188
189 /**
190 * @see TelecomServiceImpl#hasManageOngoingCallsPermission
191 */
192 boolean hasManageOngoingCallsPermission(String callingPackage);
193
194 /**
195 * @see TelecomServiceImpl#isInManagedCall
196 */
197 boolean isInManagedCall(String callingPackage, String callingFeatureId);
198
199 /**
200 * @see TelecomServiceImpl#isRinging
201 */
202 boolean isRinging(String callingPackage);
203
204 /**
205 * @see TelecomServiceImpl#getCallState
206 * Note: only kept around to not break app compat, however this will throw a SecurityException
207 * on API 31+.
208 */
209 @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
210 int getCallState();
211
212 /**
213 * @see TelecomServiceImpl#getCallState
214 */
215 int getCallStateUsingPackage(String callingPackage, String callingFeatureId);
216
217 /**
218 * @see TelecomServiceImpl#endCall
219 */
220 boolean endCall(String callingPackage);
221
222 /**
223 * @see TelecomServiceImpl#acceptRingingCall
224 */
225 void acceptRingingCall(String callingPackage);
226
227 /**
228 * @see TelecomServiceImpl#acceptRingingCallWithVideoState(int)
229 */
230 void acceptRingingCallWithVideoState(String callingPackage, int videoState);
231
232 /**
233 * @see TelecomServiceImpl#cancelMissedCallsNotification
234 */
235 void cancelMissedCallsNotification(String callingPackage);
236
237 /**
238 * @see TelecomServiceImpl#handleMmi
239 */
240 boolean handlePinMmi(String dialString, String callingPackage);
241
242 /**
243 * @see TelecomServiceImpl#handleMmi
244 */
245 boolean handlePinMmiForPhoneAccount(in PhoneAccountHandle accountHandle, String dialString,
246 String callingPackage);
247
248 /**
249 * @see TelecomServiceImpl#getAdnUriForPhoneAccount
250 */
251 Uri getAdnUriForPhoneAccount(in PhoneAccountHandle accountHandle, String callingPackage);
252
253 /**
254 * @see TelecomServiceImpl#isTtySupported
255 */
256 boolean isTtySupported(String callingPackage, String callingFeatureId);
257
258 /**
259 * @see TelecomServiceImpl#getCurrentTtyMode
260 */
261 int getCurrentTtyMode(String callingPackage, String callingFeatureId);
262
263 /**
264 * @see TelecomServiceImpl#addNewIncomingCall
265 */
266 void addNewIncomingCall(in PhoneAccountHandle phoneAccount, in Bundle extras);
267
268 /**
269 * @see TelecomServiceImpl#addNewIncomingConference
270 */
271 void addNewIncomingConference(in PhoneAccountHandle phoneAccount, in Bundle extras);
272
273 /**
274 * @see TelecomServiceImpl#addNewUnknownCall
275 */
276 void addNewUnknownCall(in PhoneAccountHandle phoneAccount, in Bundle extras);
277
278 /**
279 * @see TelecomServiceImpl#startConference
280 */
281 void startConference(in List<Uri> participants, in Bundle extras,
282 String callingPackage);
283
284 /**
285 * @see TelecomServiceImpl#placeCall
286 */
287 void placeCall(in Uri handle, in Bundle extras, String callingPackage, String callingFeatureId);
288
289 /**
290 * @see TelecomServiceImpl#enablePhoneAccount
291 */
292 boolean enablePhoneAccount(in PhoneAccountHandle accountHandle, boolean isEnabled);
293
294 /**
295 * @see TelecomServiceImpl#setDefaultDialer
296 */
297 boolean setDefaultDialer(in String packageName);
298
299 /**
300 * Stop suppressing blocked numbers after a call to emergency services. Shell only.
301 */
302 void stopBlockSuppression();
303
304 /**
305 * @see TelecomServiceImpl#createManageBlockedNumbersIntent
306 **/
307 Intent createManageBlockedNumbersIntent();
308
309 /**
310 * @see TelecomServiceImpl#createLaunchEmergencyDialerIntent
311 */
312 Intent createLaunchEmergencyDialerIntent(in String number);
313
314 /**
315 * @see TelecomServiceImpl#isIncomingCallPermitted
316 */
317 boolean isIncomingCallPermitted(in PhoneAccountHandle phoneAccountHandle,
318 String callingPackage);
319
320 /**
321 * @see TelecomServiceImpl#isOutgoingCallPermitted
322 */
323 boolean isOutgoingCallPermitted(in PhoneAccountHandle phoneAccountHandle,
324 String callingPackage);
325
326 /**
327 * @see TelecomServiceImpl#waitOnHandler
328 */
329 void waitOnHandlers();
330
331 /**
332 * @see TelecomServiceImpl#acceptHandover
333 */
334 void acceptHandover(in Uri srcAddr, int videoState, in PhoneAccountHandle destAcct);
335
336 /**
337 * @see TelecomServiceImpl#setTestEmergencyPhoneAccountPackageNameFilter
338 */
339 void setTestEmergencyPhoneAccountPackageNameFilter(String packageName);
340
341 /**
342 * @see TelecomServiceImpl#isInEmergencyCall
343 */
344 boolean isInEmergencyCall();
345
346 /**
347 * @see TelecomServiceImpl#handleCallIntent
348 */
349 void handleCallIntent(in Intent intent, in String callingPackageProxy);
350
351 void cleanupStuckCalls();
352
353 int cleanupOrphanPhoneAccounts();
354
355 void resetCarMode();
356
357 void setTestDefaultCallRedirectionApp(String packageName);
358
359 /**
360 * @see TelecomServiceImpl#requestLogMark
361 */
362 void requestLogMark(in String message);
363
364 void setTestPhoneAcctSuggestionComponent(String flattenedComponentName);
365
366 void setTestDefaultCallScreeningApp(String packageName);
367
368 void addOrRemoveTestCallCompanionApp(String packageName, boolean isAdded);
369
370 /**
371 * @see TelecomServiceImpl#setSystemDialer
372 */
373 void setSystemDialer(in ComponentName testComponentName);
374
375 /**
376 * @see TelecomServiceImpl#setTestDefaultDialer
377 */
378 void setTestDefaultDialer(in String packageName);
379
380 /**
381 * @see TelecomServiceImpl#setTestCallDiagnosticService
382 */
383 void setTestCallDiagnosticService(in String packageName);
384
385 /**
386 * @see TelecomServiceImpl#isInSelfManagedCall
387 */
388 boolean isInSelfManagedCall(String packageName, in UserHandle userHandle,
389 String callingPackage);
390 }