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