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; |
Yorke Lee | 2e02470 | 2014-06-13 09:59:43 -0700 | [diff] [blame] | 21 | |
Santos Cordon | 3afed57 | 2014-05-21 15:22:12 -0700 | [diff] [blame] | 22 | /** |
| 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 Cordon | 3534ede | 2014-05-29 13:07:10 -0700 | [diff] [blame] | 27 | interface ITelecommService { |
Santos Cordon | 3534ede | 2014-05-29 13:07:10 -0700 | [diff] [blame] | 28 | /** |
| 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 Lee | 2e02470 | 2014-06-13 09:59:43 -0700 | [diff] [blame] | 34 | |
| 35 | /** |
Ihab Awad | 9c3f188 | 2014-06-30 21:17:13 -0700 | [diff] [blame] | 36 | * Gets a list of accounts. |
Ihab Awad | c35ad02 | 2014-06-12 16:29:42 -0700 | [diff] [blame] | 37 | */ |
Ihab Awad | 9c3f188 | 2014-06-30 21:17:13 -0700 | [diff] [blame] | 38 | List<PhoneAccount> getAccounts(); |
Ihab Awad | c35ad02 | 2014-06-12 16:29:42 -0700 | [diff] [blame] | 39 | |
| 40 | /** |
Ihab Awad | 9c3f188 | 2014-06-30 21:17:13 -0700 | [diff] [blame] | 41 | * Sets the enabled state of a given account. |
Ihab Awad | c35ad02 | 2014-06-12 16:29:42 -0700 | [diff] [blame] | 42 | */ |
Ihab Awad | 9c3f188 | 2014-06-30 21:17:13 -0700 | [diff] [blame] | 43 | void setEnabled(in PhoneAccount account, boolean enabled); |
Ihab Awad | c35ad02 | 2014-06-12 16:29:42 -0700 | [diff] [blame] | 44 | |
| 45 | /** |
Ihab Awad | 9c3f188 | 2014-06-30 21:17:13 -0700 | [diff] [blame] | 46 | * Sets a given account as the system default. |
Ihab Awad | c35ad02 | 2014-06-12 16:29:42 -0700 | [diff] [blame] | 47 | */ |
Ihab Awad | 9c3f188 | 2014-06-30 21:17:13 -0700 | [diff] [blame] | 48 | void setSystemDefault(in PhoneAccount account); |
Santos Cordon | 6c7a388 | 2014-06-25 15:30:08 -0700 | [diff] [blame] | 49 | |
| 50 | /** |
| 51 | * Returns the component name of the default phone application. |
| 52 | */ |
| 53 | ComponentName getDefaultPhoneApp(); |
Santos Cordon | 9eb4593 | 2014-06-27 12:28:43 -0700 | [diff] [blame] | 54 | |
| 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 Cordon | 3c4ff9e | 2014-07-02 13:20:40 -0700 | [diff] [blame] | 83 | |
| 84 | /** |
| 85 | * @see PhoneManager#cancelMissedCallsNotification |
| 86 | */ |
| 87 | void cancelMissedCallsNotification(); |
Santos Cordon | 0bae09f | 2014-07-07 14:53:10 -0700 | [diff] [blame^] | 88 | |
| 89 | /** |
| 90 | * @see PhoneManager#handlePinMmi |
| 91 | */ |
| 92 | boolean handlePinMmi(String dialString); |
Santos Cordon | 3afed57 | 2014-05-21 15:22:12 -0700 | [diff] [blame] | 93 | } |