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 | |
| 17 | package com.android.internal.telecomm; |
| 18 | |
Santos Cordon | 6c7a388 | 2014-06-25 15:30:08 -0700 | [diff] [blame] | 19 | import android.content.ComponentName; |
Ihab Awad | 9c3f188 | 2014-06-30 21:17:13 -0700 | [diff] [blame] | 20 | import android.telecomm.PhoneAccount; |
Ihab Awad | 807fe0a | 2014-07-09 12:30:52 -0700 | [diff] [blame] | 21 | import android.telecomm.PhoneAccountMetadata; |
Yorke Lee | 2e02470 | 2014-06-13 09:59:43 -0700 | [diff] [blame] | 22 | |
Santos Cordon | 3afed57 | 2014-05-21 15:22:12 -0700 | [diff] [blame] | 23 | /** |
| 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 Cordon | 3534ede | 2014-05-29 13:07:10 -0700 | [diff] [blame] | 28 | interface ITelecommService { |
Santos Cordon | 3534ede | 2014-05-29 13:07:10 -0700 | [diff] [blame] | 29 | /** |
| 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 Lee | 2e02470 | 2014-06-13 09:59:43 -0700 | [diff] [blame] | 35 | |
| 36 | /** |
Ihab Awad | 807fe0a | 2014-07-09 12:30:52 -0700 | [diff] [blame] | 37 | * @see TelecommManager#getEnabledPhoneAccounts |
Ihab Awad | c35ad02 | 2014-06-12 16:29:42 -0700 | [diff] [blame] | 38 | */ |
Ihab Awad | 807fe0a | 2014-07-09 12:30:52 -0700 | [diff] [blame] | 39 | List<PhoneAccount> getEnabledPhoneAccounts(); |
Ihab Awad | c35ad02 | 2014-06-12 16:29:42 -0700 | [diff] [blame] | 40 | |
| 41 | /** |
Ihab Awad | 807fe0a | 2014-07-09 12:30:52 -0700 | [diff] [blame] | 42 | * @see TelecommManager#getPhoneAccountMetadata |
Ihab Awad | c35ad02 | 2014-06-12 16:29:42 -0700 | [diff] [blame] | 43 | */ |
Ihab Awad | 807fe0a | 2014-07-09 12:30:52 -0700 | [diff] [blame] | 44 | PhoneAccountMetadata getPhoneAccountMetadata(in PhoneAccount account); |
Ihab Awad | c35ad02 | 2014-06-12 16:29:42 -0700 | [diff] [blame] | 45 | |
| 46 | /** |
Ihab Awad | 807fe0a | 2014-07-09 12:30:52 -0700 | [diff] [blame] | 47 | * @see TelecommManager#registerPhoneAccount |
Ihab Awad | c35ad02 | 2014-06-12 16:29:42 -0700 | [diff] [blame] | 48 | */ |
Ihab Awad | 807fe0a | 2014-07-09 12:30:52 -0700 | [diff] [blame] | 49 | void registerPhoneAccount(in PhoneAccount account, in PhoneAccountMetadata metadata); |
Santos Cordon | 6c7a388 | 2014-06-25 15:30:08 -0700 | [diff] [blame] | 50 | |
| 51 | /** |
Ihab Awad | 807fe0a | 2014-07-09 12:30:52 -0700 | [diff] [blame] | 52 | * @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 Cordon | 6c7a388 | 2014-06-25 15:30:08 -0700 | [diff] [blame] | 63 | */ |
| 64 | ComponentName getDefaultPhoneApp(); |
Santos Cordon | 9eb4593 | 2014-06-27 12:28:43 -0700 | [diff] [blame] | 65 | |
| 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 Cordon | 3c4ff9e | 2014-07-02 13:20:40 -0700 | [diff] [blame] | 94 | |
| 95 | /** |
| 96 | * @see PhoneManager#cancelMissedCallsNotification |
| 97 | */ |
| 98 | void cancelMissedCallsNotification(); |
Santos Cordon | 0bae09f | 2014-07-07 14:53:10 -0700 | [diff] [blame] | 99 | |
| 100 | /** |
| 101 | * @see PhoneManager#handlePinMmi |
| 102 | */ |
| 103 | boolean handlePinMmi(String dialString); |
Sailesh Nepal | 001bbbb | 2014-07-15 14:40:39 -0700 | [diff] [blame^] | 104 | |
| 105 | /** |
| 106 | * @see TelecomManager#isTtySupported |
| 107 | */ |
| 108 | boolean isTtySupported(); |
| 109 | |
| 110 | /** |
| 111 | * @see TelecomManager#getCurrentTtyMode |
| 112 | */ |
| 113 | int getCurrentTtyMode(); |
Santos Cordon | 3afed57 | 2014-05-21 15:22:12 -0700 | [diff] [blame] | 114 | } |