1 /*
2  * Copyright (C) 2013 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.telephony.imsphone;
18 
19 import android.content.Context;
20 import android.os.Handler;
21 import android.os.Message;
22 import android.service.carrier.CarrierIdentifier;
23 
24 import com.android.internal.telephony.BaseCommands;
25 import com.android.internal.telephony.CommandsInterface;
26 import com.android.internal.telephony.RadioCapability;
27 import com.android.internal.telephony.UUSInfo;
28 import com.android.internal.telephony.cdma.CdmaSmsBroadcastConfigInfo;
29 import com.android.internal.telephony.dataconnection.DataProfile;
30 import com.android.internal.telephony.gsm.SmsBroadcastConfigInfo;
31 
32 import java.util.List;
33 
34 /**
35  * Volte doesn't need CommandsInterface. The class does nothing but made to work
36  * with Phone's constructor.
37  */
38 class ImsPhoneCommandInterface extends BaseCommands implements CommandsInterface {
ImsPhoneCommandInterface(Context context)39     ImsPhoneCommandInterface(Context context) {
40         super(context);
41     }
42 
setOnNITZTime(Handler h, int what, Object obj)43     @Override public void setOnNITZTime(Handler h, int what, Object obj) {
44     }
45 
46     @Override
getIccCardStatus(Message result)47     public void getIccCardStatus(Message result) {
48     }
49 
50     @Override
supplyIccPin(String pin, Message result)51     public void supplyIccPin(String pin, Message result) {
52     }
53 
54     @Override
supplyIccPuk(String puk, String newPin, Message result)55     public void supplyIccPuk(String puk, String newPin, Message result) {
56     }
57 
58     @Override
supplyIccPin2(String pin, Message result)59     public void supplyIccPin2(String pin, Message result) {
60     }
61 
62     @Override
supplyIccPuk2(String puk, String newPin2, Message result)63     public void supplyIccPuk2(String puk, String newPin2, Message result) {
64     }
65 
66     @Override
changeIccPin(String oldPin, String newPin, Message result)67     public void changeIccPin(String oldPin, String newPin, Message result) {
68     }
69 
70     @Override
changeIccPin2(String oldPin2, String newPin2, Message result)71     public void changeIccPin2(String oldPin2, String newPin2, Message result) {
72     }
73 
74     @Override
changeBarringPassword(String facility, String oldPwd, String newPwd, Message result)75     public void changeBarringPassword(String facility, String oldPwd,
76             String newPwd, Message result) {
77     }
78 
79     @Override
supplyNetworkDepersonalization(String netpin, Message result)80     public void supplyNetworkDepersonalization(String netpin, Message result) {
81     }
82 
83     @Override
getCurrentCalls(Message result)84     public void getCurrentCalls(Message result) {
85     }
86 
87     @Override
getPDPContextList(Message result)88     @Deprecated public void getPDPContextList(Message result) {
89     }
90 
91     @Override
getDataCallList(Message result)92     public void getDataCallList(Message result) {
93     }
94 
95     @Override
dial(String address, int clirMode, Message result)96     public void dial(String address, int clirMode, Message result) {
97     }
98 
99     @Override
dial(String address, int clirMode, UUSInfo uusInfo, Message result)100     public void dial(String address, int clirMode, UUSInfo uusInfo,
101             Message result) {
102     }
103 
104     @Override
getIMSI(Message result)105     public void getIMSI(Message result) {
106     }
107 
108     @Override
getIMSIForApp(String aid, Message result)109     public void getIMSIForApp(String aid, Message result) {
110     }
111 
112     @Override
getIMEI(Message result)113     public void getIMEI(Message result) {
114     }
115 
116     @Override
getIMEISV(Message result)117     public void getIMEISV(Message result) {
118     }
119 
120     @Override
hangupConnection(int gsmIndex, Message result)121     public void hangupConnection (int gsmIndex, Message result) {
122     }
123 
124     @Override
hangupWaitingOrBackground(Message result)125     public void hangupWaitingOrBackground (Message result) {
126     }
127 
128     @Override
hangupForegroundResumeBackground(Message result)129     public void hangupForegroundResumeBackground (Message result) {
130     }
131 
132     @Override
switchWaitingOrHoldingAndActive(Message result)133     public void switchWaitingOrHoldingAndActive (Message result) {
134     }
135 
136     @Override
conference(Message result)137     public void conference (Message result) {
138     }
139 
140     @Override
setPreferredVoicePrivacy(boolean enable, Message result)141     public void setPreferredVoicePrivacy(boolean enable, Message result) {
142     }
143 
144     @Override
getPreferredVoicePrivacy(Message result)145     public void getPreferredVoicePrivacy(Message result) {
146     }
147 
148     @Override
separateConnection(int gsmIndex, Message result)149     public void separateConnection (int gsmIndex, Message result) {
150     }
151 
152     @Override
acceptCall(Message result)153     public void acceptCall (Message result) {
154     }
155 
156     @Override
rejectCall(Message result)157     public void rejectCall (Message result) {
158     }
159 
160     @Override
explicitCallTransfer(Message result)161     public void explicitCallTransfer (Message result) {
162     }
163 
164     @Override
getLastCallFailCause(Message result)165     public void getLastCallFailCause (Message result) {
166     }
167 
168     @Deprecated
169     @Override
getLastPdpFailCause(Message result)170     public void getLastPdpFailCause (Message result) {
171     }
172 
173     @Override
getLastDataCallFailCause(Message result)174     public void getLastDataCallFailCause (Message result) {
175     }
176 
177     @Override
setMute(boolean enableMute, Message response)178     public void setMute (boolean enableMute, Message response) {
179     }
180 
181     @Override
getMute(Message response)182     public void getMute (Message response) {
183     }
184 
185     @Override
getSignalStrength(Message result)186     public void getSignalStrength (Message result) {
187     }
188 
189     @Override
getVoiceRegistrationState(Message result)190     public void getVoiceRegistrationState (Message result) {
191     }
192 
193     @Override
getDataRegistrationState(Message result)194     public void getDataRegistrationState (Message result) {
195     }
196 
197     @Override
getOperator(Message result)198     public void getOperator(Message result) {
199     }
200 
201     @Override
sendDtmf(char c, Message result)202     public void sendDtmf(char c, Message result) {
203     }
204 
205     @Override
startDtmf(char c, Message result)206     public void startDtmf(char c, Message result) {
207     }
208 
209     @Override
stopDtmf(Message result)210     public void stopDtmf(Message result) {
211     }
212 
213     @Override
sendBurstDtmf(String dtmfString, int on, int off, Message result)214     public void sendBurstDtmf(String dtmfString, int on, int off,
215             Message result) {
216     }
217 
218     @Override
sendSMS(String smscPDU, String pdu, Message result)219     public void sendSMS (String smscPDU, String pdu, Message result) {
220     }
221 
222     @Override
sendSMSExpectMore(String smscPDU, String pdu, Message result)223     public void sendSMSExpectMore (String smscPDU, String pdu, Message result) {
224     }
225 
226     @Override
sendCdmaSms(byte[] pdu, Message result)227     public void sendCdmaSms(byte[] pdu, Message result) {
228     }
229 
230     @Override
sendImsGsmSms(String smscPDU, String pdu, int retry, int messageRef, Message response)231     public void sendImsGsmSms (String smscPDU, String pdu,
232             int retry, int messageRef, Message response) {
233     }
234 
235     @Override
sendImsCdmaSms(byte[] pdu, int retry, int messageRef, Message response)236     public void sendImsCdmaSms(byte[] pdu, int retry, int messageRef,
237             Message response) {
238     }
239 
240     @Override
getImsRegistrationState(Message result)241     public void getImsRegistrationState (Message result) {
242     }
243 
244     @Override
deleteSmsOnSim(int index, Message response)245     public void deleteSmsOnSim(int index, Message response) {
246     }
247 
248     @Override
deleteSmsOnRuim(int index, Message response)249     public void deleteSmsOnRuim(int index, Message response) {
250     }
251 
252     @Override
writeSmsToSim(int status, String smsc, String pdu, Message response)253     public void writeSmsToSim(int status, String smsc, String pdu, Message response) {
254     }
255 
256     @Override
writeSmsToRuim(int status, String pdu, Message response)257     public void writeSmsToRuim(int status, String pdu, Message response) {
258     }
259 
260     @Override
setupDataCall(int radioTechnology, DataProfile dataProfile, boolean isRoaming, boolean allowRoaming, Message result)261     public void setupDataCall(int radioTechnology, DataProfile dataProfile, boolean isRoaming,
262                               boolean allowRoaming, Message result) {
263     }
264 
265     @Override
deactivateDataCall(int cid, int reason, Message result)266     public void deactivateDataCall(int cid, int reason, Message result) {
267     }
268 
269     @Override
setRadioPower(boolean on, Message result)270     public void setRadioPower(boolean on, Message result) {
271     }
272 
273     @Override
setSuppServiceNotifications(boolean enable, Message result)274     public void setSuppServiceNotifications(boolean enable, Message result) {
275     }
276 
277     @Override
acknowledgeLastIncomingGsmSms(boolean success, int cause, Message result)278     public void acknowledgeLastIncomingGsmSms(boolean success, int cause,
279             Message result) {
280     }
281 
282     @Override
acknowledgeLastIncomingCdmaSms(boolean success, int cause, Message result)283     public void acknowledgeLastIncomingCdmaSms(boolean success, int cause,
284             Message result) {
285     }
286 
287     @Override
acknowledgeIncomingGsmSmsWithPdu(boolean success, String ackPdu, Message result)288     public void acknowledgeIncomingGsmSmsWithPdu(boolean success, String ackPdu,
289             Message result) {
290     }
291 
292     @Override
iccIO(int command, int fileid, String path, int p1, int p2, int p3, String data, String pin2, Message result)293     public void iccIO (int command, int fileid, String path, int p1, int p2,
294             int p3, String data, String pin2, Message result) {
295     }
296     @Override
iccIOForApp(int command, int fileid, String path, int p1, int p2, int p3, String data, String pin2, String aid, Message result)297     public void iccIOForApp (int command, int fileid, String path, int p1, int p2,
298             int p3, String data, String pin2, String aid, Message result) {
299     }
300 
301     @Override
getCLIR(Message result)302     public void getCLIR(Message result) {
303     }
304 
305     @Override
setCLIR(int clirMode, Message result)306     public void setCLIR(int clirMode, Message result) {
307     }
308 
309     @Override
queryCallWaiting(int serviceClass, Message response)310     public void queryCallWaiting(int serviceClass, Message response) {
311     }
312 
313     @Override
setCallWaiting(boolean enable, int serviceClass, Message response)314     public void setCallWaiting(boolean enable, int serviceClass,
315             Message response) {
316     }
317 
318     @Override
setNetworkSelectionModeAutomatic(Message response)319     public void setNetworkSelectionModeAutomatic(Message response) {
320     }
321 
322     @Override
setNetworkSelectionModeManual( String operatorNumeric, Message response)323     public void setNetworkSelectionModeManual(
324             String operatorNumeric, Message response) {
325     }
326 
327     @Override
getNetworkSelectionMode(Message response)328     public void getNetworkSelectionMode(Message response) {
329     }
330 
331     @Override
getAvailableNetworks(Message response)332     public void getAvailableNetworks(Message response) {
333     }
334 
335     @Override
setCallForward(int action, int cfReason, int serviceClass, String number, int timeSeconds, Message response)336     public void setCallForward(int action, int cfReason, int serviceClass,
337                 String number, int timeSeconds, Message response) {
338     }
339 
340     @Override
queryCallForwardStatus(int cfReason, int serviceClass, String number, Message response)341     public void queryCallForwardStatus(int cfReason, int serviceClass,
342             String number, Message response) {
343     }
344 
345     @Override
queryCLIP(Message response)346     public void queryCLIP(Message response) {
347     }
348 
349     @Override
getBasebandVersion(Message response)350     public void getBasebandVersion (Message response) {
351     }
352 
353     @Override
queryFacilityLock(String facility, String password, int serviceClass, Message response)354     public void queryFacilityLock(String facility, String password,
355             int serviceClass, Message response) {
356     }
357 
358     @Override
queryFacilityLockForApp(String facility, String password, int serviceClass, String appId, Message response)359     public void queryFacilityLockForApp(String facility, String password,
360             int serviceClass, String appId, Message response) {
361     }
362 
363     @Override
setFacilityLock(String facility, boolean lockState, String password, int serviceClass, Message response)364     public void setFacilityLock(String facility, boolean lockState,
365             String password, int serviceClass, Message response) {
366     }
367 
368     @Override
setFacilityLockForApp(String facility, boolean lockState, String password, int serviceClass, String appId, Message response)369     public void setFacilityLockForApp(String facility, boolean lockState,
370             String password, int serviceClass, String appId, Message response) {
371     }
372 
373     @Override
sendUSSD(String ussdString, Message response)374     public void sendUSSD (String ussdString, Message response) {
375     }
376 
377     @Override
cancelPendingUssd(Message response)378     public void cancelPendingUssd (Message response) {
379     }
380 
381     @Override
resetRadio(Message result)382     public void resetRadio(Message result) {
383     }
384 
385     @Override
invokeOemRilRequestRaw(byte[] data, Message response)386     public void invokeOemRilRequestRaw(byte[] data, Message response) {
387     }
388 
389     @Override
invokeOemRilRequestStrings(String[] strings, Message response)390     public void invokeOemRilRequestStrings(String[] strings, Message response) {
391     }
392 
393     @Override
setBandMode(int bandMode, Message response)394     public void setBandMode (int bandMode, Message response) {
395     }
396 
397     @Override
queryAvailableBandMode(Message response)398     public void queryAvailableBandMode (Message response) {
399     }
400 
401     @Override
sendTerminalResponse(String contents, Message response)402     public void sendTerminalResponse(String contents, Message response) {
403     }
404 
405     @Override
sendEnvelope(String contents, Message response)406     public void sendEnvelope(String contents, Message response) {
407     }
408 
409     @Override
sendEnvelopeWithStatus(String contents, Message response)410     public void sendEnvelopeWithStatus(String contents, Message response) {
411     }
412 
413     @Override
handleCallSetupRequestFromSim( boolean accept, Message response)414     public void handleCallSetupRequestFromSim(
415             boolean accept, Message response) {
416     }
417 
418     @Override
setPreferredNetworkType(int networkType , Message response)419     public void setPreferredNetworkType(int networkType , Message response) {
420     }
421 
422     @Override
getPreferredNetworkType(Message response)423     public void getPreferredNetworkType(Message response) {
424     }
425 
426     @Override
setLocationUpdates(boolean enable, Message response)427     public void setLocationUpdates(boolean enable, Message response) {
428     }
429 
430     @Override
getSmscAddress(Message result)431     public void getSmscAddress(Message result) {
432     }
433 
434     @Override
setSmscAddress(String address, Message result)435     public void setSmscAddress(String address, Message result) {
436     }
437 
438     @Override
reportSmsMemoryStatus(boolean available, Message result)439     public void reportSmsMemoryStatus(boolean available, Message result) {
440     }
441 
442     @Override
reportStkServiceIsRunning(Message result)443     public void reportStkServiceIsRunning(Message result) {
444     }
445 
446     @Override
getCdmaSubscriptionSource(Message response)447     public void getCdmaSubscriptionSource(Message response) {
448     }
449 
450     @Override
getGsmBroadcastConfig(Message response)451     public void getGsmBroadcastConfig(Message response) {
452     }
453 
454     @Override
setGsmBroadcastConfig(SmsBroadcastConfigInfo[] config, Message response)455     public void setGsmBroadcastConfig(SmsBroadcastConfigInfo[] config, Message response) {
456     }
457 
458     @Override
setGsmBroadcastActivation(boolean activate, Message response)459     public void setGsmBroadcastActivation(boolean activate, Message response) {
460     }
461 
462     // ***** Methods for CDMA support
463     @Override
getDeviceIdentity(Message response)464     public void getDeviceIdentity(Message response) {
465     }
466 
467     @Override
getCDMASubscription(Message response)468     public void getCDMASubscription(Message response) {
469     }
470 
471     @Override
setPhoneType(int phoneType)472     public void setPhoneType(int phoneType) { //Set by CDMAPhone and GSMPhone constructor
473     }
474 
475     @Override
queryCdmaRoamingPreference(Message response)476     public void queryCdmaRoamingPreference(Message response) {
477     }
478 
479     @Override
setCdmaRoamingPreference(int cdmaRoamingType, Message response)480     public void setCdmaRoamingPreference(int cdmaRoamingType, Message response) {
481     }
482 
483     @Override
setCdmaSubscriptionSource(int cdmaSubscription , Message response)484     public void setCdmaSubscriptionSource(int cdmaSubscription , Message response) {
485     }
486 
487     @Override
queryTTYMode(Message response)488     public void queryTTYMode(Message response) {
489     }
490 
491     @Override
setTTYMode(int ttyMode, Message response)492     public void setTTYMode(int ttyMode, Message response) {
493     }
494 
495     @Override
sendCDMAFeatureCode(String FeatureCode, Message response)496     public void sendCDMAFeatureCode(String FeatureCode, Message response) {
497     }
498 
499     @Override
getCdmaBroadcastConfig(Message response)500     public void getCdmaBroadcastConfig(Message response) {
501     }
502 
503     @Override
setCdmaBroadcastConfig(CdmaSmsBroadcastConfigInfo[] configs, Message response)504     public void setCdmaBroadcastConfig(CdmaSmsBroadcastConfigInfo[] configs, Message response) {
505     }
506 
507     @Override
setCdmaBroadcastActivation(boolean activate, Message response)508     public void setCdmaBroadcastActivation(boolean activate, Message response) {
509     }
510 
511     @Override
exitEmergencyCallbackMode(Message response)512     public void exitEmergencyCallbackMode(Message response) {
513     }
514 
515     @Override
supplyIccPinForApp(String pin, String aid, Message response)516     public void supplyIccPinForApp(String pin, String aid, Message response) {
517     }
518 
519     @Override
supplyIccPukForApp(String puk, String newPin, String aid, Message response)520     public void supplyIccPukForApp(String puk, String newPin, String aid, Message response) {
521     }
522 
523     @Override
supplyIccPin2ForApp(String pin2, String aid, Message response)524     public void supplyIccPin2ForApp(String pin2, String aid, Message response) {
525     }
526 
527     @Override
supplyIccPuk2ForApp(String puk2, String newPin2, String aid, Message response)528     public void supplyIccPuk2ForApp(String puk2, String newPin2, String aid, Message response) {
529     }
530 
531     @Override
changeIccPinForApp(String oldPin, String newPin, String aidPtr, Message response)532     public void changeIccPinForApp(String oldPin, String newPin, String aidPtr, Message response) {
533     }
534 
535     @Override
changeIccPin2ForApp(String oldPin2, String newPin2, String aidPtr, Message response)536     public void changeIccPin2ForApp(String oldPin2, String newPin2, String aidPtr,
537             Message response) {
538     }
539 
540     @Override
requestIsimAuthentication(String nonce, Message response)541     public void requestIsimAuthentication(String nonce, Message response) {
542     }
543 
544     @Override
requestIccSimAuthentication(int authContext, String data, String aid, Message response)545     public void requestIccSimAuthentication(int authContext, String data, String aid, Message response) {
546     }
547 
548     @Override
getVoiceRadioTechnology(Message result)549     public void getVoiceRadioTechnology(Message result) {
550     }
551 
552     @Override
setInitialAttachApn(DataProfile dataProfile, boolean isRoaming, Message result)553     public void setInitialAttachApn(DataProfile dataProfile, boolean isRoaming, Message result) {
554     }
555 
556     @Override
setDataProfile(DataProfile[] dps, boolean isRoaming, Message result)557     public void setDataProfile(DataProfile[] dps, boolean isRoaming, Message result) {
558     }
559 
560     @Override
iccOpenLogicalChannel(String AID, int p2, Message response)561     public void iccOpenLogicalChannel(String AID, int p2, Message response) {}
562 
563     @Override
iccCloseLogicalChannel(int channel, Message response)564     public void iccCloseLogicalChannel(int channel, Message response) {}
565 
566     @Override
iccTransmitApduLogicalChannel(int channel, int cla, int instruction, int p1, int p2, int p3, String data, Message response)567     public void iccTransmitApduLogicalChannel(int channel, int cla, int instruction,
568                                               int p1, int p2, int p3, String data,
569                                               Message response) {}
570     @Override
iccTransmitApduBasicChannel(int cla, int instruction, int p1, int p2, int p3, String data, Message response)571     public void iccTransmitApduBasicChannel(int cla, int instruction, int p1, int p2,
572                                             int p3, String data, Message response) {}
573 
574     @Override
nvReadItem(int itemID, Message response)575     public void nvReadItem(int itemID, Message response) {}
576 
577     @Override
nvWriteItem(int itemID, String itemValue, Message response)578     public void nvWriteItem(int itemID, String itemValue, Message response) {}
579 
580     @Override
nvWriteCdmaPrl(byte[] preferredRoamingList, Message response)581     public void nvWriteCdmaPrl(byte[] preferredRoamingList, Message response) {}
582 
583     @Override
nvResetConfig(int resetType, Message response)584     public void nvResetConfig(int resetType, Message response) {}
585 
586     @Override
getHardwareConfig(Message result)587     public void getHardwareConfig(Message result) {}
588 
589     @Override
requestShutdown(Message result)590     public void requestShutdown(Message result) {
591     }
592 
593     @Override
setRadioCapability(RadioCapability rc, Message response)594     public void setRadioCapability(RadioCapability rc, Message response) {
595     }
596 
597     @Override
getRadioCapability(Message response)598     public void getRadioCapability(Message response) {
599     }
600 
601     @Override
startLceService(int reportIntervalMs, boolean pullMode, Message result)602     public void startLceService(int reportIntervalMs, boolean pullMode, Message result) {
603     }
604 
605     @Override
stopLceService(Message result)606     public void stopLceService(Message result) {
607     }
608 
609     @Override
pullLceData(Message result)610     public void pullLceData(Message result) {
611     }
612 
613     @Override
getModemActivityInfo(Message result)614     public void getModemActivityInfo(Message result) {
615     }
616 
617     @Override
setAllowedCarriers(List<CarrierIdentifier> carriers, Message result)618     public void setAllowedCarriers(List<CarrierIdentifier> carriers, Message result) {
619     }
620 
621     @Override
getAllowedCarriers(Message result)622     public void getAllowedCarriers(Message result) {
623     }
624 
625     @Override
sendDeviceState(int stateType, boolean state, Message result)626     public void sendDeviceState(int stateType, boolean state, Message result) {
627     }
628 
629     @Override
setUnsolResponseFilter(int filter, Message result)630     public void setUnsolResponseFilter(int filter, Message result){
631     }
632 
633     @Override
setSimCardPower(boolean powerUp, Message result)634     public void setSimCardPower(boolean powerUp, Message result) {
635     }
636 }
637