ITelephony.aidl revision f013e1afd1e68af5e3b868c26a653bbfb39538f8
1/* 2 * Copyright (C) 2007 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.telephony; 18 19import android.os.Bundle; 20import java.util.List; 21import android.telephony.NeighboringCellInfo; 22 23/** 24 * Interface used to interact with the phone. Mostly this is used by the 25 * TelephonyManager class. A few places are still using this directly. 26 * Please clean them up if possible and use TelephonyManager insteadl. 27 * 28 * {@hide} 29 */ 30interface ITelephony { 31 32 /** 33 * Dial a number. This doesn't place the call. It displays 34 * the Dialer screen. 35 * @param number the number to be dialed. If null, this 36 * would display the Dialer screen with no number pre-filled. 37 */ 38 void dial(String number); 39 40 /** 41 * Place a call to the numer. 42 * @param number the number to be called. 43 */ 44 void call(String number); 45 46 /** 47 * If there is currently a call in progress, show the call screen. 48 * The DTMF dialpad may or may not be visible initially, depending on 49 * whether it was up when the user last exited the InCallScreen. 50 * 51 * @return true if the call screen was shown. 52 */ 53 boolean showCallScreen(); 54 55 /** 56 * Variation of showCallScreen() that also specifies whether the 57 * DTMF dialpad should be initially visible when the InCallScreen 58 * comes up. 59 * 60 * @param showDialpad if true, make the dialpad visible initially, 61 * otherwise hide the dialpad initially. 62 * @return true if the call screen was shown. 63 * 64 * @see showCallScreen 65 */ 66 boolean showCallScreenWithDialpad(boolean showDialpad); 67 68 /** 69 * End call or go to the Home screen 70 * 71 * @return whether it hung up 72 */ 73 boolean endCall(); 74 75 /** 76 * Check if we are in either an active or holding call 77 * @return true if the phone state is OFFHOOK. 78 */ 79 boolean isOffhook(); 80 81 /** 82 * Check if an incoming phone call is ringing or call waiting. 83 * @return true if the phone state is RINGING. 84 */ 85 boolean isRinging(); 86 87 /** 88 * Check if the phone is idle. 89 * @return true if the phone state is IDLE. 90 */ 91 boolean isIdle(); 92 93 /** 94 * Check to see if the radio is on or not. 95 * @return returns true if the radio is on. 96 */ 97 boolean isRadioOn(); 98 99 /** 100 * Check if the SIM pin lock is enabled. 101 * @return true if the SIM pin lock is enabled. 102 */ 103 boolean isSimPinEnabled(); 104 105 /** 106 * Cancels the missed calls notification. 107 */ 108 void cancelMissedCallsNotification(); 109 110 /** 111 * Supply a pin to unlock the SIM. Blocks until a result is determined. 112 * @param pin The pin to check. 113 * @return whether the operation was a success. 114 */ 115 boolean supplyPin(String pin); 116 117 /** 118 * Handles PIN MMI commands (PIN/PIN2/PUK/PUK2), which are initiated 119 * without SEND (so <code>dial</code> is not appropriate). 120 * 121 * @param dialString the MMI command to be executed. 122 * @return true if MMI command is executed. 123 */ 124 boolean handlePinMmi(String dialString); 125 126 /** 127 * Toggles the radio on or off. 128 */ 129 void toggleRadioOnOff(); 130 131 /** 132 * Set the radio to on or off 133 */ 134 boolean setRadio(boolean turnOn); 135 136 /** 137 * Request to update location information in service state 138 */ 139 void updateServiceLocation(); 140 141 /** 142 * Enable location update notifications. 143 */ 144 void enableLocationUpdates(); 145 146 /** 147 * Disable location update notifications. 148 */ 149 void disableLocationUpdates(); 150 151 /** 152 * Enable a specific APN type. 153 */ 154 int enableApnType(String type); 155 156 /** 157 * Disable a specific APN type. 158 */ 159 int disableApnType(String type); 160 161 /** 162 * Allow mobile data connections. 163 */ 164 boolean enableDataConnectivity(); 165 166 /** 167 * Disallow mobile data connections. 168 */ 169 boolean disableDataConnectivity(); 170 171 /** 172 * Report whether data connectivity is possible. 173 */ 174 boolean isDataConnectivityPossible(); 175 176 Bundle getCellLocation(); 177 178 /** 179 * Returns the neighboring cell information of the device. 180 */ 181 List<NeighboringCellInfo> getNeighboringCellInfo(); 182 183 int getCallState(); 184 int getDataActivity(); 185 int getDataState(); 186} 187