• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2008 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;
18 
19 
20 import android.app.ActivityManagerNative;
21 import android.content.Context;
22 import android.content.Intent;
23 import android.content.SharedPreferences;
24 import android.os.Handler;
25 import android.os.Message;
26 import android.preference.PreferenceManager;
27 import android.telephony.CellLocation;
28 import android.telephony.PhoneStateListener;
29 import android.telephony.ServiceState;
30 import android.telephony.SignalStrength;
31 import android.util.Log;
32 
33 import com.android.internal.telephony.cdma.CDMAPhone;
34 import com.android.internal.telephony.gsm.GSMPhone;
35 import com.android.internal.telephony.gsm.NetworkInfo;
36 import com.android.internal.telephony.gsm.PdpConnection;
37 import com.android.internal.telephony.test.SimulatedRadioControl;
38 
39 import java.util.List;
40 
41 public class PhoneProxy extends Handler implements Phone {
42     public final static Object lockForRadioTechnologyChange = new Object();
43 //    private static boolean radioTechnologyChangeGsmToCdma = false;
44 //    private static boolean radioTechnologyChangeCdmaToGsm = false;
45 
46     private Phone mActivePhone;
47     private String mOutgoingPhone;
48     private CommandsInterface mCommandsInterface;
49     private IccSmsInterfaceManagerProxy mIccSmsInterfaceManagerProxy;
50     private IccPhoneBookInterfaceManagerProxy mIccPhoneBookInterfaceManagerProxy;
51     private PhoneSubInfoProxy mPhoneSubInfoProxy;
52 
53     private static final int EVENT_RADIO_TECHNOLOGY_CHANGED = 1;
54     private static final String LOG_TAG = "PHONE";
55 
56     //***** Class Methods
PhoneProxy(Phone phone)57     public PhoneProxy(Phone phone) {
58         mActivePhone = phone;
59         mIccSmsInterfaceManagerProxy = new IccSmsInterfaceManagerProxy(
60                 phone.getIccSmsInterfaceManager());
61         mIccPhoneBookInterfaceManagerProxy = new IccPhoneBookInterfaceManagerProxy(
62                 phone.getIccPhoneBookInterfaceManager());
63         mPhoneSubInfoProxy = new PhoneSubInfoProxy(phone.getPhoneSubInfo());
64         mCommandsInterface = ((PhoneBase)mActivePhone).mCM;
65         mCommandsInterface.registerForRadioTechnologyChanged(
66                 this, EVENT_RADIO_TECHNOLOGY_CHANGED, null);
67     }
68 
69     @Override
handleMessage(Message msg)70     public void handleMessage(Message msg) {
71         switch(msg.what) {
72         case EVENT_RADIO_TECHNOLOGY_CHANGED:
73             //switch Phone from CDMA to GSM or vice versa
74             mOutgoingPhone = ((PhoneBase)mActivePhone).getPhoneName();
75             logd("Switching phone from " + mOutgoingPhone + "Phone to " +
76                     (mOutgoingPhone.equals("GSM") ? "CDMAPhone" : "GSMPhone") );
77             boolean oldPowerState = false; //old power state to off
78             if (mCommandsInterface.getRadioState().isOn()) {
79                 oldPowerState = true;
80                 logd("Setting Radio Power to Off");
81                 mCommandsInterface.setRadioPower(false, null);
82             }
83             if(mOutgoingPhone.equals("GSM")) {
84                 logd("Make a new CDMAPhone and destroy the old GSMPhone.");
85 
86                 ((GSMPhone)mActivePhone).dispose();
87                 Phone oldPhone = mActivePhone;
88 
89                 //Give the garbage collector a hint to start the garbage collection asap
90                 // NOTE this has been disabled since radio technology change could happen during
91                 //   e.g. a multimedia playing and could slow the system. Tests needs to be done
92                 //   to see the effects of the GC call here when system is busy.
93                 //System.gc();
94 
95                 mActivePhone = PhoneFactory.getCdmaPhone();
96                 logd("Resetting Radio");
97                 mCommandsInterface.setRadioPower(oldPowerState, null);
98                 ((GSMPhone)oldPhone).removeReferences();
99                 oldPhone = null;
100             } else {
101                 logd("Make a new GSMPhone and destroy the old CDMAPhone.");
102 
103                 ((CDMAPhone)mActivePhone).dispose();
104                 //mActivePhone = null;
105                 Phone oldPhone = mActivePhone;
106 
107                 // Give the GC a hint to start the garbage collection asap
108                 // NOTE this has been disabled since radio technology change could happen during
109                 //   e.g. a multimedia playing and could slow the system. Tests needs to be done
110                 //   to see the effects of the GC call here when system is busy.
111                 //System.gc();
112 
113                 mActivePhone = PhoneFactory.getGsmPhone();
114                 logd("Resetting Radio:");
115                 mCommandsInterface.setRadioPower(oldPowerState, null);
116                 ((CDMAPhone)oldPhone).removeReferences();
117                 oldPhone = null;
118             }
119 
120             //Set the new interfaces in the proxy's
121             mIccSmsInterfaceManagerProxy.setmIccSmsInterfaceManager(
122                     mActivePhone.getIccSmsInterfaceManager());
123             mIccPhoneBookInterfaceManagerProxy.setmIccPhoneBookInterfaceManager(
124                     mActivePhone.getIccPhoneBookInterfaceManager());
125             mPhoneSubInfoProxy.setmPhoneSubInfo(this.mActivePhone.getPhoneSubInfo());
126             mCommandsInterface = ((PhoneBase)mActivePhone).mCM;
127 
128             //Send an Intent to the PhoneApp that we had a radio technology change
129             Intent intent = new Intent(TelephonyIntents.ACTION_RADIO_TECHNOLOGY_CHANGED);
130             intent.putExtra(Phone.PHONE_NAME_KEY, mActivePhone.getPhoneName());
131             ActivityManagerNative.broadcastStickyIntent(intent, null);
132             break;
133         default:
134             Log.e(LOG_TAG,"Error! This handler was not registered for this message type. Message: "
135                     + msg.what);
136         break;
137         }
138         super.handleMessage(msg);
139     }
140 
logv(String msg)141     private void logv(String msg) {
142         Log.v(LOG_TAG, "[PhoneProxy] " + msg);
143     }
144 
logd(String msg)145     private void logd(String msg) {
146         Log.d(LOG_TAG, "[PhoneProxy] " + msg);
147     }
148 
logw(String msg)149     private void logw(String msg) {
150         Log.w(LOG_TAG, "[PhoneProxy] " + msg);
151     }
152 
loge(String msg)153     private void loge(String msg) {
154         Log.e(LOG_TAG, "[PhoneProxy] " + msg);
155     }
156 
157 
getServiceState()158     public ServiceState getServiceState() {
159         return mActivePhone.getServiceState();
160     }
161 
getCellLocation()162     public CellLocation getCellLocation() {
163         return mActivePhone.getCellLocation();
164     }
165 
getDataConnectionState()166     public DataState getDataConnectionState() {
167         return mActivePhone.getDataConnectionState();
168     }
169 
getDataActivityState()170     public DataActivityState getDataActivityState() {
171         return mActivePhone.getDataActivityState();
172     }
173 
getContext()174     public Context getContext() {
175         return mActivePhone.getContext();
176     }
177 
disableDnsCheck(boolean b)178     public void disableDnsCheck(boolean b) {
179         mActivePhone.disableDnsCheck(b);
180     }
181 
isDnsCheckDisabled()182     public boolean isDnsCheckDisabled() {
183         return mActivePhone.isDnsCheckDisabled();
184     }
185 
getState()186     public State getState() {
187         return mActivePhone.getState();
188     }
189 
getPhoneName()190     public String getPhoneName() {
191         return mActivePhone.getPhoneName();
192     }
193 
getPhoneType()194     public int getPhoneType() {
195         return mActivePhone.getPhoneType();
196     }
197 
getActiveApnTypes()198     public String[] getActiveApnTypes() {
199         return mActivePhone.getActiveApnTypes();
200     }
201 
getActiveApn()202     public String getActiveApn() {
203         return mActivePhone.getActiveApn();
204     }
205 
getSignalStrength()206     public SignalStrength getSignalStrength() {
207         return mActivePhone.getSignalStrength();
208     }
209 
registerForUnknownConnection(Handler h, int what, Object obj)210     public void registerForUnknownConnection(Handler h, int what, Object obj) {
211         mActivePhone.registerForUnknownConnection(h, what, obj);
212     }
213 
unregisterForUnknownConnection(Handler h)214     public void unregisterForUnknownConnection(Handler h) {
215         mActivePhone.unregisterForUnknownConnection(h);
216     }
217 
registerForPreciseCallStateChanged(Handler h, int what, Object obj)218     public void registerForPreciseCallStateChanged(Handler h, int what, Object obj) {
219         mActivePhone.registerForPreciseCallStateChanged(h, what, obj);
220     }
221 
unregisterForPreciseCallStateChanged(Handler h)222     public void unregisterForPreciseCallStateChanged(Handler h) {
223         mActivePhone.unregisterForPreciseCallStateChanged(h);
224     }
225 
registerForNewRingingConnection(Handler h, int what, Object obj)226     public void registerForNewRingingConnection(Handler h, int what, Object obj) {
227         mActivePhone.registerForNewRingingConnection(h, what, obj);
228     }
229 
unregisterForNewRingingConnection(Handler h)230     public void unregisterForNewRingingConnection(Handler h) {
231         mActivePhone.unregisterForNewRingingConnection(h);
232     }
233 
registerForIncomingRing(Handler h, int what, Object obj)234     public void registerForIncomingRing(Handler h, int what, Object obj) {
235         mActivePhone.registerForIncomingRing(h, what, obj);
236     }
237 
unregisterForIncomingRing(Handler h)238     public void unregisterForIncomingRing(Handler h) {
239         mActivePhone.unregisterForIncomingRing(h);
240     }
241 
registerForDisconnect(Handler h, int what, Object obj)242     public void registerForDisconnect(Handler h, int what, Object obj) {
243         mActivePhone.registerForDisconnect(h, what, obj);
244     }
245 
unregisterForDisconnect(Handler h)246     public void unregisterForDisconnect(Handler h) {
247         mActivePhone.unregisterForDisconnect(h);
248     }
249 
registerForMmiInitiate(Handler h, int what, Object obj)250     public void registerForMmiInitiate(Handler h, int what, Object obj) {
251         mActivePhone.registerForMmiInitiate(h, what, obj);
252     }
253 
unregisterForMmiInitiate(Handler h)254     public void unregisterForMmiInitiate(Handler h) {
255         mActivePhone.unregisterForMmiInitiate(h);
256     }
257 
registerForMmiComplete(Handler h, int what, Object obj)258     public void registerForMmiComplete(Handler h, int what, Object obj) {
259         mActivePhone.registerForMmiComplete(h, what, obj);
260     }
261 
unregisterForMmiComplete(Handler h)262     public void unregisterForMmiComplete(Handler h) {
263         mActivePhone.unregisterForMmiComplete(h);
264     }
265 
getPendingMmiCodes()266     public List<? extends MmiCode> getPendingMmiCodes() {
267         return mActivePhone.getPendingMmiCodes();
268     }
269 
sendUssdResponse(String ussdMessge)270     public void sendUssdResponse(String ussdMessge) {
271         mActivePhone.sendUssdResponse(ussdMessge);
272     }
273 
registerForServiceStateChanged(Handler h, int what, Object obj)274     public void registerForServiceStateChanged(Handler h, int what, Object obj) {
275         mActivePhone.registerForServiceStateChanged(h, what, obj);
276     }
277 
unregisterForServiceStateChanged(Handler h)278     public void unregisterForServiceStateChanged(Handler h) {
279         mActivePhone.unregisterForServiceStateChanged(h);
280     }
281 
registerForSuppServiceNotification(Handler h, int what, Object obj)282     public void registerForSuppServiceNotification(Handler h, int what, Object obj) {
283         mActivePhone.registerForSuppServiceNotification(h, what, obj);
284     }
285 
unregisterForSuppServiceNotification(Handler h)286     public void unregisterForSuppServiceNotification(Handler h) {
287         mActivePhone.unregisterForSuppServiceNotification(h);
288     }
289 
registerForSuppServiceFailed(Handler h, int what, Object obj)290     public void registerForSuppServiceFailed(Handler h, int what, Object obj) {
291         mActivePhone.registerForSuppServiceFailed(h, what, obj);
292     }
293 
unregisterForSuppServiceFailed(Handler h)294     public void unregisterForSuppServiceFailed(Handler h) {
295         mActivePhone.unregisterForSuppServiceFailed(h);
296     }
297 
registerForInCallVoicePrivacyOn(Handler h, int what, Object obj)298     public void registerForInCallVoicePrivacyOn(Handler h, int what, Object obj){
299         mActivePhone.registerForInCallVoicePrivacyOn(h,what,obj);
300     }
301 
unregisterForInCallVoicePrivacyOn(Handler h)302     public void unregisterForInCallVoicePrivacyOn(Handler h){
303         mActivePhone.unregisterForInCallVoicePrivacyOn(h);
304     }
305 
registerForInCallVoicePrivacyOff(Handler h, int what, Object obj)306     public void registerForInCallVoicePrivacyOff(Handler h, int what, Object obj){
307         mActivePhone.registerForInCallVoicePrivacyOff(h,what,obj);
308     }
309 
unregisterForInCallVoicePrivacyOff(Handler h)310     public void unregisterForInCallVoicePrivacyOff(Handler h){
311         mActivePhone.unregisterForInCallVoicePrivacyOff(h);
312     }
313 
registerForCdmaOtaStatusChange(Handler h, int what, Object obj)314     public void registerForCdmaOtaStatusChange(Handler h, int what, Object obj) {
315         mActivePhone.registerForCdmaOtaStatusChange(h,what,obj);
316     }
317 
unregisterForCdmaOtaStatusChange(Handler h)318     public void unregisterForCdmaOtaStatusChange(Handler h) {
319          mActivePhone.unregisterForCdmaOtaStatusChange(h);
320     }
321 
registerForSubscriptionInfoReady(Handler h, int what, Object obj)322     public void registerForSubscriptionInfoReady(Handler h, int what, Object obj) {
323         mActivePhone.registerForSubscriptionInfoReady(h, what, obj);
324     }
325 
unregisterForSubscriptionInfoReady(Handler h)326     public void unregisterForSubscriptionInfoReady(Handler h) {
327         mActivePhone.unregisterForSubscriptionInfoReady(h);
328     }
329 
registerForEcmTimerReset(Handler h, int what, Object obj)330     public void registerForEcmTimerReset(Handler h, int what, Object obj) {
331         mActivePhone.registerForEcmTimerReset(h,what,obj);
332     }
333 
unregisterForEcmTimerReset(Handler h)334     public void unregisterForEcmTimerReset(Handler h) {
335         mActivePhone.unregisterForEcmTimerReset(h);
336     }
337 
registerForRingbackTone(Handler h, int what, Object obj)338     public void registerForRingbackTone(Handler h, int what, Object obj) {
339         mActivePhone.registerForRingbackTone(h,what,obj);
340     }
341 
unregisterForRingbackTone(Handler h)342     public void unregisterForRingbackTone(Handler h) {
343         mActivePhone.unregisterForRingbackTone(h);
344     }
345 
getIccRecordsLoaded()346     public boolean getIccRecordsLoaded() {
347         return mActivePhone.getIccRecordsLoaded();
348     }
349 
getIccCard()350     public IccCard getIccCard() {
351         return mActivePhone.getIccCard();
352     }
353 
acceptCall()354     public void acceptCall() throws CallStateException {
355         mActivePhone.acceptCall();
356     }
357 
rejectCall()358     public void rejectCall() throws CallStateException {
359         mActivePhone.rejectCall();
360     }
361 
switchHoldingAndActive()362     public void switchHoldingAndActive() throws CallStateException {
363         mActivePhone.switchHoldingAndActive();
364     }
365 
canConference()366     public boolean canConference() {
367         return mActivePhone.canConference();
368     }
369 
conference()370     public void conference() throws CallStateException {
371         mActivePhone.conference();
372     }
373 
enableEnhancedVoicePrivacy(boolean enable, Message onComplete)374     public void enableEnhancedVoicePrivacy(boolean enable, Message onComplete) {
375         mActivePhone.enableEnhancedVoicePrivacy(enable, onComplete);
376     }
377 
getEnhancedVoicePrivacy(Message onComplete)378     public void getEnhancedVoicePrivacy(Message onComplete) {
379         mActivePhone.getEnhancedVoicePrivacy(onComplete);
380     }
381 
canTransfer()382     public boolean canTransfer() {
383         return mActivePhone.canTransfer();
384     }
385 
explicitCallTransfer()386     public void explicitCallTransfer() throws CallStateException {
387         mActivePhone.explicitCallTransfer();
388     }
389 
clearDisconnected()390     public void clearDisconnected() {
391         mActivePhone.clearDisconnected();
392     }
393 
getForegroundCall()394     public Call getForegroundCall() {
395         return mActivePhone.getForegroundCall();
396     }
397 
getBackgroundCall()398     public Call getBackgroundCall() {
399         return mActivePhone.getBackgroundCall();
400     }
401 
getRingingCall()402     public Call getRingingCall() {
403         return mActivePhone.getRingingCall();
404     }
405 
dial(String dialString)406     public Connection dial(String dialString) throws CallStateException {
407         return mActivePhone.dial(dialString);
408     }
409 
handlePinMmi(String dialString)410     public boolean handlePinMmi(String dialString) {
411         return mActivePhone.handlePinMmi(dialString);
412     }
413 
handleInCallMmiCommands(String command)414     public boolean handleInCallMmiCommands(String command) throws CallStateException {
415         return mActivePhone.handleInCallMmiCommands(command);
416     }
417 
sendDtmf(char c)418     public void sendDtmf(char c) {
419         mActivePhone.sendDtmf(c);
420     }
421 
startDtmf(char c)422     public void startDtmf(char c) {
423         mActivePhone.startDtmf(c);
424     }
425 
stopDtmf()426     public void stopDtmf() {
427         mActivePhone.stopDtmf();
428     }
429 
setRadioPower(boolean power)430     public void setRadioPower(boolean power) {
431         mActivePhone.setRadioPower(power);
432     }
433 
getMessageWaitingIndicator()434     public boolean getMessageWaitingIndicator() {
435         return mActivePhone.getMessageWaitingIndicator();
436     }
437 
getCallForwardingIndicator()438     public boolean getCallForwardingIndicator() {
439         return mActivePhone.getCallForwardingIndicator();
440     }
441 
getLine1Number()442     public String getLine1Number() {
443         return mActivePhone.getLine1Number();
444     }
445 
getCdmaMin()446     public String getCdmaMin() {
447         return mActivePhone.getCdmaMin();
448     }
449 
isMinInfoReady()450     public boolean isMinInfoReady() {
451         return mActivePhone.isMinInfoReady();
452     }
453 
getCdmaPrlVersion()454     public String getCdmaPrlVersion() {
455         return mActivePhone.getCdmaPrlVersion();
456     }
457 
getLine1AlphaTag()458     public String getLine1AlphaTag() {
459         return mActivePhone.getLine1AlphaTag();
460     }
461 
setLine1Number(String alphaTag, String number, Message onComplete)462     public void setLine1Number(String alphaTag, String number, Message onComplete) {
463         mActivePhone.setLine1Number(alphaTag, number, onComplete);
464     }
465 
getVoiceMailNumber()466     public String getVoiceMailNumber() {
467         return mActivePhone.getVoiceMailNumber();
468     }
469 
470      /** @hide */
getVoiceMessageCount()471     public int getVoiceMessageCount(){
472         return mActivePhone.getVoiceMessageCount();
473     }
474 
getVoiceMailAlphaTag()475     public String getVoiceMailAlphaTag() {
476         return mActivePhone.getVoiceMailAlphaTag();
477     }
478 
setVoiceMailNumber(String alphaTag,String voiceMailNumber, Message onComplete)479     public void setVoiceMailNumber(String alphaTag,String voiceMailNumber,
480             Message onComplete) {
481         mActivePhone.setVoiceMailNumber(alphaTag, voiceMailNumber, onComplete);
482     }
483 
getCallForwardingOption(int commandInterfaceCFReason, Message onComplete)484     public void getCallForwardingOption(int commandInterfaceCFReason,
485             Message onComplete) {
486         mActivePhone.getCallForwardingOption(commandInterfaceCFReason,
487                 onComplete);
488     }
489 
setCallForwardingOption(int commandInterfaceCFReason, int commandInterfaceCFAction, String dialingNumber, int timerSeconds, Message onComplete)490     public void setCallForwardingOption(int commandInterfaceCFReason,
491             int commandInterfaceCFAction, String dialingNumber,
492             int timerSeconds, Message onComplete) {
493         mActivePhone.setCallForwardingOption(commandInterfaceCFReason,
494             commandInterfaceCFAction, dialingNumber, timerSeconds, onComplete);
495     }
496 
getOutgoingCallerIdDisplay(Message onComplete)497     public void getOutgoingCallerIdDisplay(Message onComplete) {
498         mActivePhone.getOutgoingCallerIdDisplay(onComplete);
499     }
500 
setOutgoingCallerIdDisplay(int commandInterfaceCLIRMode, Message onComplete)501     public void setOutgoingCallerIdDisplay(int commandInterfaceCLIRMode,
502             Message onComplete) {
503         mActivePhone.setOutgoingCallerIdDisplay(commandInterfaceCLIRMode,
504                 onComplete);
505     }
506 
getCallWaiting(Message onComplete)507     public void getCallWaiting(Message onComplete) {
508         mActivePhone.getCallWaiting(onComplete);
509     }
510 
setCallWaiting(boolean enable, Message onComplete)511     public void setCallWaiting(boolean enable, Message onComplete) {
512         mActivePhone.setCallWaiting(enable, onComplete);
513     }
514 
getAvailableNetworks(Message response)515     public void getAvailableNetworks(Message response) {
516         mActivePhone.getAvailableNetworks(response);
517     }
518 
setNetworkSelectionModeAutomatic(Message response)519     public void setNetworkSelectionModeAutomatic(Message response) {
520         mActivePhone.setNetworkSelectionModeAutomatic(response);
521     }
522 
selectNetworkManually(NetworkInfo network, Message response)523     public void selectNetworkManually(NetworkInfo network, Message response) {
524         mActivePhone.selectNetworkManually(network, response);
525     }
526 
setPreferredNetworkType(int networkType, Message response)527     public void setPreferredNetworkType(int networkType, Message response) {
528         mActivePhone.setPreferredNetworkType(networkType, response);
529     }
530 
getPreferredNetworkType(Message response)531     public void getPreferredNetworkType(Message response) {
532         mActivePhone.getPreferredNetworkType(response);
533     }
534 
getNeighboringCids(Message response)535     public void getNeighboringCids(Message response) {
536         mActivePhone.getNeighboringCids(response);
537     }
538 
setOnPostDialCharacter(Handler h, int what, Object obj)539     public void setOnPostDialCharacter(Handler h, int what, Object obj) {
540         mActivePhone.setOnPostDialCharacter(h, what, obj);
541     }
542 
setMute(boolean muted)543     public void setMute(boolean muted) {
544         mActivePhone.setMute(muted);
545     }
546 
getMute()547     public boolean getMute() {
548         return mActivePhone.getMute();
549     }
550 
invokeOemRilRequestRaw(byte[] data, Message response)551     public void invokeOemRilRequestRaw(byte[] data, Message response) {
552         mActivePhone.invokeOemRilRequestRaw(data, response);
553     }
554 
invokeOemRilRequestStrings(String[] strings, Message response)555     public void invokeOemRilRequestStrings(String[] strings, Message response) {
556         mActivePhone.invokeOemRilRequestStrings(strings, response);
557     }
558 
559     /**
560      * @deprecated
561      */
getPdpContextList(Message response)562     public void getPdpContextList(Message response) {
563         mActivePhone.getPdpContextList(response);
564     }
565 
getDataCallList(Message response)566     public void getDataCallList(Message response) {
567         mActivePhone.getDataCallList(response);
568     }
569 
570     /**
571      * @deprecated
572      */
getCurrentPdpList()573     public List<PdpConnection> getCurrentPdpList() {
574         return mActivePhone.getCurrentPdpList();
575     }
576 
getCurrentDataConnectionList()577     public List<DataConnection> getCurrentDataConnectionList() {
578         return mActivePhone.getCurrentDataConnectionList();
579     }
580 
updateServiceLocation()581     public void updateServiceLocation() {
582         mActivePhone.updateServiceLocation();
583     }
584 
enableLocationUpdates()585     public void enableLocationUpdates() {
586         mActivePhone.enableLocationUpdates();
587     }
588 
disableLocationUpdates()589     public void disableLocationUpdates() {
590         mActivePhone.disableLocationUpdates();
591     }
592 
setUnitTestMode(boolean f)593     public void setUnitTestMode(boolean f) {
594         mActivePhone.setUnitTestMode(f);
595     }
596 
getUnitTestMode()597     public boolean getUnitTestMode() {
598         return mActivePhone.getUnitTestMode();
599     }
600 
setBandMode(int bandMode, Message response)601     public void setBandMode(int bandMode, Message response) {
602         mActivePhone.setBandMode(bandMode, response);
603     }
604 
queryAvailableBandMode(Message response)605     public void queryAvailableBandMode(Message response) {
606         mActivePhone.queryAvailableBandMode(response);
607     }
608 
getDataRoamingEnabled()609     public boolean getDataRoamingEnabled() {
610         return mActivePhone.getDataRoamingEnabled();
611     }
612 
setDataRoamingEnabled(boolean enable)613     public void setDataRoamingEnabled(boolean enable) {
614         mActivePhone.setDataRoamingEnabled(enable);
615     }
616 
queryCdmaRoamingPreference(Message response)617     public void queryCdmaRoamingPreference(Message response) {
618         mActivePhone.queryCdmaRoamingPreference(response);
619     }
620 
setCdmaRoamingPreference(int cdmaRoamingType, Message response)621     public void setCdmaRoamingPreference(int cdmaRoamingType, Message response) {
622         mActivePhone.setCdmaRoamingPreference(cdmaRoamingType, response);
623     }
624 
setCdmaSubscription(int cdmaSubscriptionType, Message response)625     public void setCdmaSubscription(int cdmaSubscriptionType, Message response) {
626         mActivePhone.setCdmaSubscription(cdmaSubscriptionType, response);
627     }
628 
getSimulatedRadioControl()629     public SimulatedRadioControl getSimulatedRadioControl() {
630         return mActivePhone.getSimulatedRadioControl();
631     }
632 
enableDataConnectivity()633     public boolean enableDataConnectivity() {
634         return mActivePhone.enableDataConnectivity();
635     }
636 
disableDataConnectivity()637     public boolean disableDataConnectivity() {
638         return mActivePhone.disableDataConnectivity();
639     }
640 
enableApnType(String type)641     public int enableApnType(String type) {
642         return mActivePhone.enableApnType(type);
643     }
644 
disableApnType(String type)645     public int disableApnType(String type) {
646         return mActivePhone.disableApnType(type);
647     }
648 
isDataConnectivityEnabled()649     public boolean isDataConnectivityEnabled() {
650         return mActivePhone.isDataConnectivityEnabled();
651     }
652 
isDataConnectivityPossible()653     public boolean isDataConnectivityPossible() {
654         return mActivePhone.isDataConnectivityPossible();
655     }
656 
getInterfaceName(String apnType)657     public String getInterfaceName(String apnType) {
658         return mActivePhone.getInterfaceName(apnType);
659     }
660 
getIpAddress(String apnType)661     public String getIpAddress(String apnType) {
662         return mActivePhone.getIpAddress(apnType);
663     }
664 
getGateway(String apnType)665     public String getGateway(String apnType) {
666         return mActivePhone.getGateway(apnType);
667     }
668 
getDnsServers(String apnType)669     public String[] getDnsServers(String apnType) {
670         return mActivePhone.getDnsServers(apnType);
671     }
672 
getDeviceId()673     public String getDeviceId() {
674         return mActivePhone.getDeviceId();
675     }
676 
getDeviceSvn()677     public String getDeviceSvn() {
678         return mActivePhone.getDeviceSvn();
679     }
680 
getSubscriberId()681     public String getSubscriberId() {
682         return mActivePhone.getSubscriberId();
683     }
684 
getIccSerialNumber()685     public String getIccSerialNumber() {
686         return mActivePhone.getIccSerialNumber();
687     }
688 
getEsn()689     public String getEsn() {
690         return mActivePhone.getEsn();
691     }
692 
getMeid()693     public String getMeid() {
694         return mActivePhone.getMeid();
695     }
696 
getPhoneSubInfo()697     public PhoneSubInfo getPhoneSubInfo(){
698         return mActivePhone.getPhoneSubInfo();
699     }
700 
getIccSmsInterfaceManager()701     public IccSmsInterfaceManager getIccSmsInterfaceManager(){
702         return mActivePhone.getIccSmsInterfaceManager();
703     }
704 
getIccPhoneBookInterfaceManager()705     public IccPhoneBookInterfaceManager getIccPhoneBookInterfaceManager(){
706         return mActivePhone.getIccPhoneBookInterfaceManager();
707     }
708 
setTTYMode(int ttyMode, Message onComplete)709     public void setTTYMode(int ttyMode, Message onComplete) {
710         mActivePhone.setTTYMode(ttyMode, onComplete);
711     }
712 
queryTTYMode(Message onComplete)713     public void queryTTYMode(Message onComplete) {
714         mActivePhone.queryTTYMode(onComplete);
715     }
716 
activateCellBroadcastSms(int activate, Message response)717     public void activateCellBroadcastSms(int activate, Message response) {
718         mActivePhone.activateCellBroadcastSms(activate, response);
719     }
720 
getCellBroadcastSmsConfig(Message response)721     public void getCellBroadcastSmsConfig(Message response) {
722         mActivePhone.getCellBroadcastSmsConfig(response);
723     }
724 
setCellBroadcastSmsConfig(int[] configValuesArray, Message response)725     public void setCellBroadcastSmsConfig(int[] configValuesArray, Message response) {
726         mActivePhone.setCellBroadcastSmsConfig(configValuesArray, response);
727     }
728 
notifyDataActivity()729     public void notifyDataActivity() {
730          mActivePhone.notifyDataActivity();
731     }
732 
getSmscAddress(Message result)733     public void getSmscAddress(Message result) {
734         mActivePhone.getSmscAddress(result);
735     }
736 
setSmscAddress(String address, Message result)737     public void setSmscAddress(String address, Message result) {
738         mActivePhone.setSmscAddress(address, result);
739     }
740 
getCdmaEriIconIndex()741     public int getCdmaEriIconIndex() {
742          return mActivePhone.getCdmaEriIconIndex();
743     }
744 
getCdmaEriText()745      public String getCdmaEriText() {
746          return mActivePhone.getCdmaEriText();
747      }
748 
getCdmaEriIconMode()749     public int getCdmaEriIconMode() {
750          return mActivePhone.getCdmaEriIconMode();
751     }
752 
sendBurstDtmf(String dtmfString, int on, int off, Message onComplete)753     public void sendBurstDtmf(String dtmfString, int on, int off, Message onComplete){
754         mActivePhone.sendBurstDtmf(dtmfString, on, off, onComplete);
755     }
756 
exitEmergencyCallbackMode()757     public void exitEmergencyCallbackMode(){
758         mActivePhone.exitEmergencyCallbackMode();
759     }
760 
isOtaSpNumber(String dialStr)761     public boolean isOtaSpNumber(String dialStr){
762         return mActivePhone.isOtaSpNumber(dialStr);
763     }
764 
registerForCallWaiting(Handler h, int what, Object obj)765     public void registerForCallWaiting(Handler h, int what, Object obj){
766         mActivePhone.registerForCallWaiting(h,what,obj);
767     }
768 
unregisterForCallWaiting(Handler h)769     public void unregisterForCallWaiting(Handler h){
770         mActivePhone.unregisterForCallWaiting(h);
771     }
772 
registerForSignalInfo(Handler h, int what, Object obj)773     public void registerForSignalInfo(Handler h, int what, Object obj) {
774         mActivePhone.registerForSignalInfo(h,what,obj);
775     }
776 
unregisterForSignalInfo(Handler h)777     public void unregisterForSignalInfo(Handler h) {
778         mActivePhone.unregisterForSignalInfo(h);
779     }
780 
registerForDisplayInfo(Handler h, int what, Object obj)781     public void registerForDisplayInfo(Handler h, int what, Object obj) {
782         mActivePhone.registerForDisplayInfo(h,what,obj);
783     }
784 
unregisterForDisplayInfo(Handler h)785     public void unregisterForDisplayInfo(Handler h) {
786         mActivePhone.unregisterForDisplayInfo(h);
787     }
788 
registerForNumberInfo(Handler h, int what, Object obj)789     public void registerForNumberInfo(Handler h, int what, Object obj) {
790         mActivePhone.registerForNumberInfo(h, what, obj);
791     }
792 
unregisterForNumberInfo(Handler h)793     public void unregisterForNumberInfo(Handler h) {
794         mActivePhone.unregisterForNumberInfo(h);
795     }
796 
registerForRedirectedNumberInfo(Handler h, int what, Object obj)797     public void registerForRedirectedNumberInfo(Handler h, int what, Object obj) {
798         mActivePhone.registerForRedirectedNumberInfo(h, what, obj);
799     }
800 
unregisterForRedirectedNumberInfo(Handler h)801     public void unregisterForRedirectedNumberInfo(Handler h) {
802         mActivePhone.unregisterForRedirectedNumberInfo(h);
803     }
804 
registerForLineControlInfo(Handler h, int what, Object obj)805     public void registerForLineControlInfo(Handler h, int what, Object obj) {
806         mActivePhone.registerForLineControlInfo( h, what, obj);
807     }
808 
unregisterForLineControlInfo(Handler h)809     public void unregisterForLineControlInfo(Handler h) {
810         mActivePhone.unregisterForLineControlInfo(h);
811     }
812 
registerFoT53ClirlInfo(Handler h, int what, Object obj)813     public void registerFoT53ClirlInfo(Handler h, int what, Object obj) {
814         mActivePhone.registerFoT53ClirlInfo(h, what, obj);
815     }
816 
unregisterForT53ClirInfo(Handler h)817     public void unregisterForT53ClirInfo(Handler h) {
818         mActivePhone.unregisterForT53ClirInfo(h);
819     }
820 
registerForT53AudioControlInfo(Handler h, int what, Object obj)821     public void registerForT53AudioControlInfo(Handler h, int what, Object obj) {
822         mActivePhone.registerForT53AudioControlInfo( h, what, obj);
823     }
824 
unregisterForT53AudioControlInfo(Handler h)825     public void unregisterForT53AudioControlInfo(Handler h) {
826         mActivePhone.unregisterForT53AudioControlInfo(h);
827     }
828 
setOnEcbModeExitResponse(Handler h, int what, Object obj)829     public void setOnEcbModeExitResponse(Handler h, int what, Object obj){
830         mActivePhone.setOnEcbModeExitResponse(h,what,obj);
831     }
832 
unsetOnEcbModeExitResponse(Handler h)833     public void unsetOnEcbModeExitResponse(Handler h){
834         mActivePhone.unsetOnEcbModeExitResponse(h);
835     }
836 }
837