blob: 4875cc3fd66086544e382c8f5aca3746874f54d2 [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;
Santos Cordon96efb482014-07-19 14:57:05 -070021import android.os.Bundle;
Tyler Gunnef9f6f92014-09-12 22:16:17 -070022import android.telecom.PhoneAccount;
Yorke Lee2e024702014-06-13 09:59:43 -070023
Santos Cordon3afed572014-05-21 15:22:12 -070024/**
Tyler Gunnef9f6f92014-09-12 22:16:17 -070025 * Interface used to interact with Telecom. Mostly this is used by TelephonyManager for passing
Santos Cordon3afed572014-05-21 15:22:12 -070026 * commands that were previously handled by ITelephony.
27 * {@hide}
28 */
Tyler Gunnef9f6f92014-09-12 22:16:17 -070029interface ITelecomService {
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 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -070038 * @see TelecomServiceImpl#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 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -070043 * @see TelecomServiceImpl#getUserSelectedOutgoingPhoneAccount
Andrew Lee59cac3a2014-08-28 16:50:10 -070044 */
Andrew Leed4abbfb2014-09-03 14:58:27 -070045 PhoneAccountHandle getUserSelectedOutgoingPhoneAccount();
46
47 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -070048 * @see TelecomServiceImpl#setUserSelectedOutgoingPhoneAccount
Andrew Leed4abbfb2014-09-03 14:58:27 -070049 */
50 void setUserSelectedOutgoingPhoneAccount(in PhoneAccountHandle account);
Andrew Lee59cac3a2014-08-28 16:50:10 -070051
52 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -070053 * @see TelecomServiceImpl#getEnabledPhoneAccounts
Ihab Awadc35ad022014-06-12 16:29:42 -070054 */
Tyler Gunna1ed7d12014-09-08 09:52:22 -070055 List<PhoneAccountHandle> getEnabledPhoneAccounts();
Ihab Awadc35ad022014-06-12 16:29:42 -070056
57 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -070058 * @see TelecomManager#getPhoneAccountsSupportingScheme
Tyler Gunnf5b29dc2014-09-03 09:09:12 -070059 */
60 List<PhoneAccountHandle> getPhoneAccountsSupportingScheme(in String uriScheme);
61
62 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -070063 * @see TelecomManager#getPhoneAccount
Ihab Awadc35ad022014-06-12 16:29:42 -070064 */
Evan Charlton8c8a0622014-07-20 12:31:00 -070065 PhoneAccount getPhoneAccount(in PhoneAccountHandle account);
Ihab Awadc35ad022014-06-12 16:29:42 -070066
67 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -070068 * @see TelecomManager#getAllPhoneAccountsCount
Tyler Gunna1ed7d12014-09-08 09:52:22 -070069 */
70 int getAllPhoneAccountsCount();
71
72 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -070073 * @see TelecomManager#getAllPhoneAccounts
Tyler Gunna1ed7d12014-09-08 09:52:22 -070074 */
75 List<PhoneAccount> getAllPhoneAccounts();
76
77 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -070078 * @see TelecomManager#getAllPhoneAccountHandles
Tyler Gunna1ed7d12014-09-08 09:52:22 -070079 */
80 List<PhoneAccountHandle> getAllPhoneAccountHandles();
81
82 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -070083 * @see TelecomServiceImpl#getSimCallManager
Andrew Lee59cac3a2014-08-28 16:50:10 -070084 */
85 PhoneAccountHandle getSimCallManager();
86
87 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -070088 * @see TelecomServiceImpl#setSimCallManager
Andrew Lee59cac3a2014-08-28 16:50:10 -070089 */
90 void setSimCallManager(in PhoneAccountHandle account);
91
92 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -070093 * @see TelecomServiceImpl#getSimCallManagers
Andrew Lee59cac3a2014-08-28 16:50:10 -070094 */
95 List<PhoneAccountHandle> getSimCallManagers();
96
97 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -070098 * @see TelecomServiceImpl#setPhoneAccountEnabled
Tyler Gunna1ed7d12014-09-08 09:52:22 -070099 */
100 void setPhoneAccountEnabled(in PhoneAccountHandle account, in boolean isEnabled);
101
102 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700103 * @see TelecomServiceImpl#registerPhoneAccount
Ihab Awadc35ad022014-06-12 16:29:42 -0700104 */
Evan Charlton8c8a0622014-07-20 12:31:00 -0700105 void registerPhoneAccount(in PhoneAccount metadata);
Santos Cordon6c7a3882014-06-25 15:30:08 -0700106
107 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700108 * @see TelecomServiceImpl#unregisterPhoneAccount
Ihab Awad807fe0a2014-07-09 12:30:52 -0700109 */
Evan Charlton6eb262c2014-07-19 18:18:19 -0700110 void unregisterPhoneAccount(in PhoneAccountHandle account);
Ihab Awad807fe0a2014-07-09 12:30:52 -0700111
112 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700113 * @see TelecomServiceImpl#clearAccounts
Ihab Awad807fe0a2014-07-09 12:30:52 -0700114 */
115 void clearAccounts(String packageName);
116
117 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700118 * @see TelecomServiceImpl#getDefaultPhoneApp
Santos Cordon6c7a3882014-06-25 15:30:08 -0700119 */
120 ComponentName getDefaultPhoneApp();
Santos Cordon9eb45932014-06-27 12:28:43 -0700121
122 //
123 // Internal system apis relating to call management.
124 //
125
126 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700127 * @see TelecomServiceImpl#silenceRinger
Santos Cordon9eb45932014-06-27 12:28:43 -0700128 */
129 void silenceRinger();
130
131 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700132 * @see TelecomServiceImpl#isInCall
Santos Cordon9eb45932014-06-27 12:28:43 -0700133 */
Nancy Chen0eb1e402014-08-21 22:52:29 -0700134 boolean isInCall();
Santos Cordon9eb45932014-06-27 12:28:43 -0700135
136 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700137 * @see TelecomServiceImpl#isRinging
Santos Cordon9eb45932014-06-27 12:28:43 -0700138 */
139 boolean isRinging();
140
141 /**
Yorke Lee2ae312e2014-09-12 17:58:48 -0700142 * @see TelecomServiceImpl#getCallState
143 */
144 int getCallState();
145
146 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700147 * @see TelecomServiceImpl#endCall
Santos Cordon9eb45932014-06-27 12:28:43 -0700148 */
149 boolean endCall();
150
151 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700152 * @see TelecomServiceImpl#acceptRingingCall
Santos Cordon9eb45932014-06-27 12:28:43 -0700153 */
154 void acceptRingingCall();
Santos Cordon3c4ff9e2014-07-02 13:20:40 -0700155
156 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700157 * @see TelecomServiceImpl#cancelMissedCallsNotification
Santos Cordon3c4ff9e2014-07-02 13:20:40 -0700158 */
159 void cancelMissedCallsNotification();
Santos Cordon0bae09f2014-07-07 14:53:10 -0700160
161 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700162 * @see TelecomServiceImpl#handleMmi
Santos Cordon0bae09f2014-07-07 14:53:10 -0700163 */
164 boolean handlePinMmi(String dialString);
Sailesh Nepal001bbbb2014-07-15 14:40:39 -0700165
166 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700167 * @see TelecomServiceImpl#isTtySupported
Sailesh Nepal001bbbb2014-07-15 14:40:39 -0700168 */
169 boolean isTtySupported();
170
171 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700172 * @see TelecomServiceImpl#getCurrentTtyMode
Sailesh Nepal001bbbb2014-07-15 14:40:39 -0700173 */
174 int getCurrentTtyMode();
Santos Cordon96efb482014-07-19 14:57:05 -0700175
176 /**
Tyler Gunnef9f6f92014-09-12 22:16:17 -0700177 * @see TelecomServiceImpl#addNewIncomingCall
Santos Cordon96efb482014-07-19 14:57:05 -0700178 */
179 void addNewIncomingCall(in PhoneAccountHandle phoneAccount, in Bundle extras);
Santos Cordon3afed572014-05-21 15:22:12 -0700180}