blob: a6ab3ac03e2dbfaea99ff699640ed16f1c6e706b [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
17package com.android.internal.telecomm;
18
Santos Cordon6c7a3882014-06-25 15:30:08 -070019import android.content.ComponentName;
Evan Charlton6eb262c2014-07-19 18:18:19 -070020import android.telecomm.PhoneAccountHandle;
Santos Cordon96efb482014-07-19 14:57:05 -070021import android.os.Bundle;
Evan Charlton8c8a0622014-07-20 12:31:00 -070022import android.telecomm.PhoneAccount;
Yorke Lee2e024702014-06-13 09:59:43 -070023
Santos Cordon3afed572014-05-21 15:22:12 -070024/**
25 * Interface used to interact with Telecomm. Mostly this is used by TelephonyManager for passing
26 * commands that were previously handled by ITelephony.
27 * {@hide}
28 */
Santos Cordon3534ede2014-05-29 13:07:10 -070029interface ITelecommService {
Santos Cordon3534ede2014-05-29 13:07:10 -070030 /**
31 * Brings the in-call screen to the foreground if there is an active call.
32 *
33 * @param showDialpad if true, make the dialpad visible initially.
34 */
Nancy Chen0eb1e402014-08-21 22:52:29 -070035 void showInCallScreen(boolean showDialpad);
Yorke Lee2e024702014-06-13 09:59:43 -070036
37 /**
Andrew Lee59cac3a2014-08-28 16:50:10 -070038 * @see TelecommServiceImpl#getDefaultOutgoingPhoneAccount
Ihab Awad94cf4bf2014-07-17 11:21:19 -070039 */
Tyler Gunnf5b29dc2014-09-03 09:09:12 -070040 PhoneAccountHandle getDefaultOutgoingPhoneAccount(in String uriScheme);
Ihab Awad94cf4bf2014-07-17 11:21:19 -070041
42 /**
Andrew Lee59cac3a2014-08-28 16:50:10 -070043 * @see TelecommServiceImpl#setDefaultOutgoingPhoneAccount
44 */
45 void setDefaultOutgoingPhoneAccount(in PhoneAccountHandle account);
46
47 /**
48 * @see TelecommServiceImpl#getOutgoingPhoneAccounts
Ihab Awadc35ad022014-06-12 16:29:42 -070049 */
Ihab Awadb19a0bc2014-08-07 19:46:01 -070050 List<PhoneAccountHandle> getOutgoingPhoneAccounts();
Ihab Awadc35ad022014-06-12 16:29:42 -070051
52 /**
Tyler Gunnf5b29dc2014-09-03 09:09:12 -070053 * @see TelecommManager#getPhoneAccountsSupportingScheme
54 */
55 List<PhoneAccountHandle> getPhoneAccountsSupportingScheme(in String uriScheme);
56
57 /**
58 * @see TelecommManager#getPhoneAccount
Ihab Awadc35ad022014-06-12 16:29:42 -070059 */
Evan Charlton8c8a0622014-07-20 12:31:00 -070060 PhoneAccount getPhoneAccount(in PhoneAccountHandle account);
Ihab Awadc35ad022014-06-12 16:29:42 -070061
62 /**
Andrew Lee59cac3a2014-08-28 16:50:10 -070063 * @see TelecommServiceImpl#getSimCallManager
64 */
65 PhoneAccountHandle getSimCallManager();
66
67 /**
68 * @see TelecommServiceImpl#setSimCallManager
69 */
70 void setSimCallManager(in PhoneAccountHandle account);
71
72 /**
73 * @see TelecommServiceImpl#getSimCallManagers
74 */
75 List<PhoneAccountHandle> getSimCallManagers();
76
77 /**
78 * @see TelecommServiceImpl#registerPhoneAccount
Ihab Awadc35ad022014-06-12 16:29:42 -070079 */
Evan Charlton8c8a0622014-07-20 12:31:00 -070080 void registerPhoneAccount(in PhoneAccount metadata);
Santos Cordon6c7a3882014-06-25 15:30:08 -070081
82 /**
Andrew Lee59cac3a2014-08-28 16:50:10 -070083 * @see TelecommServiceImpl#unregisterPhoneAccount
Ihab Awad807fe0a2014-07-09 12:30:52 -070084 */
Evan Charlton6eb262c2014-07-19 18:18:19 -070085 void unregisterPhoneAccount(in PhoneAccountHandle account);
Ihab Awad807fe0a2014-07-09 12:30:52 -070086
87 /**
Andrew Lee59cac3a2014-08-28 16:50:10 -070088 * @see TelecommServiceImpl#clearAccounts
Ihab Awad807fe0a2014-07-09 12:30:52 -070089 */
90 void clearAccounts(String packageName);
91
92 /**
Andrew Lee59cac3a2014-08-28 16:50:10 -070093 * @see TelecommServiceImpl#getDefaultPhoneApp
Santos Cordon6c7a3882014-06-25 15:30:08 -070094 */
95 ComponentName getDefaultPhoneApp();
Santos Cordon9eb45932014-06-27 12:28:43 -070096
97 //
98 // Internal system apis relating to call management.
99 //
100
101 /**
Andrew Lee59cac3a2014-08-28 16:50:10 -0700102 * @see TelecommServiceImpl#silenceRinger
Santos Cordon9eb45932014-06-27 12:28:43 -0700103 */
104 void silenceRinger();
105
106 /**
Andrew Lee59cac3a2014-08-28 16:50:10 -0700107 * @see TelecommServiceImpl#isInCall
Santos Cordon9eb45932014-06-27 12:28:43 -0700108 */
Nancy Chen0eb1e402014-08-21 22:52:29 -0700109 boolean isInCall();
Santos Cordon9eb45932014-06-27 12:28:43 -0700110
111 /**
Andrew Lee59cac3a2014-08-28 16:50:10 -0700112 * @see TelecommServiceImpl#isRinging
Santos Cordon9eb45932014-06-27 12:28:43 -0700113 */
114 boolean isRinging();
115
116 /**
Andrew Lee59cac3a2014-08-28 16:50:10 -0700117 * @see TelecommServiceImpl#endCall
Santos Cordon9eb45932014-06-27 12:28:43 -0700118 */
119 boolean endCall();
120
121 /**
Andrew Lee59cac3a2014-08-28 16:50:10 -0700122 * @see TelecommServiceImpl#acceptRingingCall
Santos Cordon9eb45932014-06-27 12:28:43 -0700123 */
124 void acceptRingingCall();
Santos Cordon3c4ff9e2014-07-02 13:20:40 -0700125
126 /**
Andrew Lee59cac3a2014-08-28 16:50:10 -0700127 * @see TelecommServiceImpl#cancelMissedCallsNotification
Santos Cordon3c4ff9e2014-07-02 13:20:40 -0700128 */
129 void cancelMissedCallsNotification();
Santos Cordon0bae09f2014-07-07 14:53:10 -0700130
131 /**
Andrew Lee59cac3a2014-08-28 16:50:10 -0700132 * @see TelecommServiceImpl#handleMmi
Santos Cordon0bae09f2014-07-07 14:53:10 -0700133 */
134 boolean handlePinMmi(String dialString);
Sailesh Nepal001bbbb2014-07-15 14:40:39 -0700135
136 /**
Andrew Lee59cac3a2014-08-28 16:50:10 -0700137 * @see TelecommServiceImpl#isTtySupported
Sailesh Nepal001bbbb2014-07-15 14:40:39 -0700138 */
139 boolean isTtySupported();
140
141 /**
Andrew Lee59cac3a2014-08-28 16:50:10 -0700142 * @see TelecommServiceImpl#getCurrentTtyMode
Sailesh Nepal001bbbb2014-07-15 14:40:39 -0700143 */
144 int getCurrentTtyMode();
Santos Cordon96efb482014-07-19 14:57:05 -0700145
146 /**
Andrew Lee59cac3a2014-08-28 16:50:10 -0700147 * @see TelecommServiceImpl#addNewIncomingCall
Santos Cordon96efb482014-07-19 14:57:05 -0700148 */
149 void addNewIncomingCall(in PhoneAccountHandle phoneAccount, in Bundle extras);
Santos Cordon3afed572014-05-21 15:22:12 -0700150}