ITelecomService.aidl revision ef9f6f957d897ea0ed82114185b8fa3fefd4917b
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 17package com.android.internal.telecom; 18 19import android.content.ComponentName; 20import android.telecom.PhoneAccountHandle; 21import android.os.Bundle; 22import android.telecom.PhoneAccount; 23 24/** 25 * Interface used to interact with Telecom. Mostly this is used by TelephonyManager for passing 26 * commands that were previously handled by ITelephony. 27 * {@hide} 28 */ 29interface ITelecomService { 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 */ 35 void showInCallScreen(boolean showDialpad); 36 37 /** 38 * @see TelecomServiceImpl#getDefaultOutgoingPhoneAccount 39 */ 40 PhoneAccountHandle getDefaultOutgoingPhoneAccount(in String uriScheme); 41 42 /** 43 * @see TelecomServiceImpl#getUserSelectedOutgoingPhoneAccount 44 */ 45 PhoneAccountHandle getUserSelectedOutgoingPhoneAccount(); 46 47 /** 48 * @see TelecomServiceImpl#setUserSelectedOutgoingPhoneAccount 49 */ 50 void setUserSelectedOutgoingPhoneAccount(in PhoneAccountHandle account); 51 52 /** 53 * @see TelecomServiceImpl#getEnabledPhoneAccounts 54 */ 55 List<PhoneAccountHandle> getEnabledPhoneAccounts(); 56 57 /** 58 * @see TelecomManager#getPhoneAccountsSupportingScheme 59 */ 60 List<PhoneAccountHandle> getPhoneAccountsSupportingScheme(in String uriScheme); 61 62 /** 63 * @see TelecomManager#getPhoneAccount 64 */ 65 PhoneAccount getPhoneAccount(in PhoneAccountHandle account); 66 67 /** 68 * @see TelecomManager#getAllPhoneAccountsCount 69 */ 70 int getAllPhoneAccountsCount(); 71 72 /** 73 * @see TelecomManager#getAllPhoneAccounts 74 */ 75 List<PhoneAccount> getAllPhoneAccounts(); 76 77 /** 78 * @see TelecomManager#getAllPhoneAccountHandles 79 */ 80 List<PhoneAccountHandle> getAllPhoneAccountHandles(); 81 82 /** 83 * @see TelecomServiceImpl#getSimCallManager 84 */ 85 PhoneAccountHandle getSimCallManager(); 86 87 /** 88 * @see TelecomServiceImpl#setSimCallManager 89 */ 90 void setSimCallManager(in PhoneAccountHandle account); 91 92 /** 93 * @see TelecomServiceImpl#getSimCallManagers 94 */ 95 List<PhoneAccountHandle> getSimCallManagers(); 96 97 /** 98 * @see TelecomServiceImpl#setPhoneAccountEnabled 99 */ 100 void setPhoneAccountEnabled(in PhoneAccountHandle account, in boolean isEnabled); 101 102 /** 103 * @see TelecomServiceImpl#registerPhoneAccount 104 */ 105 void registerPhoneAccount(in PhoneAccount metadata); 106 107 /** 108 * @see TelecomServiceImpl#unregisterPhoneAccount 109 */ 110 void unregisterPhoneAccount(in PhoneAccountHandle account); 111 112 /** 113 * @see TelecomServiceImpl#clearAccounts 114 */ 115 void clearAccounts(String packageName); 116 117 /** 118 * @see TelecomServiceImpl#getDefaultPhoneApp 119 */ 120 ComponentName getDefaultPhoneApp(); 121 122 // 123 // Internal system apis relating to call management. 124 // 125 126 /** 127 * @see TelecomServiceImpl#silenceRinger 128 */ 129 void silenceRinger(); 130 131 /** 132 * @see TelecomServiceImpl#isInCall 133 */ 134 boolean isInCall(); 135 136 /** 137 * @see TelecomServiceImpl#isRinging 138 */ 139 boolean isRinging(); 140 141 /** 142 * @see TelecomServiceImpl#endCall 143 */ 144 boolean endCall(); 145 146 /** 147 * @see TelecomServiceImpl#acceptRingingCall 148 */ 149 void acceptRingingCall(); 150 151 /** 152 * @see TelecomServiceImpl#cancelMissedCallsNotification 153 */ 154 void cancelMissedCallsNotification(); 155 156 /** 157 * @see TelecomServiceImpl#handleMmi 158 */ 159 boolean handlePinMmi(String dialString); 160 161 /** 162 * @see TelecomServiceImpl#isTtySupported 163 */ 164 boolean isTtySupported(); 165 166 /** 167 * @see TelecomServiceImpl#getCurrentTtyMode 168 */ 169 int getCurrentTtyMode(); 170 171 /** 172 * @see TelecomServiceImpl#addNewIncomingCall 173 */ 174 void addNewIncomingCall(in PhoneAccountHandle phoneAccount, in Bundle extras); 175} 176