2 * Copyright (C) 2010 The Android Open Source Project
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 package com.android.internal.telephony.sip;
19 import android.content.Context;
20 import android.os.Handler;
21 import android.os.Message;
23 import com.android.internal.telephony.BaseCommands;
24 import com.android.internal.telephony.CommandsInterface;
25 import com.android.internal.telephony.UUSInfo;
26 import com.android.internal.telephony.gsm.SmsBroadcastConfigInfo;
29 * SIP doesn't need CommandsInterface. The class does nothing but made to work
30 * with PhoneBase's constructor.
32 class SipCommandInterface extends BaseCommands implements CommandsInterface {
33 SipCommandInterface(Context context) {
37 @Override public void setOnNITZTime(Handler h, int what, Object obj) {
40 public void getIccCardStatus(Message result) {
43 public void supplyIccPin(String pin, Message result) {
46 public void supplyIccPuk(String puk, String newPin, Message result) {
49 public void supplyIccPin2(String pin, Message result) {
52 public void supplyIccPuk2(String puk, String newPin2, Message result) {
55 public void changeIccPin(String oldPin, String newPin, Message result) {
58 public void changeIccPin2(String oldPin2, String newPin2, Message result) {
61 public void changeBarringPassword(String facility, String oldPwd,
62 String newPwd, Message result) {
65 public void supplyNetworkDepersonalization(String netpin, Message result) {
68 public void getCurrentCalls(Message result) {
71 @Deprecated public void getPDPContextList(Message result) {
74 public void getDataCallList(Message result) {
77 public void dial(String address, int clirMode, Message result) {
80 public void dial(String address, int clirMode, UUSInfo uusInfo,
84 public void getIMSI(Message result) {
87 public void getIMEI(Message result) {
90 public void getIMEISV(Message result) {
94 public void hangupConnection (int gsmIndex, Message result) {
97 public void hangupWaitingOrBackground (Message result) {
100 public void hangupForegroundResumeBackground (Message result) {
103 public void switchWaitingOrHoldingAndActive (Message result) {
106 public void conference (Message result) {
110 public void setPreferredVoicePrivacy(boolean enable, Message result) {
113 public void getPreferredVoicePrivacy(Message result) {
116 public void separateConnection (int gsmIndex, Message result) {
119 public void acceptCall (Message result) {
122 public void rejectCall (Message result) {
125 public void explicitCallTransfer (Message result) {
128 public void getLastCallFailCause (Message result) {
132 public void getLastPdpFailCause (Message result) {
135 public void getLastDataCallFailCause (Message result) {
138 public void setMute (boolean enableMute, Message response) {
141 public void getMute (Message response) {
144 public void getSignalStrength (Message result) {
147 public void getVoiceRegistrationState (Message result) {
150 public void getDataRegistrationState (Message result) {
153 public void getOperator(Message result) {
156 public void sendDtmf(char c, Message result) {
159 public void startDtmf(char c, Message result) {
162 public void stopDtmf(Message result) {
165 public void sendBurstDtmf(String dtmfString, int on, int off,
169 public void sendSMS (String smscPDU, String pdu, Message result) {
172 public void sendCdmaSms(byte[] pdu, Message result) {
175 public void deleteSmsOnSim(int index, Message response) {
178 public void deleteSmsOnRuim(int index, Message response) {
181 public void writeSmsToSim(int status, String smsc, String pdu, Message response) {
184 public void writeSmsToRuim(int status, String pdu, Message response) {
187 public void setupDataCall(String radioTechnology, String profile,
188 String apn, String user, String password, String authType,
189 String protcol, Message result) {
192 public void deactivateDataCall(int cid, int reason, Message result) {
195 public void setRadioPower(boolean on, Message result) {
198 public void setSuppServiceNotifications(boolean enable, Message result) {
201 public void acknowledgeLastIncomingGsmSms(boolean success, int cause,
205 public void acknowledgeLastIncomingCdmaSms(boolean success, int cause,
210 public void iccIO (int command, int fileid, String path, int p1, int p2,
211 int p3, String data, String pin2, Message result) {
214 public void getCLIR(Message result) {
217 public void setCLIR(int clirMode, Message result) {
220 public void queryCallWaiting(int serviceClass, Message response) {
223 public void setCallWaiting(boolean enable, int serviceClass,
227 public void setNetworkSelectionModeAutomatic(Message response) {
230 public void setNetworkSelectionModeManual(
231 String operatorNumeric, Message response) {
234 public void getNetworkSelectionMode(Message response) {
237 public void getAvailableNetworks(Message response) {
240 public void setCallForward(int action, int cfReason, int serviceClass,
241 String number, int timeSeconds, Message response) {
244 public void queryCallForwardStatus(int cfReason, int serviceClass,
245 String number, Message response) {
248 public void queryCLIP(Message response) {
251 public void getBasebandVersion (Message response) {
255 public void queryFacilityLock(String facility, String password,
256 int serviceClass, Message response) {
260 public void queryFacilityLockForApp(String facility, String password,
261 int serviceClass, String appId, Message response) {
265 public void setFacilityLock(String facility, boolean lockState,
266 String password, int serviceClass, Message response) {
270 public void setFacilityLockForApp(String facility, boolean lockState,
271 String password, int serviceClass, String appId, Message response) {
274 public void sendUSSD (String ussdString, Message response) {
277 public void cancelPendingUssd (Message response) {
280 public void resetRadio(Message result) {
283 public void invokeOemRilRequestRaw(byte[] data, Message response) {
286 public void invokeOemRilRequestStrings(String[] strings, Message response) {
289 public void setBandMode (int bandMode, Message response) {
292 public void queryAvailableBandMode (Message response) {
295 public void sendTerminalResponse(String contents, Message response) {
298 public void sendEnvelope(String contents, Message response) {
301 public void handleCallSetupRequestFromSim(
302 boolean accept, Message response) {
305 public void setPreferredNetworkType(int networkType , Message response) {
308 public void getPreferredNetworkType(Message response) {
311 public void getNeighboringCids(Message response) {
314 public void setLocationUpdates(boolean enable, Message response) {
317 public void getSmscAddress(Message result) {
320 public void setSmscAddress(String address, Message result) {
323 public void reportSmsMemoryStatus(boolean available, Message result) {
326 public void reportStkServiceIsRunning(Message result) {
330 public void getCdmaSubscriptionSource(Message response) {
333 public void getGsmBroadcastConfig(Message response) {
336 public void setGsmBroadcastConfig(SmsBroadcastConfigInfo[] config, Message response) {
339 public void setGsmBroadcastActivation(boolean activate, Message response) {
342 // ***** Methods for CDMA support
343 public void getDeviceIdentity(Message response) {
346 public void getCDMASubscription(Message response) {
349 public void setPhoneType(int phoneType) { //Set by CDMAPhone and GSMPhone constructor
352 public void queryCdmaRoamingPreference(Message response) {
355 public void setCdmaRoamingPreference(int cdmaRoamingType, Message response) {
358 public void setCdmaSubscriptionSource(int cdmaSubscription , Message response) {
361 public void queryTTYMode(Message response) {
364 public void setTTYMode(int ttyMode, Message response) {
367 public void sendCDMAFeatureCode(String FeatureCode, Message response) {
370 public void getCdmaBroadcastConfig(Message response) {
373 public void setCdmaBroadcastConfig(int[] configValuesArray, Message response) {
376 public void setCdmaBroadcastActivation(boolean activate, Message response) {
379 public void exitEmergencyCallbackMode(Message response) {
383 public void supplyIccPinForApp(String pin, String aid, Message response) {
387 public void supplyIccPukForApp(String puk, String newPin, String aid, Message response) {
391 public void supplyIccPin2ForApp(String pin2, String aid, Message response) {
395 public void supplyIccPuk2ForApp(String puk2, String newPin2, String aid, Message response) {
399 public void changeIccPinForApp(String oldPin, String newPin, String aidPtr, Message response) {
403 public void changeIccPin2ForApp(String oldPin2, String newPin2, String aidPtr,