blob: 30e4bdc234b0b854e0fd746351dd268a15b2b4ac [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;
Yorke Lee2e024702014-06-13 09:59:43 -070021
Santos Cordon3afed572014-05-21 15:22:12 -070022/**
23 * Interface used to interact with Telecomm. Mostly this is used by TelephonyManager for passing
24 * commands that were previously handled by ITelephony.
25 * {@hide}
26 */
Santos Cordon3534ede2014-05-29 13:07:10 -070027interface ITelecommService {
Santos Cordon3534ede2014-05-29 13:07:10 -070028 /**
29 * Brings the in-call screen to the foreground if there is an active call.
30 *
31 * @param showDialpad if true, make the dialpad visible initially.
32 */
33 void showCallScreen(boolean showDialpad);
Yorke Lee2e024702014-06-13 09:59:43 -070034
35 /**
Ihab Awad9c3f1882014-06-30 21:17:13 -070036 * Gets a list of accounts.
Ihab Awadc35ad022014-06-12 16:29:42 -070037 */
Ihab Awad9c3f1882014-06-30 21:17:13 -070038 List<PhoneAccount> getAccounts();
Ihab Awadc35ad022014-06-12 16:29:42 -070039
40 /**
Ihab Awad9c3f1882014-06-30 21:17:13 -070041 * Sets the enabled state of a given account.
Ihab Awadc35ad022014-06-12 16:29:42 -070042 */
Ihab Awad9c3f1882014-06-30 21:17:13 -070043 void setEnabled(in PhoneAccount account, boolean enabled);
Ihab Awadc35ad022014-06-12 16:29:42 -070044
45 /**
Ihab Awad9c3f1882014-06-30 21:17:13 -070046 * Sets a given account as the system default.
Ihab Awadc35ad022014-06-12 16:29:42 -070047 */
Ihab Awad9c3f1882014-06-30 21:17:13 -070048 void setSystemDefault(in PhoneAccount account);
Santos Cordon6c7a3882014-06-25 15:30:08 -070049
50 /**
51 * Returns the component name of the default phone application.
52 */
53 ComponentName getDefaultPhoneApp();
Santos Cordon9eb45932014-06-27 12:28:43 -070054
55 //
56 // Internal system apis relating to call management.
57 //
58
59 /**
60 * @see TelecommManager#silenceRinger
61 */
62 void silenceRinger();
63
64 /**
65 * @see TelecommManager#isInAPhoneCall
66 */
67 boolean isInAPhoneCall();
68
69 /**
70 * @see TelecomManager#isRinging
71 */
72 boolean isRinging();
73
74 /**
75 * @see TelecommManager#endCall
76 */
77 boolean endCall();
78
79 /**
80 * @see TelecommManager#acceptRingingCall
81 */
82 void acceptRingingCall();
Santos Cordon3c4ff9e2014-07-02 13:20:40 -070083
84 /**
85 * @see PhoneManager#cancelMissedCallsNotification
86 */
87 void cancelMissedCallsNotification();
Santos Cordon0bae09f2014-07-07 14:53:10 -070088
89 /**
90 * @see PhoneManager#handlePinMmi
91 */
92 boolean handlePinMmi(String dialString);
Santos Cordon3afed572014-05-21 15:22:12 -070093}