blob: 43caa1e7e18d448fd0ca3972d3408422148cdcfb [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;
Ihab Awad9c3f1882014-06-30 21:17:13 -070020import android.telecomm.PhoneAccount;
Ihab Awad807fe0a2014-07-09 12:30:52 -070021import android.telecomm.PhoneAccountMetadata;
Yorke Lee2e024702014-06-13 09:59:43 -070022
Santos Cordon3afed572014-05-21 15:22:12 -070023/**
24 * Interface used to interact with Telecomm. Mostly this is used by TelephonyManager for passing
25 * commands that were previously handled by ITelephony.
26 * {@hide}
27 */
Santos Cordon3534ede2014-05-29 13:07:10 -070028interface ITelecommService {
Santos Cordon3534ede2014-05-29 13:07:10 -070029 /**
30 * Brings the in-call screen to the foreground if there is an active call.
31 *
32 * @param showDialpad if true, make the dialpad visible initially.
33 */
34 void showCallScreen(boolean showDialpad);
Yorke Lee2e024702014-06-13 09:59:43 -070035
36 /**
Ihab Awad807fe0a2014-07-09 12:30:52 -070037 * @see TelecommManager#getEnabledPhoneAccounts
Ihab Awadc35ad022014-06-12 16:29:42 -070038 */
Ihab Awad807fe0a2014-07-09 12:30:52 -070039 List<PhoneAccount> getEnabledPhoneAccounts();
Ihab Awadc35ad022014-06-12 16:29:42 -070040
41 /**
Ihab Awad807fe0a2014-07-09 12:30:52 -070042 * @see TelecommManager#getPhoneAccountMetadata
Ihab Awadc35ad022014-06-12 16:29:42 -070043 */
Ihab Awad807fe0a2014-07-09 12:30:52 -070044 PhoneAccountMetadata getPhoneAccountMetadata(in PhoneAccount account);
Ihab Awadc35ad022014-06-12 16:29:42 -070045
46 /**
Ihab Awad807fe0a2014-07-09 12:30:52 -070047 * @see TelecommManager#registerPhoneAccount
Ihab Awadc35ad022014-06-12 16:29:42 -070048 */
Ihab Awad807fe0a2014-07-09 12:30:52 -070049 void registerPhoneAccount(in PhoneAccount account, in PhoneAccountMetadata metadata);
Santos Cordon6c7a3882014-06-25 15:30:08 -070050
51 /**
Ihab Awad807fe0a2014-07-09 12:30:52 -070052 * @see TelecommManager#unregisterPhoneAccount
53 */
54 void unregisterPhoneAccount(in PhoneAccount account);
55
56 /**
57 * @see TelecommManager#clearAccounts
58 */
59 void clearAccounts(String packageName);
60
61 /**
62 * @see TelecommManager#getDefaultPhoneApp
Santos Cordon6c7a3882014-06-25 15:30:08 -070063 */
64 ComponentName getDefaultPhoneApp();
Santos Cordon9eb45932014-06-27 12:28:43 -070065
66 //
67 // Internal system apis relating to call management.
68 //
69
70 /**
71 * @see TelecommManager#silenceRinger
72 */
73 void silenceRinger();
74
75 /**
76 * @see TelecommManager#isInAPhoneCall
77 */
78 boolean isInAPhoneCall();
79
80 /**
81 * @see TelecomManager#isRinging
82 */
83 boolean isRinging();
84
85 /**
86 * @see TelecommManager#endCall
87 */
88 boolean endCall();
89
90 /**
91 * @see TelecommManager#acceptRingingCall
92 */
93 void acceptRingingCall();
Santos Cordon3c4ff9e2014-07-02 13:20:40 -070094
95 /**
96 * @see PhoneManager#cancelMissedCallsNotification
97 */
98 void cancelMissedCallsNotification();
Santos Cordon0bae09f2014-07-07 14:53:10 -070099
100 /**
101 * @see PhoneManager#handlePinMmi
102 */
103 boolean handlePinMmi(String dialString);
Sailesh Nepal001bbbb2014-07-15 14:40:39 -0700104
105 /**
106 * @see TelecomManager#isTtySupported
107 */
108 boolean isTtySupported();
109
110 /**
111 * @see TelecomManager#getCurrentTtyMode
112 */
113 int getCurrentTtyMode();
Santos Cordon3afed572014-05-21 15:22:12 -0700114}