Santos Cordon | 3afed57 | 2014-05-21 15:22:12 -0700 | [diff] [blame] | 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 | |
Tyler Gunn | ef9f6f9 | 2014-09-12 22:16:17 -0700 | [diff] [blame] | 17 | package com.android.internal.telecom; |
Santos Cordon | 3afed57 | 2014-05-21 15:22:12 -0700 | [diff] [blame] | 18 | |
Santos Cordon | 6c7a388 | 2014-06-25 15:30:08 -0700 | [diff] [blame] | 19 | import android.content.ComponentName; |
Tyler Gunn | ef9f6f9 | 2014-09-12 22:16:17 -0700 | [diff] [blame] | 20 | import android.telecom.PhoneAccountHandle; |
Nancy Chen | b2299c1 | 2014-10-29 18:22:11 -0700 | [diff] [blame] | 21 | import android.net.Uri; |
Santos Cordon | 96efb48 | 2014-07-19 14:57:05 -0700 | [diff] [blame] | 22 | import android.os.Bundle; |
Tyler Gunn | ef9f6f9 | 2014-09-12 22:16:17 -0700 | [diff] [blame] | 23 | import android.telecom.PhoneAccount; |
Yorke Lee | 2e02470 | 2014-06-13 09:59:43 -0700 | [diff] [blame] | 24 | |
Santos Cordon | 3afed57 | 2014-05-21 15:22:12 -0700 | [diff] [blame] | 25 | /** |
Tyler Gunn | ef9f6f9 | 2014-09-12 22:16:17 -0700 | [diff] [blame] | 26 | * Interface used to interact with Telecom. Mostly this is used by TelephonyManager for passing |
Santos Cordon | 3afed57 | 2014-05-21 15:22:12 -0700 | [diff] [blame] | 27 | * commands that were previously handled by ITelephony. |
| 28 | * {@hide} |
| 29 | */ |
Tyler Gunn | ef9f6f9 | 2014-09-12 22:16:17 -0700 | [diff] [blame] | 30 | interface ITelecomService { |
Santos Cordon | 3534ede | 2014-05-29 13:07:10 -0700 | [diff] [blame] | 31 | /** |
| 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 Chen | 0eb1e40 | 2014-08-21 22:52:29 -0700 | [diff] [blame] | 36 | void showInCallScreen(boolean showDialpad); |
Yorke Lee | 2e02470 | 2014-06-13 09:59:43 -0700 | [diff] [blame] | 37 | |
| 38 | /** |
Tyler Gunn | ef9f6f9 | 2014-09-12 22:16:17 -0700 | [diff] [blame] | 39 | * @see TelecomServiceImpl#getDefaultOutgoingPhoneAccount |
Ihab Awad | 94cf4bf | 2014-07-17 11:21:19 -0700 | [diff] [blame] | 40 | */ |
Tyler Gunn | f5b29dc | 2014-09-03 09:09:12 -0700 | [diff] [blame] | 41 | PhoneAccountHandle getDefaultOutgoingPhoneAccount(in String uriScheme); |
Ihab Awad | 94cf4bf | 2014-07-17 11:21:19 -0700 | [diff] [blame] | 42 | |
| 43 | /** |
Tyler Gunn | ef9f6f9 | 2014-09-12 22:16:17 -0700 | [diff] [blame] | 44 | * @see TelecomServiceImpl#getUserSelectedOutgoingPhoneAccount |
Andrew Lee | 59cac3a | 2014-08-28 16:50:10 -0700 | [diff] [blame] | 45 | */ |
Andrew Lee | d4abbfb | 2014-09-03 14:58:27 -0700 | [diff] [blame] | 46 | PhoneAccountHandle getUserSelectedOutgoingPhoneAccount(); |
| 47 | |
| 48 | /** |
Tyler Gunn | ef9f6f9 | 2014-09-12 22:16:17 -0700 | [diff] [blame] | 49 | * @see TelecomServiceImpl#setUserSelectedOutgoingPhoneAccount |
Andrew Lee | d4abbfb | 2014-09-03 14:58:27 -0700 | [diff] [blame] | 50 | */ |
| 51 | void setUserSelectedOutgoingPhoneAccount(in PhoneAccountHandle account); |
Andrew Lee | 59cac3a | 2014-08-28 16:50:10 -0700 | [diff] [blame] | 52 | |
| 53 | /** |
Nancy Chen | 210ef03 | 2014-09-15 17:58:42 -0700 | [diff] [blame] | 54 | * @see TelecomServiceImpl#getCallCapablePhoneAccounts |
Ihab Awad | c35ad02 | 2014-06-12 16:29:42 -0700 | [diff] [blame] | 55 | */ |
Nancy Chen | 210ef03 | 2014-09-15 17:58:42 -0700 | [diff] [blame] | 56 | List<PhoneAccountHandle> getCallCapablePhoneAccounts(); |
Ihab Awad | c35ad02 | 2014-06-12 16:29:42 -0700 | [diff] [blame] | 57 | |
| 58 | /** |
Tyler Gunn | ef9f6f9 | 2014-09-12 22:16:17 -0700 | [diff] [blame] | 59 | * @see TelecomManager#getPhoneAccountsSupportingScheme |
Tyler Gunn | f5b29dc | 2014-09-03 09:09:12 -0700 | [diff] [blame] | 60 | */ |
| 61 | List<PhoneAccountHandle> getPhoneAccountsSupportingScheme(in String uriScheme); |
| 62 | |
| 63 | /** |
Nancy Chen | 513c892 | 2014-09-17 14:47:20 -0700 | [diff] [blame] | 64 | * @see TelecomManager#getPhoneAccountsForPackage |
| 65 | */ |
| 66 | List<PhoneAccountHandle> getPhoneAccountsForPackage(in String packageName); |
| 67 | |
| 68 | /** |
Tyler Gunn | ef9f6f9 | 2014-09-12 22:16:17 -0700 | [diff] [blame] | 69 | * @see TelecomManager#getPhoneAccount |
Ihab Awad | c35ad02 | 2014-06-12 16:29:42 -0700 | [diff] [blame] | 70 | */ |
Evan Charlton | 8c8a062 | 2014-07-20 12:31:00 -0700 | [diff] [blame] | 71 | PhoneAccount getPhoneAccount(in PhoneAccountHandle account); |
Ihab Awad | c35ad02 | 2014-06-12 16:29:42 -0700 | [diff] [blame] | 72 | |
| 73 | /** |
Tyler Gunn | ef9f6f9 | 2014-09-12 22:16:17 -0700 | [diff] [blame] | 74 | * @see TelecomManager#getAllPhoneAccountsCount |
Tyler Gunn | a1ed7d1 | 2014-09-08 09:52:22 -0700 | [diff] [blame] | 75 | */ |
| 76 | int getAllPhoneAccountsCount(); |
| 77 | |
| 78 | /** |
Tyler Gunn | ef9f6f9 | 2014-09-12 22:16:17 -0700 | [diff] [blame] | 79 | * @see TelecomManager#getAllPhoneAccounts |
Tyler Gunn | a1ed7d1 | 2014-09-08 09:52:22 -0700 | [diff] [blame] | 80 | */ |
| 81 | List<PhoneAccount> getAllPhoneAccounts(); |
| 82 | |
| 83 | /** |
Tyler Gunn | ef9f6f9 | 2014-09-12 22:16:17 -0700 | [diff] [blame] | 84 | * @see TelecomManager#getAllPhoneAccountHandles |
Tyler Gunn | a1ed7d1 | 2014-09-08 09:52:22 -0700 | [diff] [blame] | 85 | */ |
| 86 | List<PhoneAccountHandle> getAllPhoneAccountHandles(); |
| 87 | |
| 88 | /** |
Tyler Gunn | ef9f6f9 | 2014-09-12 22:16:17 -0700 | [diff] [blame] | 89 | * @see TelecomServiceImpl#getSimCallManager |
Andrew Lee | 59cac3a | 2014-08-28 16:50:10 -0700 | [diff] [blame] | 90 | */ |
| 91 | PhoneAccountHandle getSimCallManager(); |
| 92 | |
| 93 | /** |
Tyler Gunn | ef9f6f9 | 2014-09-12 22:16:17 -0700 | [diff] [blame] | 94 | * @see TelecomServiceImpl#setSimCallManager |
Andrew Lee | 59cac3a | 2014-08-28 16:50:10 -0700 | [diff] [blame] | 95 | */ |
| 96 | void setSimCallManager(in PhoneAccountHandle account); |
| 97 | |
| 98 | /** |
Tyler Gunn | ef9f6f9 | 2014-09-12 22:16:17 -0700 | [diff] [blame] | 99 | * @see TelecomServiceImpl#getSimCallManagers |
Andrew Lee | 59cac3a | 2014-08-28 16:50:10 -0700 | [diff] [blame] | 100 | */ |
| 101 | List<PhoneAccountHandle> getSimCallManagers(); |
| 102 | |
| 103 | /** |
Tyler Gunn | ef9f6f9 | 2014-09-12 22:16:17 -0700 | [diff] [blame] | 104 | * @see TelecomServiceImpl#registerPhoneAccount |
Ihab Awad | c35ad02 | 2014-06-12 16:29:42 -0700 | [diff] [blame] | 105 | */ |
Evan Charlton | 8c8a062 | 2014-07-20 12:31:00 -0700 | [diff] [blame] | 106 | void registerPhoneAccount(in PhoneAccount metadata); |
Santos Cordon | 6c7a388 | 2014-06-25 15:30:08 -0700 | [diff] [blame] | 107 | |
| 108 | /** |
Tyler Gunn | ef9f6f9 | 2014-09-12 22:16:17 -0700 | [diff] [blame] | 109 | * @see TelecomServiceImpl#unregisterPhoneAccount |
Ihab Awad | 807fe0a | 2014-07-09 12:30:52 -0700 | [diff] [blame] | 110 | */ |
Evan Charlton | 6eb262c | 2014-07-19 18:18:19 -0700 | [diff] [blame] | 111 | void unregisterPhoneAccount(in PhoneAccountHandle account); |
Ihab Awad | 807fe0a | 2014-07-09 12:30:52 -0700 | [diff] [blame] | 112 | |
| 113 | /** |
Tyler Gunn | ef9f6f9 | 2014-09-12 22:16:17 -0700 | [diff] [blame] | 114 | * @see TelecomServiceImpl#clearAccounts |
Ihab Awad | 807fe0a | 2014-07-09 12:30:52 -0700 | [diff] [blame] | 115 | */ |
| 116 | void clearAccounts(String packageName); |
| 117 | |
| 118 | /** |
Nancy Chen | 443e501 | 2014-10-15 15:48:21 -0700 | [diff] [blame] | 119 | * @see TelecomServiceImpl#isVoiceMailNumber |
| 120 | */ |
| 121 | boolean isVoiceMailNumber(in PhoneAccountHandle accountHandle, String number); |
| 122 | |
| 123 | /** |
Nancy Chen | 8c066f7 | 2014-12-03 15:18:08 -0800 | [diff] [blame] | 124 | * @see TelecomServiceImpl#hasVoiceMailNumber |
| 125 | */ |
| 126 | boolean hasVoiceMailNumber(in PhoneAccountHandle accountHandle); |
| 127 | |
| 128 | /** |
Nancy Chen | 5cf2784 | 2015-01-24 23:30:27 -0800 | [diff] [blame^] | 129 | * @see TelecomServiceImpl#getLine1Number |
| 130 | */ |
| 131 | String getLine1Number(in PhoneAccountHandle accountHandle); |
| 132 | |
| 133 | /** |
Tyler Gunn | ef9f6f9 | 2014-09-12 22:16:17 -0700 | [diff] [blame] | 134 | * @see TelecomServiceImpl#getDefaultPhoneApp |
Santos Cordon | 6c7a388 | 2014-06-25 15:30:08 -0700 | [diff] [blame] | 135 | */ |
| 136 | ComponentName getDefaultPhoneApp(); |
Santos Cordon | 9eb4593 | 2014-06-27 12:28:43 -0700 | [diff] [blame] | 137 | |
| 138 | // |
| 139 | // Internal system apis relating to call management. |
| 140 | // |
| 141 | |
| 142 | /** |
Tyler Gunn | ef9f6f9 | 2014-09-12 22:16:17 -0700 | [diff] [blame] | 143 | * @see TelecomServiceImpl#silenceRinger |
Santos Cordon | 9eb4593 | 2014-06-27 12:28:43 -0700 | [diff] [blame] | 144 | */ |
| 145 | void silenceRinger(); |
| 146 | |
| 147 | /** |
Tyler Gunn | ef9f6f9 | 2014-09-12 22:16:17 -0700 | [diff] [blame] | 148 | * @see TelecomServiceImpl#isInCall |
Santos Cordon | 9eb4593 | 2014-06-27 12:28:43 -0700 | [diff] [blame] | 149 | */ |
Nancy Chen | 0eb1e40 | 2014-08-21 22:52:29 -0700 | [diff] [blame] | 150 | boolean isInCall(); |
Santos Cordon | 9eb4593 | 2014-06-27 12:28:43 -0700 | [diff] [blame] | 151 | |
| 152 | /** |
Tyler Gunn | ef9f6f9 | 2014-09-12 22:16:17 -0700 | [diff] [blame] | 153 | * @see TelecomServiceImpl#isRinging |
Santos Cordon | 9eb4593 | 2014-06-27 12:28:43 -0700 | [diff] [blame] | 154 | */ |
| 155 | boolean isRinging(); |
| 156 | |
| 157 | /** |
Yorke Lee | 2ae312e | 2014-09-12 17:58:48 -0700 | [diff] [blame] | 158 | * @see TelecomServiceImpl#getCallState |
| 159 | */ |
| 160 | int getCallState(); |
| 161 | |
| 162 | /** |
Tyler Gunn | ef9f6f9 | 2014-09-12 22:16:17 -0700 | [diff] [blame] | 163 | * @see TelecomServiceImpl#endCall |
Santos Cordon | 9eb4593 | 2014-06-27 12:28:43 -0700 | [diff] [blame] | 164 | */ |
| 165 | boolean endCall(); |
| 166 | |
| 167 | /** |
Tyler Gunn | ef9f6f9 | 2014-09-12 22:16:17 -0700 | [diff] [blame] | 168 | * @see TelecomServiceImpl#acceptRingingCall |
Santos Cordon | 9eb4593 | 2014-06-27 12:28:43 -0700 | [diff] [blame] | 169 | */ |
| 170 | void acceptRingingCall(); |
Santos Cordon | 3c4ff9e | 2014-07-02 13:20:40 -0700 | [diff] [blame] | 171 | |
| 172 | /** |
Tyler Gunn | ef9f6f9 | 2014-09-12 22:16:17 -0700 | [diff] [blame] | 173 | * @see TelecomServiceImpl#cancelMissedCallsNotification |
Santos Cordon | 3c4ff9e | 2014-07-02 13:20:40 -0700 | [diff] [blame] | 174 | */ |
| 175 | void cancelMissedCallsNotification(); |
Santos Cordon | 0bae09f | 2014-07-07 14:53:10 -0700 | [diff] [blame] | 176 | |
| 177 | /** |
Tyler Gunn | ef9f6f9 | 2014-09-12 22:16:17 -0700 | [diff] [blame] | 178 | * @see TelecomServiceImpl#handleMmi |
Santos Cordon | 0bae09f | 2014-07-07 14:53:10 -0700 | [diff] [blame] | 179 | */ |
| 180 | boolean handlePinMmi(String dialString); |
Sailesh Nepal | 001bbbb | 2014-07-15 14:40:39 -0700 | [diff] [blame] | 181 | |
| 182 | /** |
Nancy Chen | 95e8a67 | 2014-10-16 18:38:21 -0700 | [diff] [blame] | 183 | * @see TelecomServiceImpl#handleMmi |
| 184 | */ |
| 185 | boolean handlePinMmiForPhoneAccount(in PhoneAccountHandle accountHandle, String dialString); |
| 186 | |
| 187 | /** |
Nancy Chen | b2299c1 | 2014-10-29 18:22:11 -0700 | [diff] [blame] | 188 | * @see TelecomServiceImpl#getAdnUriForPhoneAccount |
| 189 | */ |
| 190 | Uri getAdnUriForPhoneAccount(in PhoneAccountHandle accountHandle); |
| 191 | |
| 192 | /** |
Tyler Gunn | ef9f6f9 | 2014-09-12 22:16:17 -0700 | [diff] [blame] | 193 | * @see TelecomServiceImpl#isTtySupported |
Sailesh Nepal | 001bbbb | 2014-07-15 14:40:39 -0700 | [diff] [blame] | 194 | */ |
| 195 | boolean isTtySupported(); |
| 196 | |
| 197 | /** |
Tyler Gunn | ef9f6f9 | 2014-09-12 22:16:17 -0700 | [diff] [blame] | 198 | * @see TelecomServiceImpl#getCurrentTtyMode |
Sailesh Nepal | 001bbbb | 2014-07-15 14:40:39 -0700 | [diff] [blame] | 199 | */ |
| 200 | int getCurrentTtyMode(); |
Santos Cordon | 96efb48 | 2014-07-19 14:57:05 -0700 | [diff] [blame] | 201 | |
| 202 | /** |
Tyler Gunn | ef9f6f9 | 2014-09-12 22:16:17 -0700 | [diff] [blame] | 203 | * @see TelecomServiceImpl#addNewIncomingCall |
Santos Cordon | 96efb48 | 2014-07-19 14:57:05 -0700 | [diff] [blame] | 204 | */ |
| 205 | void addNewIncomingCall(in PhoneAccountHandle phoneAccount, in Bundle extras); |
Yorke Lee | c3cf982 | 2014-10-02 09:38:39 -0700 | [diff] [blame] | 206 | |
| 207 | /** |
| 208 | * @see TelecomServiceImpl#addNewUnknownCall |
| 209 | */ |
| 210 | void addNewUnknownCall(in PhoneAccountHandle phoneAccount, in Bundle extras); |
Santos Cordon | 3afed57 | 2014-05-21 15:22:12 -0700 | [diff] [blame] | 211 | } |